ccusage
A local CLI tracks coding agent token usage and costs across Claude Code, Codex and other tools, with combined reports and offline pricing data.

ccusage is a local command-line tool for developers who want to see how many tokens their coding agents use and what that usage costs. It reads the agents' local usage records, so you can compare activity across tools in one place.
- Combined usage reports: Review daily, weekly, monthly or session totals across detected agents, or focus on Claude Code, Codex, OpenCode, GitHub Copilot CLI, Gemini CLI and other supported tools.
- Model and cache breakdowns: See usage and costs by model, with separate counts for cache creation and cache reads, and supply custom model pricing when needed.
- Project analysis: Group Claude Code usage by project or filter to a specific project, then narrow reports to a date range with timezone-aware grouping.
- Claude billing windows: Track usage within Claude Code's five-hour billing windows and monitor the active window.
- Tables and exports: Read reports in terminal tables that adapt to narrow displays, or export structured JSON for further analysis; cost fields can be hidden in either format.
The tool runs on your own machine and is open source under the MIT license. Its offline mode uses cached pricing data, so reports can run without a network connection once that data is available. It analyzes records from coding agents rather than running AI models itself.