CLI Configuration

All configuration options for the Watchplane CLI.

The CLI is configured via the wp config set command or environment variables. Settings are persisted to ~/.config/watchplane/config.json.

Configuration options

OptionEnv variableDescription
--tokenWATCHPLANE_TOKENAPI token (wp_* prefix)
--project-idWATCHPLANE_PROJECT_IDDefault project ID for monitor commands
--base-urlWATCHPLANE_BASE_URLAPI base URL (default: https://api.watchplane.com)
--outputWATCHPLANE_OUTPUTOutput format: table, json, yaml

Setting options

wp config set --token wp_abc123
wp config set --project-id proj_abc
wp config set --output json
wp config set --base-url https://watchplane.example.com

Multiple options can be set in one command:

wp config set --token wp_abc123 --project-id proj_abc --output table

Viewing current config

wp config get

Output:

token      wp_abc123...  (set)
projectId  proj_abc      (set)
baseUrl    https://api.watchplane.com (default)
output     table         (default)

Environment variables

Environment variables take precedence over the config file. Useful for CI/CD:

WATCHPLANE_TOKEN=wp_abc123 wp monitors list

Or export them in your shell profile:

export WATCHPLANE_TOKEN=wp_abc123
export WATCHPLANE_PROJECT_ID=proj_abc

Output formats

table (default)

Human-readable table output:

ID           NAME              STATUS  INTERVAL
mon_abc123   API health check  up      60s
mon_def456   Database TCP      up      120s

json

Machine-readable JSON for piping to jq:

wp monitors list --output json | jq '.[].id'

yaml

YAML output for use with infrastructure tools:

wp monitors list --output yaml

Per-command overrides

Any config option can be overridden for a single command:

wp monitors list --project-id proj_other --output json
Documentation