cvm CLI is the terminal interface for Caveman Cloud. It wraps every control plane operation so you can list projects, search traces, run SQL, start improvement attempts, and drive evals without leaving your shell.
Install and sign in
1
Install the CLI
2
Sign in
cvm login runs caveman login under the hood. One sign-in works for both the caveman and cvm CLIs. If caveman is not installed, cvm login fetches it once with npx.3
Verify the session
Project binding and context
Mostcvm commands target a project. You can set the project in several ways, checked in this order:
--project UUIDon the command lineCAVE_PROJECT_IDenvironment variablecvm context bind(writes.caveman-cloud.jsonin the current repository)- Your saved default project
Output formats
Override the default with--format:
Discover commands
cvm commands ship with the Cloud release they were built from, so the command list always matches the server. Commands follow the pattern cvm <family> <verb>, which runs the Cloud operation family.verb.
cvm tools describe <family>.<verb> before writing scripts. It prints the input schema, required permissions, effects, and retry rules for that operation.
Common command examples
Traces
payload:read permission and trace:read_payload scope. Without them, metadata reads still work but content is omitted.
SQL
columns, rows, row_count, truncated, elapsed_ms, query_digest, and notices. Agent connections and sql:read keys are limited to 101 rows, 128 KiB, and 15 seconds. People get up to 10,000 rows, 8 MiB, and 30 seconds.
Ask Caveman and improvements
{"request_id": "...", "input": {"question": "...", "window": {"from": "...", "to": "..."}}}. Preserve the run ID to inspect results later with runs.get, runs.events, and runs.result.
Credential storage and CI
Non-secret config lives at~/.caveman-cloud/config.json with mode 0600. Auth tokens are stored in the OS keychain when available, with a ~/.caveman/credentials fallback.
In CI, set CAVE_TOKEN instead of running an interactive login. For a private install, also set CAVE_API_URL. If cvm is signed out, commands exit with code 3 instead of hanging.
Exit codes
Next steps
Query with SQL
Run read-only SELECT over requests, spans, and evals.
Traces and spend
Search traces, inspect spans, and understand spend attribution.
Connect a coding agent
Use MCP to let Claude Code or Cursor operate Caveman Cloud.