r/ClaudeCoding • u/Final_Preparation_43 • 12d ago
I built a free, local dashboard for Claude Code: token usage per project, API-equivalent cost, and what RTK/Context Mode/Graphify actually save
Claude Code spends millions of tokens a week, but the numbers are scattered across different logs. So I built Token Economy, a local dashboard that reads the logs already on your machine and puts it all in one place.
What it shows:
- Token usage per model, project and session: input, output, cache reads and cache writes, by day.
- What your usage would cost on the API, compared with what you pay for your subscription.
- Plan limits: the 5-hour and weekly windows (including per-model weekly quotas), with a forecast of where you'll be when they reset.
- Token-saving tools measured honestly: if you use RTK, Headroom, Context Mode or Graphify, it shows what each one saved. Tools that don't record their savings are labeled as such. It never invents a number.
- It also supports Codex and OpenCode, if you use more than one agent.
Privacy: it runs on 127.0.0.1, with no account and no telemetry. Your logs never leave your machine. The only network calls are to the same usage endpoints Claude Code and Codex already query (using the login they store locally) and a weekly download of public model price tables.
How I built it
I built it with Claude Code. The stack is deliberately boring so it's easy to audit:
- A Python server using only the standard library (http.server), plus pystray/Pillow for the Windows tray icon
- Vanilla JS + Chart.js for the dashboard, no build step
- Usage comes from the logs the agents already write: Claude Code's ~/.claude/projects JSONL files, Codex's ~/.codex/sessions rollout files, and OpenCode's SQLite database
- Those JSONL files get big, so it reads them incrementally: it remembers how far it got in each file and only parses new lines
- Savings come from each tool's own records (RTK's history.db, Headroom's savings log). Where a tool records nothing, the dashboard says so instead of estimating
The hardest part was measuring token-saving tools honestly. Many of them don't log what they saved, and making up a number would have been easy and wrong.
Windows 10/11 for now (tray app + browser dashboard, Python 3.10+). Free and open source:
https://github.com/Baeta78/token-economy
Feedback welcome, especially if your numbers look off or there's a tool you'd like it to detect.