← all work
● live · 2026 · Creator · Open source

TokenViz

GitHub-style contribution heatmaps for your AI coding tools.
TokenViz cover
distribution
npm (tokenviz)
tools tracked
Claude Code · Codex · Cursor · OpenCode
install
npx tokenviz
TypeScript · ESM Node CLI · commander sql.js · WASM SQLite @resvg/resvg-js · SVG→PNG chalk · ANSI npx · zero-config

A CLI that prints GitHub-style contribution heatmaps for your AI coding-tool usage. Plug it into Claude Code / Codex / Cursor / OpenCode and see the year at a glance, right in the terminal.

The token-maxing era needed a scoreboard #

I wanted to see, and honestly to show off a little, how hard everyone is leaning on their AI coding tools now. The data already exists: Claude Code, Codex, Cursor, and OpenCode all log token usage locally. The problem is it is scattered across four completely different formats and there is no single view. TokenViz unifies them into one heatmap, with zero config and no account.

tokens
7.8M
active days
143
longest streak
26d
hover a celllessmore
Fig 1 · the contribution grid TokenViz renders, from usage data already on your machine. Real output ships as a 4000px PNG; 10 themes to pick from.

Where the data actually comes from #

Everything is read from files already on your machine, one adapter per tool, and the messy part is that each tool stores usage differently: Claude Code in project JSONL, Codex in dated JSONL plus a SQLite state DB, OpenCode in SQLite or JSON, and Cursor behind its own dashboard API (with a local SQLite fallback). Adapters auto-detect which tools are present and run in parallel.

Four tool log sources feed a parse-and-dedup stage, then aggregate-by-day, then a renderer that outputs a terminal grid and a PNG.
Fig 2 · four local sources, parsed and deduped, aggregated by day, rendered to terminal + PNG.

Rendered twice from one model #

The same grid is drawn two ways. The terminal version uses ANSI block glyphs via chalk; the shareable version is hand-built SVG rasterized to a 4000px PNG with resvg. One detail I care about: the SVG color ramp is gamma-corrected (pow 0.7) so light-usage days stay visible instead of washing out to near-black, and there are ten themes to pick from.

Local by design #

It reads files, it does not phone home: no login, no telemetry, no account. The one network call is optional, Cursor's own usage export, made with your local token and only for your own data, and it falls back to reading Cursor's local SQLite if that fails. Written in strict TypeScript ESM, shipped on npm, run with a single npx tokenviz.

← PREVIOUS
Imagine