Skip to content
GantryCD

Command line

gantrycli is useful for local plans, scripts, and work that is faster from a terminal.

Install

Download the archive for your platform and put the binary on your PATH. The release index names the newest version, so the only thing to change is darwin-arm64 for your own <os>-<arch> — linux, darwin and windows, each as amd64 or arm64:

PLATFORM=darwin-arm64
releases="https://artifacts-axj4rmt8.gantrycd.io/releases"
VERSION=$(curl -fsSL "${releases}/releases.json" | jq -r .latest)
archive="cli-${VERSION}-${PLATFORM}.tar.gz"

curl -fsSL -O "${releases}/${VERSION}/${archive}"
curl -fsSL -O "${releases}/${VERSION}/${archive}.sha256"
shasum -a 256 -c "${archive}.sha256"

tar -xzf "${archive}"
sudo install -m 0755 gantrycli /usr/local/bin/gantrycli

Set VERSION yourself to install an older release instead. releases.json lists every version and the platforms it was built for. Windows ships as a .zip holding gantrycli.exe.

Upgrade

After the first install, gantrycli replaces itself:

gantrycli upgrade

The first run asks where releases are published and remembers the answer as releases_url in ~/.gantrycd/config.yaml, so later runs need no arguments. For GantryCD’s own builds that is https://artifacts-axj4rmt8.gantrycd.io/releases; a self-hosted install points at wherever its own archives are mirrored. Set it without being asked — in a script, or to change it later — with --releases-url:

gantrycli upgrade --releases-url https://artifacts.example.com/releases

With no version, upgrade installs the newest release, or tells you there is nothing to do. Name a version to install exactly that one, which is also how you go back:

gantrycli upgrade v0.0.9

The archive’s checksum is verified before anything is unpacked, and the binary is replaced only after that succeeds — a failed upgrade leaves the working gantrycli in place. Upgrading a binary you do not own needs the privilege to write it (sudo gantrycli upgrade for one installed under /usr/local/bin).

Sign in

Sign in through your browser and save the server and organization in one step:

gantrycli login --api-url https://gantrycd.example.com --org <org-id>
gantrycli whoami

Common commands include:

gantrycli stacks list
gantrycli stacks sync <stack-id>
gantrycli deployments create --stack <stack-id> --mode plan
gantrycli deployments logs <run-id>
gantrycli deployments wait <deployment-id>

Most list and get commands accept --output json. Use --help on a command for its current options and output. The CLI itself is the full command reference.

For a script, use a service account instead of a person’s login. Pass its token with gantrycli login --token-stdin, or set the supported environment variables for the process.