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

Everything you need to
understand your Claude Code spend

Top-down drill-down

Total cost to per-project to per-session to per-message. Click through to see exactly where your budget goes.

Dynamic pricing

Live model prices from LiteLLM. Tiered pricing at 200K tokens, cache token costs, and fast mode multipliers -- all handled automatically.

Daily cost chart

Bar chart with configurable date range: 1 day, 3 days, 7 days, 30 days, 90 days, or 1 year. See trends at a glance.

Model breakdown

See cost distribution across models. Know how much you spend on Opus vs Sonnet vs Haiku.

Dark / light theme

Styled with IBM Plex Mono and Playfair Display. Automatic theme detection or manual toggle. PWA installable.

Cache efficiency

Track how well prompt caching works across sessions. See cache read ratios and creation costs per message.

One command. Full cost visibility.

1

Run it

One command to launch. No setup, no config, no hooks. Opens in your browser.

npx claude-code-cost --open
2

Browse costs

Overview with daily chart, model distribution, and project breakdown. Click any project to drill down.

localhost:3458
3

Drill down

Project to session to message. See token counts, costs, and cumulative spend for every API call.

total / project / session / message

See it in action

Overview light
Overview
Projects light
Projects
Session light
Session Detail

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 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.