Skip to content

What is cca?

cca (Claude Code Analyzer) reads the transcripts Claude Code writes to your own machine and tells you three things:

  1. How many tokens you have used, split by how each kind is billed.
  2. What that would have cost at Anthropic’s published API prices.
  3. Roughly how much water that implies — a deliberately soft, playful figure.

It is a tool for curiosity and awareness. It is not an accounting system, and it is careful to say so wherever it prints a number.

If you use Claude Code through API billing rather than a subscription, the figure is much closer to what you actually pay — but still an estimate, for the reasons set out in Accuracy and limits.

Claude Code stores one JSON object per line under:

~/.claude/projects/<slugified-working-directory>/<session-id>.jsonl

Sub-agent sessions nest two levels deeper:

~/.claude/projects/<slug>/<session-id>/subagents/agent-<id>.jsonl

cca streams those files, keeps the assistant records that carry token accounting, deduplicates them, and prices the result. Nothing else on your machine is touched. See Privacy.

  • Seeing which projects and sessions consume the most.
  • Watching usage per day, to spot the week a refactor got expensive.
  • Comparing models — how much of your spend is Opus versus Haiku.
  • Feeding a spreadsheet or a script through --json and --csv.
  • What you were actually charged, if you are on a subscription.
  • Usage from other machines — it only sees the transcripts on this one.
  • Anything about turns Claude Code did not record. See Accuracy and limits.