A cost visualization dashboard for Claude Code. Track spending per day, per project, per session -- with dynamic pricing and drill-down views.
$ npx claude-code-cost --open
Features
Total cost to per-project to per-session to per-message. Click through to see exactly where your budget goes.
Live model prices from LiteLLM. Tiered pricing at 200K tokens, cache token costs, and fast mode multipliers -- all handled automatically.
Bar chart with configurable date range: 1 day, 3 days, 7 days, 30 days, 90 days, or 1 year. See trends at a glance.
See cost distribution across models. Know how much you spend on Opus vs Sonnet vs Haiku.
Styled with IBM Plex Mono and Playfair Display. Automatic theme detection or manual toggle. PWA installable.
Track how well prompt caching works across sessions. See cache read ratios and creation costs per message.
Setup
One command to launch. No setup, no config, no hooks. Opens in your browser.
Overview with daily chart, model distribution, and project breakdown. Click any project to drill down.
Project to session to message. See token counts, costs, and cumulative spend for every API call.
Preview
FAQ
Live from LiteLLM's pricing dataset (2000+ models). Cached for 6 hours. If the fetch fails, a bundled offline snapshot of Claude model prices is used.
Yes. The offline pricing fallback covers all current Claude models. PWA support is included for installability.
No. Completely read-only. It only reads JSONL session files from ~/.claude/projects/. Nothing is written or modified.
Costs are estimates based on token counts and publicly available model pricing. They use pre-calculated costUSD when available in session files, otherwise calculate from tokens. Actual billing may differ slightly.