Resources for Developers

Command Line Tool

We provide a command line tool (CLI) to interact with the platform. It uses our standard API.

Supported operating systems

  • Linux
  • MacOS
  • Windows
  • FreeBSD
  • OpenBSD

For each of these operating systems, you can download a precompiled binary.

The client is developed with Go. Therefore, there is no external dependency.

Installation

Linux & MacOS

You need to download the binary and put it in your PATH. The easiest way is to copy/paste the command below in your terminal and execute it.

curl -O https://cli-dl.scalingo.io/install && bash install

Windows

We highly recommend to use git-bash to have an all-in-one deployment environment.

Then, you need to download Scalingo command-line tool:

Place the scalingo.exe file in the path you want, e.g. “C:/Program Files”.

From git-bash add this path to your PATH environment variable:

$ export PATH=$PATH:/c/Program\ Files/

Now you should be able to run scalingo.exe from git-bash.

Note that you set PATH for this specific git-bash instance and that you should add the command line above to a .bashrc file at the root of your HOME:

$ echo "export PATH=$PATH:/c/Program\ Files/" >> $HOME/.bashrc

Now scalingo.exe will be available from git-bash for your next sessions.

Command Completion

Bash

  • Make sure bash completion is installed. If you use a current Linux in a non-minimal installation, bash completion should be available. On macOS, install with brew install bash-completion

  • Get bash completion script in the directory:
    • Linux users /etc/bash_completion.d/:
      sudo curl "https://raw.githubusercontent.com/Scalingo/cli/master/cmd/autocomplete/scripts/scalingo_complete.bash" -o /etc/bash_completion.d/scalingo_complete.sh
    
    • macOS users /usr/local/etc/bash_completion.d/:
      sudo curl "https://raw.githubusercontent.com/Scalingo/cli/master/cmd/autocomplete/scripts/scalingo_complete.bash" -o /usr/local/etc/bash_completion.d/scalingo_complete.sh
    
  • Reload your shell in order to make the completion available:

    exec bash -l
    

Zsh

  • Create a directory ~/.zsh/completion/ :

    mkdir -p ~/.zsh/completion
    
  • Get Zsh completion script in the directory ~/.zsh/completion/ :

    curl "https://raw.githubusercontent.com/Scalingo/cli/master/cmd/autocomplete/scripts/scalingo_complete.zsh" > ~/.zsh/completion/scalingo_complete.zsh
    
  • Make sure the completion script will be loaded, by adding to the following line to your ~/.zshrc :

    source ~/.zsh/completion/scalingo_complete.zsh
    
  • Reload your shell:

    exec zsh -l
    

mode_edit Suggest edits