cairn is a thin client of the HTTP API: each command is one request
(or two, when it follows a 503 to the leader). It prints a readable table by default and the raw
JSON with --json.
When a node answers 503 with a leader, cairn resends the request there once.
Exit codes: 0 success; 1 the request failed (the CLI prints the HTTP status and the error
message); 2 wrong usage (the CLI prints the usage text); 3replay --bundle found a mismatch.
Prints the result of a workflow’s run, found by its workflow id. Without --attach it does not wait
(GET /workflow/.../output); with it, it waits (POST /workflow/.../attach).
cairn-ctl is a separate tool that works on the bucket directly, without a running node. It takes
the store like a node does (--main-store URI or --data-dir DIR, optional --wal-store and
--prefix) and the bucket credentials from the environment.
Check the bucket’s invariants; exit code 1 on findings. --deep also checks that every data file a range’s manifest names is present (one listing per range). By default it also looks for cross-range calls that lost a message; --no-restore-checks turns that off.
table show, owners, ranges retired, wal floors, range dump <id>
Read-only views of the range table, ownership records and data.
cluster status
Cluster version, gates and live sessions.
cluster enable-<gate> --apply
Turn on a one-way feature gate after every node is upgraded.
table restore [--force] --apply
Rebuild a lost range table from its newest saved version, only when the rest of the bucket proves it is the last one. Every node must be stopped.
keys create <tenant> <role> --apply
Create an API key directly in the bucket.
identity publish|activate|retire <tenant> --apply
Rotate a tenant’s request-signing key.
pricing, pricing set <model> <input> <output> --apply
The token price table, in micro-USD per million input and output tokens (0 0 removes a model).
Copy the cluster under another prefix for investigation, with live artifacts by default.
intent clear <range>, range force-retire <id>
Repair a stuck split or merge.
Option
Meaning
--backup-env-prefix P
The backup store (--to of backup, backup list and backup prune, --from of restore) takes its credentials, endpoint and region only from P-prefixed AWS_* variables, for example CAIRN_BACKUP_AWS_ACCESS_KEY_ID. Without it, the backup store uses the same AWS_* variables as --main-store.
--report-to-bucket ID
Also write the result (the JSON of --json, the exit code, the error; no secrets) to the cluster’s bucket, readable with a provision key at GET /admin/ops-reports/{ID}. Only for backup, backup list, backup prune, restore, cluster status, cluster enable-* and table restore. ID is 1 to 128 characters of A-Za-z0-9-_. and must be new for each run.
--who NAME
Who is running the command, recorded in the bucket’s audit log (default $USER@$HOST).
--json
Print JSON.
Commands that write run dry unless you add --apply. Exit codes: 0 done, 1verify found
problems, 2 bad arguments, 3 refused, 4 store error. See
Backup and restore.