The CLI is configured via the wp config set command or environment variables. Settings are persisted to ~/.config/watchplane/config.json.
Configuration options
| Option | Env variable | Description |
|---|---|---|
--token | WATCHPLANE_TOKEN | API token (wp_* prefix) |
--project-id | WATCHPLANE_PROJECT_ID | Default project ID for monitor commands |
--base-url | WATCHPLANE_BASE_URL | API base URL (default: https://api.watchplane.com) |
--output | WATCHPLANE_OUTPUT | Output 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