toknado
v0.2.0
Published
πͺοΈ A tornado of tokens β local, private usage dashboard for Claude Code & Codex CLI logs
Maintainers
Readme
πͺοΈ Toknado
A tornado of tokens. See exactly what your coding agents devour β Claude Code, Codex and GitHub Copilot Chat, one dashboard, 100% local.
Toknado reads the session logs that Claude Code (~/.claude) and Codex CLI (~/.codex) already write to your machine, and turns them into a fast local dashboard. No accounts, no uploads, no telemetry, no database. Close the tab and nothing remains but your logs.
npx toknadoThat's it. Your dashboard opens at http://127.0.0.1:4141.
What you get
- π One dashboard for all your agents β Claude Code, Codex CLI and GitHub Copilot Chat (VS Code), merged or filtered per source
- π¬ Every model, every call β the All-models table lists each model with API-call counts, avg tokens/call and full usage breakdown
- π Every range you'd ever ask for β today, 7 / 14 / 30 days, all time, or a custom date range
- π Charts, not spreadsheets β daily stacked bars (by token type or source), model share donut, activity heatmap, busy-hours histogram
- π€ Per-model breakdown β which model ate how much, with share percentages
- π§ Modes visible β Codex reasoning efforts (
medium/high/xhigh/max/ultra) and Claude response speeds (standard/fast) - π Real quota tracking β Codex logs its rate-limit
used_percent; Toknado charts your actual weekly quota consumption over time - % of everything β every day, session, model, and project shows its share of total usage
- π§Ύ Top sessions leaderboard β which sessions and projects burned the most
- πΈ What-if API cost comparison β what your token mix would cost at public API list prices, across model tiers (clearly labeled hypothetical β subscriptions don't bill per token)
- π‘ Live pricing (opt-in) β
--live-pricingfetches current rates for thousands of models from LiteLLM's public price DB, so even brand-new models get priced - π€ Export on demand β JSON, CSV, or Markdown. Nothing is saved unless you export it
Privacy model
| Question | Answer |
|---|---|
| Where does my data go? | Nowhere. The server binds to 127.0.0.1 only. The single exception: with the opt-in --live-pricing flag, Toknado makes one plain GET to LiteLLM's public price file β it carries nothing about you. |
| What does Toknado store? | Nothing. Every view is recomputed from your logs in memory. |
| What if I close it without exporting? | Nothing is saved β and nothing is lost. Reopen it and the same history is there, because your CLI logs are the data. |
| Can it modify my logs? | No. Logs are opened read-only. |
How it works
- Claude Code writes one JSONL file per session under
~/.claude/projects/. Each assistant turn records exact APIusage(input / output / cache read / cache write) per model. Toknado deduplicates entries that appear in multiple files (forked / resumed sessions). - Codex CLI writes rollout JSONL files under
~/.codex/sessions/. Forked/subagent files copy the parent's entire history with rewritten timestamps β Toknado deduplicates on usage snapshots so each API call counts exactly once, reads model + reasoning effort fromturn_context, and collects therate_limits.used_percentsamples for the quota chart. - GitHub Copilot Chat (VS Code) stores per-session operation logs under the editor's
workspaceStorage/*/chatSessions/. Toknado replays the op log to recover each request'spromptTokens/completionTokens, model and timestamp (Code, Insiders and VSCodium are auto-detected).
Token counts come straight from the logs β they're exact. Dollar figures in the comparison panel are estimates from public list prices.
Usage
npx toknado [options]
-p, --port <n> port to serve on (default 4141)
--no-open don't auto-open the browser
--claude-dir <path> Claude Code projects dir (default ~/.claude/projects)
--codex-dir <path> Codex home dir (default ~/.codex)
--copilot-dir <path> VS Code workspaceStorage dir for Copilot Chat
--pricing <file> JSON file with per-Mtok price overrides
--live-pricing fetch current API list prices from LiteLLM's public DB
(the only network request Toknado can ever make; off by default)Custom pricing
Models Toknado doesn't know show n/a in the cost panel. Provide your own rates (USD per million tokens, prefix-matched against model IDs):
{
"gpt-5.6": { "input": 1.25, "output": 10 },
"my-local-model": { "input": 0, "output": 0 }
}npx toknado --pricing my-prices.jsonNon-goals
- Not a spend tracker. Subscription plans don't bill per token; Toknado is tokens-first everywhere, and the single cost panel is explicitly hypothetical.
- Not a sync service. There is no cloud, and there never will be.
Requirements
Node.js β₯ 18. Zero dependencies.
Contributing
Contributions are very welcome β see CONTRIBUTING.md. Good first areas: new log formats (other agent CLIs), chart ideas, and pricing-table updates.
License
MIT
