Configuration

Configure shipctl with a TOML file, environment variables, or flags.

Config file location

shipctl looks for configuration in this order:

  1. The path passed with --config
  2. ./shipctl.toml in the current directory
  3. ~/.config/shipctl/config.toml

Example shipctl.toml

[project]
name = "my-app"
build = "npm run build"
output = "dist"

[env.staging]
target = "k8s://staging-cluster/my-app"
replicas = 1

[env.production]
target = "k8s://prod-cluster/my-app"
replicas = 3
require_approval = true

[healthcheck]
path = "/healthz"
timeout = "30s"

Project settings

KeyTypeDescription
namestringProject identifier used in releases
buildstringCommand run before every deploy
outputstringDirectory containing build artifacts

Environments

Each [env.<name>] table defines a deploy target.

target

A URI of the form scheme://host/path. Supported schemes: k8s, ssh, s3.

replicas

Number of instances to run. Defaults to 1.

require_approval

When true, deploys pause for interactive confirmation unless --yes is passed.

Health checks

After a deploy, shipctl polls healthcheck.path until it returns 2xx or timeout elapses. On timeout it exits with code 3.

Environment variables

VariableDescription
SHIPCTL_TOKENAPI token for authenticated targets
SHIPCTL_ENVDefault value for --env
SHIPCTL_CONFIGDefault value for --config
NO_COLORDisable colored output

Precedence

Flags override environment variables, which override the config file.

Security: never commit SHIPCTL_TOKEN to shipctl.toml. Keep it in your CI secret store.