← Reddit

I built Tokenmap: A CLI tool that generates GitHub-style heatmaps for your AI code assistant usage (Claude, Cursor, etc.)

Reddit · oliv_ia69 · April 19, 2026
Tokenmap is a local Python CLI tool that generates GitHub-style heatmaps visualizing token usage across AI coding assistants like Claude Code, Cursor, and Codex. The tool aggregates usage history locally without external telemetry while offering metrics tracking for tokens, coding streaks, peak hours, and API costs, with exports available in terminal, PNG, and SVG formats.

Detailed Analysis

Tokenmap, an open-source Python CLI tool developed by akshatshaw, addresses a growing practical need among AI-assisted developers: unified, local visibility into how heavily they rely on tools like Claude Code, Cursor, Codex, and OpenCode. Released on PyPI and hosted on GitHub, the tool reads directly from local databases and log files generated by these assistants, aggregating token usage data across platforms and rendering it as a GitHub-style contribution heatmap in PNG, SVG, or terminal output. Beyond simple visualization, Tokenmap calculates API costs dynamically based on current model pricing, tracks input and output tokens separately, identifies longest coding streaks, and surfaces peak active hours — offering developers a quantitative profile of their AI coding habits without sending any data to external servers.

The tool's privacy-first architecture is a deliberate design choice that distinguishes it from cloud-based analytics dashboards. By operating entirely locally and remaining dependency-free beyond a standard Python installation, Tokenmap removes the friction and trust concerns typically associated with usage telemetry. This is particularly relevant given that AI coding assistants like Claude Code already handle sensitive codebases and proprietary logic; a telemetry layer that aggregates usage metadata across those tools would represent an additional attack surface. The decision to read directly from local SQLite databases and log files rather than intercepting API calls also means the tool imposes zero overhead on active development sessions.

Tokenmap enters a nascent but growing ecosystem of open-source AI usage visualization utilities. Projects like tokscale, which offers a Rust-native terminal UI for multi-agent token tracking, and ai-heatmap, which generates interactive cost visualizations from ccusage data, occupy adjacent territory. The proliferation of these tools reflects a broader shift in developer tooling culture: as AI assistants transition from novelty to infrastructure, the same observability instincts that drove adoption of profilers, flame graphs, and log aggregators are now being applied to LLM consumption. Developers are beginning to treat token burn rate and cost per session as first-class engineering metrics, analogous to memory usage or API latency.

The choice of the GitHub contribution heatmap as the primary visual metaphor is functionally clever and culturally resonant. The familiar green-grid format communicates temporal density at a glance, leveraging existing developer literacy around activity visualization to make AI usage patterns immediately interpretable. Mapping token consumption onto that grid effectively reframes AI assistant usage as a form of contribution — a subtle normalization of AI-assisted work as a measurable, trackable dimension of engineering output alongside commits and pull requests. As tools like Claude Code become deeply embedded in daily workflows, the ability to audit and reflect on that dependency quantitatively may become a standard part of developer self-assessment and team retrospectives.

Looking ahead, the extensible adapter architecture Tokenmap employs positions it well for the rapidly expanding landscape of AI coding tools. The developer's open invitation for community contributions to support additional platforms signals awareness that the assistant ecosystem is fragmented and fast-moving — new entrants like Google's Gemini Code Assist and GitHub Copilot's evolving API surface could all become viable adapter targets. As enterprises begin scrutinizing AI tool expenditure more rigorously and individual developers seek greater transparency into their own productivity patterns, lightweight local observability tools of this kind are likely to find sustained demand, particularly if they can evolve to surface not just volume metrics but quality signals such as acceptance rates, edit distances, and task completion correlations.

Article image Read original article →