Local dashboard for visualizing token usage and estimated costs from Claude Code session logs.
Note: This dashboard reads local Claude Code logs from
~/.claude/projects/. It does NOT access the Anthropic API — all data comes from your local filesystem. Costs shown are estimated equivalent API costs, not actual charges (especially relevant for Claude Max subscribers).
KPI cards, daily cost/token charts, top projects, and recent sessions at a glance.
Detailed daily breakdown with per-model badges, token columns, and totals — like running ccusage daily but in your browser.
Current month spend, projected end-of-month cost, burn rate trend, and optional budget tracking with visual progress bar.
GitHub-style activity heatmap (day-of-week x hour) showing when you use Claude the most. Toggle between message count and cost view.
CLI vs VS Code comparison, scatter plot of cost vs messages, weekly cost trend, and sessions ranked by cost-per-message.
"What if everything was Haiku?" — model cost simulator with side-by-side comparison, savings indicator, and full cross-model cost matrix.
Per-project breakdown and per-session message timeline with token details.
| Projects | Session Detail |
|---|---|
![]() |
![]() |
Full dark theme following Anthropic's warm-toned design system.
| Light | Dark |
|---|---|
![]() |
![]() |
- Overview — KPI cards, daily cost trend, token breakdown, top projects
- Daily Usage — Day-by-day table with model badges and totals (like
ccusage daily) - Cost Forecast — Projected monthly cost, burn rate trend, budget tracking
- Peak Hours — Activity heatmap by hour and day of week
- Efficiency — CLI vs VS Code comparison, cost-per-message ranking, scatter charts
- What-If — Model cost simulator with full cross-model pricing matrix
- Projects — Per-project breakdown with cost, sessions, model usage
- Sessions — Session list with drill-down to per-message timeline
- Models — Compare usage across Opus, Sonnet, Haiku with daily trend
- Cache Analysis — Cache hit rate, savings/overhead, per-project efficiency
- Dark Mode — Toggle between light and dark themes
- PDF Export — Download reports as PDF
- Period Filter — Switch between 30 days, 90 days, or all time
# Clone
git clone https://github.com/flukelaster/claude-usage.git
cd claude-usage
# Install dependencies
pnpm install
# Sync Claude Code logs into local SQLite cache
pnpm sync
# Start dev server
pnpm devOpen http://localhost:3000 and click Sync Now to import your latest logs.
- Node.js 20+
- pnpm 9+
- Claude Code installed and used (generates logs at
~/.claude/projects/)
Works on macOS, Linux, and Windows.
On Windows, better-sqlite3 requires native build tools. If pnpm install fails:
npm install -g windows-build-tools
# or install "Desktop development with C++" workload via Visual Studio Installer~/.claude/projects/**/*.jsonl → Stream Parser → SQLite Cache → Dashboard
- Parser reads
.jsonlsession files from~/.claude/projects/ - Extracts token usage from
assistantentries (input, output, cache write, cache read) - Calculates estimated costs using Anthropic's published pricing
- Stores parsed data in a local SQLite database (
data/cache.db, gitignored) - Dashboard queries SQLite via TanStack Start server functions
- Incremental sync — only parses new data since last sync (tracks byte offsets)
| Model | Input | Output | Cache Write (5m) | Cache Write (1h) | Cache Read |
|---|---|---|---|---|---|
| Opus 4.6 | $5/MTok | $25/MTok | $6.25/MTok | $10/MTok | $0.50/MTok |
| Opus 4.5 | $5/MTok | $25/MTok | $6.25/MTok | $10/MTok | $0.50/MTok |
| Sonnet 4.6 | $3/MTok | $15/MTok | $3.75/MTok | $6/MTok | $0.30/MTok |
| Sonnet 4 | $3/MTok | $15/MTok | $3.75/MTok | $6/MTok | $0.30/MTok |
| Haiku 4.5 | $1/MTok | $5/MTok | $1.25/MTok | $2/MTok | $0.10/MTok |
Pricing verified 2026-04-14. Dashboard warns if pricing data is >90 days old.
- TanStack Start — Vite + SSR + Server Functions
- TanStack Router — File-based routing
- TanStack Query — Data fetching + caching
- Recharts — Charts
- better-sqlite3 + Drizzle ORM — Database
- Tailwind CSS v4 — Styling
- Lucide React — Icons
| Command | Description |
|---|---|
pnpm dev |
Start dev server with hot reload |
pnpm build |
Build for production |
pnpm start |
Start production server |
pnpm sync |
Sync Claude Code logs (CLI, no server needed) |
- No message content is stored — only token counts and metadata
- All data stays on your local machine
- The SQLite cache (
data/cache.db) is gitignored - No network requests except to
localhost
MIT










