Open source contribution · Rust · CLI · AI Tooling

ccusage/ccusage

High-performance Rust CLI tool for real-time tracking and auditing of AI agent token usage, session metrics, and API costs.

  • 1 merged PR
  • +6.1k lines added
  • 19.4k GitHub stars
  • Oct 22, 2026 first PR

See every PR Repository on GitHub

The project

ccusage is a high-performance command-line utility written in Rust, built to calculate, aggregate, and audit token usage and financial costs generated by AI workflows.

By parsing local session logs and execution traces from AI coding agents, it delivers daily and weekly consumption breakdowns, helping engineering teams manage LLM budgets with precision.

How each PR was made

  • One problem per PR

    Each PR fixes a single thing with the smallest possible change. That keeps reviews simple, lowers the risk of side effects and lets one change be reverted without taking others with it.

  • The problem becomes a test

    Fixes come with automated tests that cover the case that used to fail, so the problem cannot come back unnoticed.

  • The project's own bar

    Formatting, static analysis and the full test suite run in the project's continuous integration, and a change only lands after the maintainer's review.

  • Written for the reviewer

    Each PR description explains the problem, the change and how it was tested, so the maintainer can decide with confidence.

Every PR, in business terms

Click a PR to see the problem, what was done and the value delivered. The link at the end of each one leads to the full technical discussion on GitHub.

  1. #1948merged by the maintainer, co-authored, Oct 22, 2026 Claude Opus 5.5 cost in Antigravity no longer shows as zero Claude Opus 5.5 sessions in Antigravity showed zero cost and a missing-pricing warning. The problem was reported in issue #1947, with a reference fix, and the maintainer resolved it in PR #1948, which credits Vinícius as co-author.
    The problem
    ccusage computes token usage and cost for AI agents from each tool's local records. Antigravity identifies Claude Opus 5.5 by an internal numeric code (1402) that ccusage did not know, so it fell back to a placeholder name with no price table. In the reports, those sessions showed a cost of $0.00 and the tool printed a missing-pricing warning, hiding the real spend of anyone using that model.
    What was done
    Issue #1947 pinpointed the root cause, code 1402 left unmapped in the Antigravity reader, and came with a reference fix and tests on a branch of Vinícius's fork: map the code and the placeholder name to Claude Opus 5.5, which the tool's pricing catalog already contains. The maintainer merged the fix in PR #1948, with tests that check the mapping, the calculated cost and the loading of real records into the daily, weekly, monthly and per-session reports, and credited Vinícius as co-author of both commits.
    Value delivered
    Anyone using Antigravity with Claude Opus 5.5 now sees the real session cost in the reports, without missing-pricing warnings, and teams tracking AI budgets stop underestimating spend on that model.

Figures updated on Nov 14, 2026.

The same care in your system

The habits behind these PRs carry over to backends that move money: reproduce the problem before fixing it, prove the fix with a test and keep sensitive data from leaking.

Talk to Vinícius Home