The receipt printer for your AI coding habit
A Rust CLI that reads local agent logs and tells you exactly how much Claude, Codex, and a dozen other coding assistants are costing you.

What it does
ccusage scrapes local data files left behind by coding-agent CLIs—Claude Code, Codex, GitHub Copilot CLI, Gemini CLI, and roughly a dozen others—and rolls the token counts into daily, weekly, monthly, or per-session cost reports in USD. It runs fully offline once pricing data is cached, and it can narrow or widen the view with date ranges, per-model breakdowns, and project-level grouping for Claude Code instances.
The interesting bit
The tool is essentially a polyglot log parser with a ledger attached. The clever part is the breadth of sources it normalizes: every agent stores usage differently, yet ccusage unifies them into the same table format. It even tracks Claude’s 5-hour billing windows and exposes a compact status-line mode for shell hooks, so your terminal can quietly shame you in real time.
Key highlights
- Supports 15 coding-agent CLIs, from mainstream (Claude, Codex, Copilot) to niche (OpenClaw, pi-agent, Hermes Agent)
- Outputs colorful tables, compact tables for narrow terminals, or raw JSON for piping elsewhere
- Offline-capable via locked LiteLLM pricing snapshots; Nix builds embed the price list at compile time
- Per-model cost breakdowns, cache-token tracking, and timezone-aware date grouping
- Configuration files with IDE autocomplete for setting personal defaults
Caveats
- The status-line integration is marked Beta
- Some sources (e.g.,
pi-agent) require manual path hints if you store logs outside the default location
Verdict
Worth a look if you juggle multiple AI coding tools and want a single pane of glass for your spend. If you only use one agent and already trust its built-in dashboard, this adds little.