Skip to content

CLI Installation

The rack-gateway CLI is distributed as a single binary. Choose the installation method that works best for your platform.

Terminal window
# For Apple Silicon (M1/M2/M3)
curl -L https://github.com/docspring/rack-gateway/releases/latest/download/rack-gateway-darwin-arm64 -o rack-gateway
chmod +x rack-gateway
sudo mv rack-gateway /usr/local/bin/
# For Intel Macs
curl -L https://github.com/docspring/rack-gateway/releases/latest/download/rack-gateway-darwin-amd64 -o rack-gateway
chmod +x rack-gateway
sudo mv rack-gateway /usr/local/bin/
Terminal window
rack-gateway version

You should see output like:

CLI version: v0.1.0
Gateway version: (not connected)
Rack version: (not connected)

The CLI supports shell completion for bash, zsh, fish, and PowerShell.

Terminal window
# Add to ~/.bashrc
source <(rack-gateway completion bash)
# Or generate a file
rack-gateway completion bash > /etc/bash_completion.d/rack-gateway

Set up a short alias for convenience:

Terminal window
# Add to ~/.bashrc, ~/.zshrc, or equivalent
alias cg="rack-gateway"

Now you can use:

Terminal window
cg apps
cg deploy
cg logs -a myapp

For hardware security key (WebAuthn/FIDO2) support in the CLI, you may need additional system libraries on Linux:

No additional dependencies required. macOS includes libfido2 support.

If you prefer to build from source:

  1. Prerequisites

    • Go 1.22 or later
    • Git
  2. Clone and build

    Terminal window
    git clone https://github.com/docspring/rack-gateway.git
    cd rack-gateway
    task go:build:cli
  3. Install

    Terminal window
    sudo mv bin/rack-gateway /usr/local/bin/

To build with WebAuthn/FIDO2 support, use the default CLI build:

Terminal window
task go:build:cli

To build without WebAuthn support (smaller binary, no CGO):

Terminal window
task go:build:cli:nofido

To update to the latest version, simply re-run the download command for your platform, or rebuild from source with:

Terminal window
cd rack-gateway
git pull
task go:build:cli
sudo mv bin/rack-gateway /usr/local/bin/

Make sure the binary is in your PATH:

/usr/local/bin/rack-gateway
which rack-gateway

If not, either move the binary to a directory in your PATH, or add its location:

Terminal window
export PATH="$PATH:/path/to/rack-gateway"

Make sure the binary is executable:

Terminal window
chmod +x /usr/local/bin/rack-gateway

On macOS, you may see a security warning the first time you run the CLI. Either:

  1. Right-click the binary in Finder and select “Open”, then click “Open” in the dialog
  2. Or run: xattr -d com.apple.quarantine /usr/local/bin/rack-gateway