CLI Commands
This page documents all available commands in the rack-gateway CLI.
Global Flags
Section titled “Global Flags”These flags work with any command:
| Flag | Short | Description |
|---|---|---|
--rack | -r | Override the current rack |
--config | Override config directory | |
--api-token | Use API token for authentication | |
--mfa-code | Provide MFA code for step-up auth | |
--mfa-method | Specify MFA method (totp/webauthn) | |
--help | -h | Show help for a command |
Authentication Commands
Section titled “Authentication Commands”Authenticate with a gateway via OAuth.
rack-gateway login <rack-alias> <gateway-url>Arguments:
rack-alias- A name you choose for this rack (e.g.,production,staging)gateway-url- The gateway’s URL (e.g.,https://gateway.example.com)
Example:
rack-gateway login production https://gateway.example.comlogout
Section titled “logout”Revoke your session and remove local credentials.
rack-gateway logout [flags]Flags:
--rack, -r- Logout from a specific rack (default: current rack)
Example:
rack-gateway logoutrack-gateway logout -r stagingtest-auth
Section titled “test-auth”Test your authentication status.
rack-gateway test-auth [mfa|otp|webauthn]Example:
rack-gateway test-authrack-gateway test-auth mfarack-gateway test-auth webauthnRack Management Commands
Section titled “Rack Management Commands”Show current rack configuration.
rack-gateway rackOutput:
Current rack: productionURL: https://gateway.example.comUser: developer@company.comRole: deployerList all configured racks.
rack-gateway racksOutput:
RACK URL USER* production https://gateway-prod.example.com developer@company.com staging https://gateway-staging.example.com developer@company.comswitch
Section titled “switch”Switch to a different rack.
rack-gateway switch <rack-alias>Example:
rack-gateway switch stagingConvox Commands
Section titled “Convox Commands”These commands are proxied to the Convox rack API. They work the same as the native convox CLI commands.
List applications.
rack-gateway appsCreate a new build.
rack-gateway build [flags]Flags:
-a, --app- Application name-d, --description- Build description--manifest- Path to convox.yml (default:convox.yml)
Example:
rack-gateway build -a myapp -d "Deploy v1.2.3"builds
Section titled “builds”List builds for an application.
rack-gateway builds -a <app>deploy
Section titled “deploy”Deploy an application (build + promote).
rack-gateway deploy [flags]Flags:
-a, --app- Application name-d, --description- Deploy description--manifest- Path to convox.yml
Example:
rack-gateway deploy -a myappManage environment variables.
rack-gateway env [command] -a <app>Subcommands:
rack-gateway env -a <app>- List environment variablesrack-gateway env set VAR=value -a <app>- Set a variablerack-gateway env unset VAR -a <app>- Remove a variable
Example:
rack-gateway env -a myapprack-gateway env set DATABASE_URL=postgres://... -a myapprack-gateway env unset DEBUG -a myappExecute a command in a running process.
rack-gateway exec <process> <command> -a <app>Example:
rack-gateway exec web "rails console" -a myapprack-gateway exec web bash -a myappView application logs.
rack-gateway logs -a <app> [flags]Flags:
-f, --follow- Stream logs in real-time--since- Show logs since timestamp (e.g.,1h,30m)--filter- Filter logs by process type
Example:
rack-gateway logs -a myapp -frack-gateway logs -a myapp --since 1h --filter webList application processes.
rack-gateway ps -a <app>releases
Section titled “releases”List releases for an application.
rack-gateway releases -a <app>resources
Section titled “resources”List resources (databases, Redis, etc.).
rack-gateway resourcesrestart
Section titled “restart”Restart an application.
rack-gateway restart -a <app>Run a one-off process.
rack-gateway run <process> <command> -a <app>Example:
rack-gateway run web "rake db:migrate" -a myappScale application processes.
rack-gateway scale <process>=<count> -a <app> [flags]Flags:
--cpu- CPU units--memory- Memory in MB
Example:
rack-gateway scale web=3 -a myapprack-gateway scale worker=2 --memory 512 -a myappGateway-Specific Commands
Section titled “Gateway-Specific Commands”api-token
Section titled “api-token”Manage API tokens.
rack-gateway api-token [command]Subcommands:
list- List API tokens (admin only)get- Show a specific tokencreate- Create a new tokendelete- Delete a token
Example:
rack-gateway api-token listrack-gateway api-token get <token-id>rack-gateway api-token create --name "CI/CD" --role deployerrack-gateway api-token delete <token-id>deploy-approval
Section titled “deploy-approval”Manage deploy approval requests.
rack-gateway deploy-approval [command]Subcommands:
list- List pending approvalsapprove- Approve a requestrequest- Create a new approval requestshow- Show request detailswait- Wait for a request decision
Example:
rack-gateway deploy-approval listrack-gateway deploy-approval approve <request-id>rack-gateway deploy-approval show <request-id>rack-gateway deploy-approval request --app myapp --git-commit <sha> --message "Deploy"rack-gateway deploy-approval wait <request-id>gateway
Section titled “gateway”Show gateway server information.
rack-gateway gatewayOutput:
Gateway URL: https://gateway.example.comGateway Version: v0.1.0Rack Alias: productionversion
Section titled “version”Show version information.
rack-gateway versionOutput:
CLI version: v0.1.0Gateway version: v0.1.0Rack version: 3.18.4Open the gateway web UI in your browser.
rack-gateway webcompletion
Section titled “completion”Generate shell completion scripts.
rack-gateway completion <shell>Supported shells: bash, zsh, fish, powershell
Example:
rack-gateway completion bash > /etc/bash_completion.d/rack-gatewaysource <(rack-gateway completion zsh)Examples
Section titled “Examples”Common Workflows
Section titled “Common Workflows”Deploy to production:
rack-gateway deploy -a myapp -r productionCheck logs across environments:
rack-gateway logs -a myapp -r staging --since 1hrack-gateway logs -a myapp -r production -fScale for high traffic:
rack-gateway scale web=5 -a myapp -r productionRun migrations:
rack-gateway run web "rake db:migrate" -a myapp -r productionEmergency rollback:
rack-gateway releases -a myapp -r production# Note the previous release IDrack-gateway releases rollback <release-id> -a myapp -r productionGetting Help
Section titled “Getting Help”For any command, add --help to see available options:
rack-gateway --helprack-gateway deploy --helprack-gateway env --help