Deploy with the CLI

Repeatable, scriptable deploys from your terminal or CI pipeline.

The CLI drives the same platform as the dashboard, and is the right tool for anything you want to repeat: deploys from CI, environment promotion, scripted setup.

Install and authentication are covered in CLI install and authenticate.

Set your context once

Most commands accept --org and --project, but setting them once is less noisy:

bash
guidal orgs list
guidal projects list
guidal projects switch my-app

Confirm what you are pointed at:

bash
guidal context set

Create and deploy

bash
guidal services create api \
  --image ghcr.io/your-org/your-app:v1 \
  --port 8080

Deploy a new image to an existing service:

bash
guidal services deploy api --image ghcr.io/your-org/your-app:v2

Inspect what is running:

bash
guidal services get api
guidal services list

Configuration

bash
guidal env set DATABASE_POOL_SIZE=20 --service api
guidal env list --service api
guidal env delete DATABASE_POOL_SIZE --service api

Import a whole file at once:

bash
guidal env import .env.production --service api

Secrets use a parallel set of commands and are never printed back:

bash
guidal secrets set STRIPE_API_KEY --service api
guidal secrets list --service api

Scaling and rollback

bash
guidal services scale api --replicas 3
guidal deployments list --service api
guidal deployments rollback --service api

Logs and metrics

bash
guidal logs query --service api
guidal logs deployment --service api
guidal metrics service api

Deploying from CI

CI cannot open a browser, so it authenticates with an API key instead of guidal login. Create one, store it as a secret in your CI provider, and export it as GUIDAL_ACCESS_TOKEN:

bash
guidal api-keys create ci-deploy

A minimal deploy step then looks like this:

bash
export GUIDAL_ACCESS_TOKEN="$GUIDAL_TOKEN"
guidal services deploy api \
  --image ghcr.io/your-org/your-app:"$GIT_SHA" \
  --project my-app

See API keys for scoping and rotation.

Exit codes are stable

The CLI returns distinct exit codes for distinct failures — authentication, not-found, quota, and plan restrictions each have their own. Scripts can branch on them instead of parsing output. The full map is in Troubleshooting.

Discovering commands

Every command and subcommand documents itself:

bash
guidal --help
guidal services --help

All commands lists the full surface.