Docs CLI

coding.sh usage

Tokens, cost, turns and cache hits by agent, model or day. Every option of coding.sh usage, from its own --help.

coding.sh usage --help
coding.sh usage [options]

  Tokens, cost, turns and cache hits by agent, model or day

Options
      --by <GROUP>     Group rows by (default: agent)
      --cache          Prompt-cache economics instead: hit rate, read vs write tokens, read:write ratio, breaks and their cost, with what to change
  -a, --agent <AGENT>  Only sessions from this agent (repeatable, or a comma list: a,b)
      --since <WHEN>   Only at or after this time: 7d, 12h, 30m, today, yesterday or a date. A date without a zone is local time: 2026-11-09 is local midnight (default: 30d)
  -n, --limit <N>      Maximum rows (default: 20)
      --reprice        Recompute estimated costs from the current price table first
      --baseline       With --by agent or agent-model: a VS PUBLISHED column, each agent's published prompt-cache hit rate (Requesty, Apr 2026) and the points yours is above or below it; - for an agent the dataset does not list
      --where <QUERY>  Only sessions matching a query, e.g. 'agent:codex cost>0.5 tool:Bash -flag:compaction' (keys: coding.sh sessions --help)
      --fresh          Wait for every pending capture to be ingested (default: answer after 1.5 s)

Examples
  coding.sh usage
  coding.sh usage --baseline
  coding.sh usage --cache --by model

Notes
  Totals cover every session in the window. A scan that stops at 100,000 sessions says so under the table (Stopped after 100,000 sessions) and sets window.truncated in --json; cache doctor does the same.

All commands · Global options