Token-viewer is a tiny localhost instrument — one big number, no dashboard bloat. It tails your local DBs and shows input-only, daily live with a pointy sparkline behind it. No cloud, no key, just node server.js.
~/.local/share/opencode/opencode.db · 22G
state_5.sqlite · 58M total
~/.claude/projects · auto
all agents · daily sum
git clone https://github.com/Parithosh-Varma/token-viewer && cd token-viewer && node server.js
Token-viewer separates input, output, and cache re-reads. That 89M “total” is mostly cheap cache — daily input is the real spend.
Number tweens with easeOutCubic 480–950ms at 60fps. Sparkline glides with it — no sharp jumps, subtle tension, no overshoot.
Not a dashboard. One big Gnomon number, input-only by default, dark/light toggle, pointy graph as bg. Copy, fullscreen, done.
Auto-detects local stores. No API keys. If a DB isn’t there, it just shows 0 — other users with different setups see their own numbers.
{
"opencode": { "daily": { "sum_input": 5759642 } },
"codex": { "daily": { "total_tokens": 1279049 } },
"combined": { "daily": { "sum_input": 6996187 } }
}
/api/agents · /api/health · /health