CLI

The Gigalixir Command-Line Interface or CLI is a tool you install on your local machine to control Gigalixir.

How to Install the CLI

Linux / macOS

Install the CLI with:

curl https://get.gigalixir.com/cli | bash

Verify the install:

gigalixir version

When you get out of date, upgrade to the latest version by running the same command again:

curl https://get.gigalixir.com/cli | bash

If the command above isn’t an option in your environment (offline, air-gapped, or a read-only container), see the pip tab instead.

Windows

Install the CLI with:

irm https://get.gigalixir.com/cli.ps1 | iex

Verify the install:

gigalixir version

When you get out of date, upgrade to the latest version by running the same command again:

irm https://get.gigalixir.com/cli.ps1 | iex

Known limitations on Windows: gigalixir pg:psql fails at runtime, and gigalixir ps:observer reports “not supported on this platform.”

If the command above isn’t an option in your environment (offline, air-gapped, or a read-only container), see the pip tab instead.

pip

Works on macOS, Linux, and Windows. Use it only when the one-liner installer above won’t work: an offline or air-gapped environment, pip install --require-hashes, or a read-only container. pip fetches the CLI binary the first time you run it, so it can’t finish that first run in any of those environments.

Prerequisites:

macOS and Linux

pip3 install gigalixir --user
echo "export PATH=\$PATH:$(python3 -m site --user-base)/bin" >> ~/.profile
source ~/.profile

On Debian 12, Ubuntu 23.04 and newer, and other distributions where the system Python is externally managed, this fails with externally-managed-environment. Use your platform’s one-liner installer instead.

Windows

pip3 install gigalixir --user

Make sure the executable is in your path, if it isn’t already.

On Windows Powershell, try something similar to this. Note this may vary based on your python version.

[Environment]::SetEnvironmentVariable("Path", $env:Path + ";$HOME\appdata\roaming\python\python38\Scripts", "Machine")

If you have any trouble, please reach out for help.

When you get out of date, upgrade to the latest version with:

pip3 install gigalixir --user --upgrade

Homebrew on macOS

Prerequisites:

Install the CLI with:

brew tap gigalixir/brew
brew install gigalixir/brew/gigalixir

brew tap takes a tap name, not a formula. The tap is gigalixir/brew, and the formula is gigalixir/brew/gigalixir.

When you get out of date, upgrade to the latest version with:

brew update
brew upgrade gigalixir/brew/gigalixir

If brew upgrade reports success but the CLI doesn’t actually change, see Homebrew upgrade reports success but does nothing.

How to Upgrade the CLI

Linux / macOS

curl https://get.gigalixir.com/cli | bash

Installed via pip instead? See the pip tab.

Windows

irm https://get.gigalixir.com/cli.ps1 | iex

Installed via pip instead? See the pip tab.

pip

pip3 install gigalixir --user --upgrade

On Debian 12, Ubuntu 23.04 and newer, and other distributions where the system Python is externally managed, this fails with externally-managed-environment. Use your platform’s one-liner installer instead. See the Install tab above.

Homebrew on macOS

brew update
brew upgrade gigalixir/brew/gigalixir

If this reports success but the CLI doesn’t actually change, see Homebrew upgrade reports success but does nothing.

Encryption

All HTTP requests made between your machine and Gigalixir’s servers are encrypted.

Conventions

  • No news is good news: If you run a command that produces no output, then the command probably succeeded.
  • Exit codes: Commands that succeed will return a 0 exit code, and non-zero otherwise.
  • stderr vs stdout: Stderr is used for errors and for log output. Stdout is for the data output of your command.

Authentication

When you login with your email and password, you receive an API key.

This API key is stored in your ~/.netrcfile. Commands generally use your ~/.netrc file to authenticate with few exceptions.

Error Reporting

Bugs in the CLI are reported to Gigalixir’s error tracking service.

What’s Next?