Open source contribution · Rust · CLI · AI Tooling
viniciusdsandrade/ ccusage
High-performance Rust CLI tool for real-time tracking and auditing of AI agent token usage, session metrics, and API costs.
- 1 PR under review
- 1 commit to the project
- +9 lines added
- Oct 21, 2026 first PR
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
These PRs are under review by the maintainers and have not been merged yet. Click one to see the problem, the proposal and the expected value.
-
#1opened Oct 21, 2026Under review Mapping for Claude Opus 5.5 model identifier in the AI usage CLI Sessions running Claude Opus 5.5 triggered unpriced model warnings and zeroed costs; the PR proposes mapping the ID for accurate token pricing.
- The problem
- The CLI tool tracks token consumption and monetary costs across artificial intelligence models in local development workflows. When inspecting transcripts from sessions using Claude Opus 5.5, the parser failed to recognize the internal numerical model identifier and fell back to an uncataloged placeholder. Lacking pricing metadata for that placeholder, the utility emitted repetitive warning notices and reported zero financial expenditure in summary tables.
- What the PR proposes
- The PR proposes mapping the numeric identifier for Claude Opus 5.5 and normalizing placeholder variations directly within the transcript parser. This normalization links tracked usage to the standard model catalog, computing accurate token expenditures for prompt and completion tokens. The update includes unit test coverage validating ID parsing and name normalization across model aliases.
- Expected value
- Ensures developers and engineering teams accurately monitor expenses and token allocations when deploying coding agents powered by Claude Opus 5.5.
Figures updated on Oct 21, 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.