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
Section titled “Download from GitHub Releases”# For Apple Silicon (M1/M2/M3)curl -L https://github.com/docspring/rack-gateway/releases/latest/download/rack-gateway-darwin-arm64 -o rack-gatewaychmod +x rack-gatewaysudo mv rack-gateway /usr/local/bin/
# For Intel Macscurl -L https://github.com/docspring/rack-gateway/releases/latest/download/rack-gateway-darwin-amd64 -o rack-gatewaychmod +x rack-gatewaysudo mv rack-gateway /usr/local/bin/# For x86_64curl -L https://github.com/docspring/rack-gateway/releases/latest/download/rack-gateway-linux-amd64 -o rack-gatewaychmod +x rack-gatewaysudo mv rack-gateway /usr/local/bin/
# For ARM64curl -L https://github.com/docspring/rack-gateway/releases/latest/download/rack-gateway-linux-arm64 -o rack-gatewaychmod +x rack-gatewaysudo mv rack-gateway /usr/local/bin/# Download the Windows binaryInvoke-WebRequest -Uri "https://github.com/docspring/rack-gateway/releases/latest/download/rack-gateway-windows-amd64.exe" -OutFile "rack-gateway.exe"
# Move to a directory in your PATH, or add the current directory to PATHMove-Item rack-gateway.exe C:\Users\YourName\bin\Verify Installation
Section titled “Verify Installation”rack-gateway versionYou should see output like:
CLI version: v0.1.0Gateway version: (not connected)Rack version: (not connected)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)”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.
sudo 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.22 or later
- Git
-
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 to the latest version, simply re-run the download command for your platform, or rebuild from source with:
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