checkrd

CLI overview

Manage agents, policies, keys, and live decisions from the terminal. The Checkrd CLI is the same surface as the dashboard — scriptable.

CLI overview

checkrd is a single static binary for managing the Checkrd control plane from the terminal. Anything you can do in the dashboard you can do with checkrd: create agents, publish policies, rotate API keys, flip the kill switch, tail decisions live.

The CLI talks to the same /v1/* REST API as the dashboard, with the same RBAC, the same audit log, and the same idempotency guarantees.

Install

bash
brew install checkrd-io/homebrew-tap/checkrd-cli
# or
curl -fsSL https://checkrd.io/install.sh | sh

See Install for the full matrix (Homebrew, shell installer, manual download), checksum verification, and shell completions.

First run

bash
checkrd login                          # browser-based auth
checkrd agents list                    # see your agents
checkrd policies publish my-agent.yaml # ship a policy
checkrd events tail --agent my-agent   # live decisions

checkrd login opens your browser, signs you in via WorkOS, and stores a long-lived API key in your OS keychain. Set CHECKRD_API_KEY in CI to skip the browser flow — the CLI checks the environment before the keychain.

Common commands

CommandWhat it does
checkrd agentsCreate, list, get, kill-switch agents
checkrd policiesValidate, publish, diff, test, analyze policies
checkrd keysCreate, list, revoke API keys
checkrd eventsTail or query the decision stream
checkrd alertsManage alert rules
checkrd audit-logQuery the org audit log
checkrd orgsSwitch between organizations
checkrd login / logoutManage stored credentials
checkrd debugCollect a support bundle
checkrd docsOpen these docs in your browser

Every command supports --help. The full reference is in Commands.

Configuration

The CLI reads configuration in this order (later wins):

  1. Built-in defaults (https://api.checkrd.io, no agent).
  2. ~/.checkrd/config.toml.
  3. Environment variables (CHECKRD_API_KEY, CHECKRD_BASE_URL, CHECKRD_AGENT_ID, CHECKRD_ORG_ID).
  4. Command-line flags.

See Configuration for the complete schema.

Output formats

Default output is human-formatted (tables, colors, ANSI). For scripts, pass --output json:

bash
checkrd agents list --output json | jq '.[] | select(.status == "active")'

JSON output is stable: fields are documented, deprecations follow the same SemVer policy as the SDK. Use it freely in CI.

Exit codes

The CLI follows BSD sysexits.h conventions so scripts can react without parsing stderr:

CodeMeaning
0Success
1Generic API error (4xx that's not auth)
64Bad input (malformed flag, invalid JSON)
70Internal CLI error (file an issue)
75Temporary failure — safe to retry (network, 5xx)
77Authentication problem

Example: a CI job that retries on transient failures only:

bash
checkrd policies publish sales-agent ./policy.yaml || (
  code=$?
  if [ "$code" = "75" ]; then
    sleep 30 && checkrd policies publish sales-agent ./policy.yaml
  else
    exit $code
  fi
)

Telemetry

The CLI sends anonymous usage telemetry by default (command names, exit codes, durations — no arguments, no payloads). Disable per-run with CHECKRD_CLI_TELEMETRY=off or persistently with checkrd telemetry off. See Telemetry for the exact schema and the verification recipe.

Where to next

  • Install — set up the binary, verify it
  • Authentication — login flow, CI keys, keychain
  • Commands — every subcommand and flag
  • Configuration — config file format and env vars
  • Recipes — copy-paste workflows (CI publish, fleet rotation, on-call drills)
  • Dev mode — run a local control plane for testing