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 → per project → per session → per message. Every number is one click away from its breakdown.
Live model prices from LiteLLM — tiered 200K-threshold pricing, cache token costs, fast mode multipliers. Offline fallback included.
Bar chart over a configurable range — 1 day to 1 year. Spot the expensive days and what caused them.
See how spend splits across Opus, Sonnet, and Haiku — per range, per project, per session.
Track how well prompt caching works across your sessions — cache reads vs. fresh input tokens.
Cumulative cost curve, stacked token bars, and a per-message table with model, tools, tokens, and cost.
Only reads JSONL logs from ~/.claude/projects/. Nothing is modified, nothing leaves your machine.
Ember, Gruvbox, Catppuccin, Tokyo Night, Dracula, Nord, and more — each in light and dark. PWA installable.
Runs standalone or as a tab in Claude Code Hub alongside Kanban, Marketplace, and Memory.
API responses cached in the browser for snappy navigation; hit Refresh when you want fresh numbers.
Tour
Drill into a project to see its daily cost, model split, and every session ranked — cost, tokens, messages, duration, and the dominant model at a glance.

Session detail shows the cumulative cost curve, a stacked token breakdown per message, and a full table — model, tools used, input/output/cache tokens, and running total.

Themes
Setup
One command to launch the dashboard. No hooks, no config — it reads your existing session files.
Claude Code already writes JSONL conversation logs. The dashboard parses and aggregates them server-side.
Start at the total, follow the money to the exact message that cost the most.
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 files from ~/.claude/projects/. Nothing is uploaded anywhere; everything stays on your machine.
It uses the same pricing logic as ccusage: pre-calculated costUSD when present, otherwise token-based calculation with tiered 200K pricing, cache token costs, and message deduplication by messageId + requestId.