cc-statistics CLI
Token and cost reports across Claude Code, Gemini CLI, Codex and Cursor in one view, built from local logs with no keys.
- 117 ★ on the repository
- Last commit
Extended access
Why this level
- The tool reads local logs of all sessions, and a webhook sends a summary to an external address.
Install
- Works in
In your terminal, with SkillFoxx CLI
npx skillfoxx add cli/cc-statisticsDetects the agents on your machine, shows the access level and pins the version.
Other ways to install
Access and checks
How we reviewExtended accessThe tool runs code or makes network calls and only reads external data.
- The tool reads local logs of all sessions, and a webhook sends a summary to an external address.
This is third-party code. Review the repository files before installing.
What it does
cc-statistics reads the local session logs of four tools and merges them into one picture: tokens and estimated cost by model, the most frequent tool, MCP and skill calls, agent working time against user waiting time, and code changes by language. The `cc-stats` command prints a report for a period, compares projects, searches sessions by keyword and prints a command to resume them. The `cc-stats-app` app keeps a token and cost counter in the macOS menu bar, while a web dashboard suits Linux and Windows. Weekly and monthly reports can go to Slack, Feishu or DingTalk.
Who it is for. People who use several agents at once and want to know total spend, the costliest projects and how fast a limit is approaching.
Good fit when
- The month ended and the combined total across four tools is unknown.
- A subscription limit runs out early and you need to see which project spends most.
- An old Claude Code session must be found by keyword and resumed.
- A team wants a weekly spend report in its work chat.
Not a fit when
- You need the exact amount from a provider invoice: cost here is an estimate from built-in prices.
- You must count spend with no macOS app and no Python 3.10.
- You need accounting by API key tokens rather than local logs.
Example request
Show spend across all agents for the last week and name the project that spent most.Limitations
Figures are estimates: they come from a built-in price list and local logs, not an invoice. Python 3.10 or newer and at least one already-used tool are required. The native menu-bar app exists only on macOS; Windows has a development preview of a tray build. Webhook mode sends the summary to the address you give, so avoid private data there. The last commit dates from October 2026.
How to disable. Remove the package with `uv tool uninstall cc-statistics` or `pipx uninstall cc-statistics` and quit the menu-bar app. Clean webhooks and configuration separately.
FAQ
Which tools does it count?
Claude Code, Gemini CLI, Codex CLI and Cursor. The `--all` flag merges all platforms into one report; without it, sessions of the current directory are counted.
Where does data go?
Nowhere. Logs are read locally and no keys are needed. The exception is a webhook: you send its summary to the address you choose.
How do I get a weekly report?
Run `cc-stats --report week`. To send it to a chat, add `--notify` with a Slack, Feishu or DingTalk webhook address.
How do I resume a found session?
Search shows the time and a ready resume command such as `claude --resume`. Copy it into the project's terminal.
Does it work on Windows?
The web dashboard works; `desktop/cc-stats-tauri` also holds a development preview of a tray build. The native menu-bar app is macOS only.
Discussion
No questions or reviews yet.
Related
CLI toolsTokscale
tokscale
A CLI with an interactive TUI that tracks token usage and cost across AI coding agents: Claude Code, Codex, Copilot, Cursor and more
A local dashboard for Claude Code, Codex CLI, Gemini CLI, Copilot and OpenCode that shows tokens, cost, latency and errors
Shows what Claude Code and Codex actually send to the API: it captures local traffic and splits tokens and cost by source
Claude Usage
claude-usage
A local dashboard from Claude Code logs: tokens, models, sessions and projects. For Pro and Max subscribers it shows the full picture instead of a gauge
Token Monitor
token-monitor
A desktop widget for tracking tokens, cost and limits across 43 or more tools: Claude Code, Codex, Cursor, OpenRouter and others, for Windows and macOS
Local proxy between Claude Code and Anthropic that fixes prompt-cache misses, stabilizes the request prefix and shows quota use in the status line
Comparison with similar tools
Cards that share the main search query, and how they differ.
| Tool | Official | Repository stars | Main difference |
|---|---|---|---|
| cc-statistics (this card) | no | 117 | |
| ccusage | no | 19,337 | token reports from logs; cc-statistics adds a macOS menu-bar app, session search and chat reports |
| Claude Code Usage Monitor | no | 8,791 | a terminal monitor for Claude Code in a window; cc-statistics counts four tools and forecasts quota exhaustion |
README in short
One-command install, no configuration needed. Reports, project comparison, limit alerts and a quota-exhaustion forecast work in the terminal, the macOS app and the web dashboard.