Command Line Interface (CLI)
Install Scalingo CLI
We provide a command line interface (CLI) tool to interact with the platform. This page describes how to install Scalingo CLI tool.
Supported Operating Systems
-
Linux
-
MacOS
-
Windows
-
FreeBSD
-
OpenBSD
For each of these operating systems, you can download a precompiled binary.
Scalingo does not require any external dependency. The precompiled binary works out of the box.
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.com/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
- Linux users
-
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
Network Requirements
Scalingo CLI communicates with a few servers on Scalingo. You may be in an
environment, behind a proxy, and need to whitelist the hostname and ports it
communicates with. Here is the list. Each item is <HOSTNAME>:<PORT>
.
HOSTNAME
contains the <REGION NAME>
placeholder. It must be replaced with
the Scalingo region you
need to communicate with (e.g. osc-fr1
).
auth.scalingo.com:443
api.<REGION NAME>.scalingo.com:443
ssh.<REGION NAME>.scalingo.com:22
one-off.<REGION NAME>.scalingo.com:5000
The port 443
will receive HTTPS stream. The port 22
is for SSH. And the port
5000
will receive pure TCP stream. It is used for one-off containers.
Uninstall
Linux & MacOS
To uninstall our CLI binary you can run this command:
sudo rm $(which scalingo)
Then you can delete the configuration and cache folders.
rm -r ~/.config/scalingo/
rm -r ~/.cache/scalingo/
Windows
CMD
To uninstall our CLI:
- Press
WIN
key - Write
cmd
- Right click on
Command Prompt
- Click
Execute as Administrator
A command prompt pops out, then execute:
# Delete executable
for /F "usebackq delims=" %A in (`where scalingo`) do del "%A"
# Delete config
cd %userprofile%\.config
rd /s /q scalingo
# Delete cache
cd %userprofile%\.cache
rd /s /q scalingo
Git-Bash
If you used git-bash to install our CLI, you can run this command:
rm $(which scalingo)
Then you can delete the configuration and cache folders.
rm -r ~/.config/scalingo/
rm -r ~/.cache/scalingo/