Open source · MIT

Know what Claude Code
costs you

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
Claude Code Cost dashboard — 30-day overview

Everything you need to
understand your Claude Code spend

Top-down drill-down

Total cost → per project → per session → per message. Every number is one click away from its breakdown.

Dynamic pricing

Live model prices from LiteLLM — tiered 200K-threshold pricing, cache token costs, fast mode multipliers. Offline fallback included.

Daily cost chart

Bar chart over a configurable range — 1 day to 1 year. Spot the expensive days and what caused them.

Cost by model

See how spend splits across Opus, Sonnet, and Haiku — per range, per project, per session.

Cache efficiency

Track how well prompt caching works across your sessions — cache reads vs. fresh input tokens.

Message-level detail

Cumulative cost curve, stacked token bars, and a per-message table with model, tools, tokens, and cost.

Read-only

Only reads JSONL logs from ~/.claude/projects/. Nothing is modified, nothing leaves your machine.

17 color themes

Ember, Gruvbox, Catppuccin, Tokyo Night, Dracula, Nord, and more — each in light and dark. PWA installable.

Hub integration

Runs standalone or as a tab in Claude Code Hub alongside Kanban, Marketplace, and Memory.

Instant reload

API responses cached in the browser for snappy navigation; hit Refresh when you want fresh numbers.

A closer look

Which project burns the budget?

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.

Project view with per-session cost table

Down to the message

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.

Session detail with cumulative cost and per-message table

17 themes, light and dark

Light mode screenshot

One command. Full cost visibility.

1

Run it

One command to launch the dashboard. No hooks, no config — it reads your existing session files.

npx claude-code-cost --open
2

It reads your logs

Claude Code already writes JSONL conversation logs. The dashboard parses and aggregates them server-side.

~/.claude/projects/**/*.jsonl
3

Drill down

Start at the total, follow the money to the exact message that cost the most.

total / project / session / message

Common questions

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.