Track token usage and costs across Claude Code sessions
npx claudepluginhub robbedoo/claude-token-trackerTrack token usage and costs across Claude Code sessions with daily/weekly summaries
A Claude Code plugin that tracks token usage and dollar costs across sessions.
claude plugin add robbedoo/claude-token-tracker
/token-tracker:token
Displays a summary like:
╭────────────────────────────────────────────────╮
│ Claude Token Tracker │
├────────────────────────────────────────────────┤
│ Today 42,300 tokens $1.85 (2 sess) │
│ Week 318,000 tokens $12.40 (9 sess) │
├────────────────────────────────────────────────┤
│ By model (week): │
│ opus-4-6 $11.20 (90%) │
│ sonnet-4-6 $1.20 (10%) │
├────────────────────────────────────────────────┤
│ Project: cresly │
│ Today $1.85 • Week $8.60 │
╰────────────────────────────────────────────────╯
~/.claude/stats-cache.json~/.claude/token-usage.json/token-tracker:token reads the store and prints a formatted summaryAll data is stored locally in ~/.claude/token-usage.json. Nothing is sent externally.
Model pricing is bundled in config/pricing.json. When Anthropic updates prices, install the latest plugin version:
claude plugin update token-tracker
Or manually edit the pricing file in the plugin cache.
claude plugin remove token-tracker
The data file (~/.claude/token-usage.json) is preserved after uninstall. Delete it manually if you want to remove all data.
MIT