ccusage: see what your coding agents cost
Added New⧉ Copyable prompt below
Our verdict
Useful the moment you run agents daily and want to know where tokens go, by day, session or Claude Code 5-hour window. It reads local data, so there is nothing to sign up for. Costs are estimates from local logs; your provider's billing page is the source of truth.
- Who it's for
- Heavy users of terminal coding agents on subscriptions or API keys
- Leverage
- Spend visibility without a dashboard
- Effort
- Low
- Date added
What it does
ccusage analyses token usage and costs from local data written by coding-agent CLIs, including Claude Code, Codex, OpenCode, Amp, goose, Gemini CLI and GitHub Copilot CLI, and turns it into daily, weekly, monthly and session reports. It also reports Claude Code 5-hour billing windows and offers a beta status line for Claude Code.
How builders use it
- Run npx ccusage@latest for a combined daily report across detected tools.
- Use ccusage claude daily or ccusage codex daily to focus on one agent.
- Check ccusage blocks before a long Claude Code session to see how much of the window is left.
- Compare sessions to spot which tasks burn the most tokens.
What to expect
You can see which tools and tasks drive your agent spend and adjust before the bill or the limit surprises you.
Copy this: Commands
npx ccusage@latest # all detected tools, by day
npx ccusage@latest session # by session
npx ccusage@latest claude daily
npx ccusage@latest blocks # Claude Code 5-hour windowsRelated discoveries
- ToolMulti-Step Agent Setups
E2B sandboxes for agent code execution
Secure cloud environments where agents can run code and tools.
Effort: Medium#GitHub repo#Open source
- ToolMulti-Step Agent Setups
Langfuse: tracing and evals for agents
Open-source tracing and evaluation so you can see what your agent actually did.
NewEffort: Medium#GitHub repo#Open source
- ToolMulti-Step Agent Setups
LangGraph
Low-level framework for stateful, controllable agent workflows.
Effort: High#Open source
- Use caseMulti-Step Agent Setups
12-Factor Agents
Principles for LLM software good enough to put in front of customers.
Effort: Low#GitHub repo
Want more like this?
Practical discoveries, without the noise.