CLI & agents
CLI reference
The commoncompute command wraps the Python SDK: authentication, quotes, submission, account state, and an interactive playground — all scriptable. Install it with pip install 'commoncompute[cli]' (see Install the SDK).
The command is commoncompute — there is no cc binary. A short cc command would shadow the system C compiler at /usr/bin/cc and break C builds, so we don't install one. If you want the shorthand, opt in yourself with alias cc="commoncompute" in your shell profile.
A Node CLI ships with npm install -g @commoncompute/sdk. It mirrors the core commands and adds commoncompute mcp serve — see the MCP server page.
Authentication
bash
commoncompute login # browser device flow
commoncompute login --no-browser # print the URL + code instead of opening a browser
commoncompute login --api-key cc_live_… # paste a key directly
commoncompute whoami
commoncompute logout
Credentials are stored at ~/.config/commoncompute/credentials. CC_API_KEY in the environment always wins over a stored login.
Discover and price
bash
commoncompute workloads # workload catalog with live status
commoncompute models # model catalog
commoncompute quote coreml_embed --units 1000
commoncompute balance
commoncompute tier
commoncompute estimate is a deprecated alias for commoncompute quote — it still works, but prints a warning and will be removed.
Submit jobs
bash
commoncompute submit coreml_embed --payload '{"input":["hi"]}' --wait
commoncompute submit whisper_ane --payload @request.json --model whisper-large-v3
cat request.json | commoncompute submit vt_transcode --payload @- --priority batch --timeout 600- --payload takes inline JSON, @file to read a file, or @- to read stdin
- --model and --priority override the workload defaults
- --wait blocks until the job reaches a terminal state; --timeout bounds the wait in seconds
Bulk submission
bash
commoncompute submit-many coreml_embed jobs.jsonl --max-concurrent 8 > results.ndjson
submit-many reads one payload per JSONL line and writes one NDJSON line per job as it completes, so you can pipe into jq or a downstream loader while the batch is still running.
Inference one-liners
bash
commoncompute chat "what is apple silicon?"
commoncompute embed "hello world"
Jobs, keys, receipts
bash
commoncompute jobs list
commoncompute jobs get JOB_ID
commoncompute jobs wait JOB_ID
commoncompute jobs events JOB_ID
commoncompute jobs download JOB_ID
commoncompute keys list
commoncompute keys create --name my-app
commoncompute keys revoke KEY_ID
commoncompute receipts list
commoncompute receipts get RECEIPT_ID
commoncompute receipts export
Usage and spend
bash
commoncompute usage --start 2026-07-01 --end 2026-07-19 --group-by workload
commoncompute spend --days 30
Configuration
bash
commoncompute config path # where config lives
commoncompute config show
commoncompute config set base_url https://api.commoncompute.ai
commoncompute config set org org_…
commoncompute config unset org
Environment variables override stored config: CC_API_KEY, CC_BASE_URL, CC_ORG, and CC_CONFIG_DIR (moves the config + credentials directory).
Playground
bash
commoncompute playground
An interactive session for poking at workloads without writing a script — pick a workload, edit the payload, submit, and watch events stream.
Scripting
- --json on any data command emits stable JSON, ready for jq or a shell-out agent
- Exit codes: 0 success, 1 error, 2 usage error or missing credentials, 3 job failed
- commoncompute --install-completion sets up shell completion for your shell
- Want the old shorthand? alias cc="commoncompute" in your shell profile — just be aware it will shadow the C compiler in that shell