CLI Installation
The rack-gateway CLI is distributed as a single binary. Choose the installation method that works best for your platform.
Download from GitHub Releases (Linux x86_64)
Section titled “Download from GitHub Releases (Linux x86_64)”Each release publishes a Linux x86_64 build with a checksum and a signed build provenance attestation:
VERSION=v0.1.10 # see https://github.com/docspring/rack-gateway/releasescurl -fsSLO https://github.com/docspring/rack-gateway/releases/download/$VERSION/rack-gateway-linux-amd64.tar.gzcurl -fsSLO https://github.com/docspring/rack-gateway/releases/download/$VERSION/rack-gateway-linux-amd64.tar.gz.sha256sha256sum --check rack-gateway-linux-amd64.tar.gz.sha256gh attestation verify rack-gateway-linux-amd64.tar.gz --repo DocSpring/rack-gatewaytar xzf rack-gateway-linux-amd64.tar.gzsudo install -m 0755 rack-gateway-linux-amd64 /usr/local/bin/rack-gatewayThe release build has no WebAuthn support (no CGO), so it verifies MFA with TOTP, YubiKey OTP or backup codes. To use a security key from the CLI, or on macOS and other platforms, build from source.
Verify Installation
Section titled “Verify Installation”rack-gateway versionYou should see output like:
client: v0.1.10gateway: (not logged in)server: (not logged in)Shell Completion
Section titled “Shell Completion”The CLI supports shell completion for bash, zsh, fish, and PowerShell.
# Add to ~/.bashrcsource <(rack-gateway completion bash)
# Or generate a filerack-gateway completion bash > /etc/bash_completion.d/rack-gateway# Add to ~/.zshrcsource <(rack-gateway completion zsh)
# Or add to your fpathrack-gateway completion zsh > "${fpath[1]}/_rack-gateway"rack-gateway completion fish | source
# Or save to completions directoryrack-gateway completion fish > ~/.config/fish/completions/rack-gateway.fish# Add to your PowerShell profilerack-gateway completion powershell | Out-String | Invoke-ExpressionRecommended Alias
Section titled “Recommended Alias”Set up a short alias for convenience:
# Add to ~/.bashrc, ~/.zshrc, or equivalentalias cg="rack-gateway"Now you can use:
cg appscg deploycg logs -a myappWebAuthn Support (Optional)
Section titled “WebAuthn Support (Optional)”Security keys (WebAuthn/FIDO2) in the CLI need a build with libfido2. Install it before building from source:
brew install libfido2sudo apt-get install libfido2-dev libudev-dev libusb-1.0-0-devsudo dnf install libfido2-devel systemd-devel libusb1-develsudo pacman -S libfido2 libusbBuilding from Source
Section titled “Building from Source”If you prefer to build from source:
-
Prerequisites
- Go 1.26 or later
- Git and Task
- libfido2 (see WebAuthn Support), unless you build without WebAuthn
-
Clone and build
Terminal window git clone https://github.com/docspring/rack-gateway.gitcd rack-gatewaytask go:build:cli -
Install
Terminal window sudo mv bin/rack-gateway /usr/local/bin/
Building with WebAuthn Support
Section titled “Building with WebAuthn Support”To build with WebAuthn/FIDO2 support, use the default CLI build:
task go:build:cliBuilding without WebAuthn
Section titled “Building without WebAuthn”To build without WebAuthn support (smaller binary, no CGO):
task go:build:cli:nofidoUpdating
Section titled “Updating”To update, download the new release (Linux x86_64), or rebuild from source:
cd rack-gatewaygit pulltask go:build:clisudo mv bin/rack-gateway /usr/local/bin/Troubleshooting
Section titled “Troubleshooting”“command not found”
Section titled ““command not found””Make sure the binary is in your PATH:
which rack-gatewayIf not, either move the binary to a directory in your PATH, or add its location:
export PATH="$PATH:/path/to/rack-gateway"Permission denied
Section titled “Permission denied”Make sure the binary is executable:
chmod +x /usr/local/bin/rack-gatewaymacOS security warning
Section titled “macOS security warning”On macOS, you may see a security warning the first time you run the CLI. Either:
- Right-click the binary in Finder and select “Open”, then click “Open” in the dialog
- Or run:
xattr -d com.apple.quarantine /usr/local/bin/rack-gateway
Next Steps
Section titled “Next Steps”- Authentication - Login to your first gateway
- Multi-Rack - Configure multiple racks