claudekit / tools / ccusage
[ Tool · Claude Code Utilities ]

ccusage

A CLI tool that analyzes your Claude Code token usage and cost across daily, monthly, session, and 5-hour billing windows.

ryoppippi/ccusage ·updated
$ npx ccusage@latest copy

What it does

ccusage reads the local JSONL files Claude Code writes per session and turns them into readable reports — daily, weekly, monthly, per-session, and per 5-hour billing window — so you can actually see how tokens and cost are trending.

Features

  • Multiple report views — daily, weekly, monthly, session, 5-hour billing window
  • Per-model breakdown — see token spend by Opus vs. Sonnet vs. Haiku
  • Cost estimation — USD cost based on current pricing
  • Zero setup — reads local JSONL, no auth or API needed
  • Fastnpx ccusage@latest and you have a report

Use cases

  1. Check monthly token usage and cost for budget planning.
  2. Monitor per 5-hour block consumption to avoid hitting limits.
  3. Compare session-by-session consumption to refine your prompting strategy.

When to use it

  • Monitor daily spend during a heavy coding push
  • Compare model usage ratios before switching defaults
  • Spot anomalies (e.g. a runaway session) after the fact
§ 5

See also

same category · curated
[01]
[Tool] Herdr · A terminal-native agent multiplexer in a single Rust binary. Herdr combines tmux-style session persistence and pane splits with agent awareness — a sidebar that shows whether each pane's agent is idle, working, blocked, or done — for Claude Code and other CLI agents. The direct Claude Code integration (`herdr integration install claude`) adds full state detection, semantic state forwarding over a local socket API, and agent-session restoration after a server restart.
tool · claudekit.io / tools / herdr
[02]
[Tool] CC Workflow Studio · Design workflows on a canvas in VS Code and export them as Markdown your AI agent already understands — skills, commands, and agents for Claude Code, Cursor, Copilot, and more. An MCP server runs in the background so you can refine workflows in natural language with 'Edit with AI'.
tool · claudekit.io / tools / cc-wf-studio
[03]
[Skill] Find Skills · A meta-skill that activates when users ask "how do I do X" or "is there a skill that can…", then searches the open agent skills ecosystem and walks the user through installation.
tool · claudekit.io / tools / find-skills
§ 6

Frequently Asked Questions

frequently asked
§ 6.1
What is ccusage?
A CLI that analyzes Claude Code's local JSONL session files to report token usage and cost across daily, weekly, monthly, per-session, and 5-hour billing windows.
§ 6.2
Where does it run?
Wherever you use Claude Code.
§ 6.3
How do I install it?
Run `npx ccusage@latest` — no install required.
§ 6.4
What can it do?
Multiple report views (daily/weekly/monthly/session/5-hour billing window), per-model token tracking (Opus, Sonnet, etc.), USD cost calculation, separate tracking of cache-create vs cache-read tokens, JSON output, and MCP server integration.
§ 6.5
When is it most useful?
Budget management with monthly token spend, 5-hour block monitoring to avoid limit overruns, and per-session comparisons to refine prompting strategy.