Finally, a fuel gauge for your context window
Tokentap is a local proxy that shows a live terminal dashboard of token usage and archives every prompt sent by LLM CLI tools like Claude Code and Codex.

What it does
Tokentap runs as a local HTTP proxy between LLM CLI tools and their upstream APIs. It renders a live terminal dashboard that tracks per-request token counts, visualizes cumulative context-window usage as a color-coded fuel gauge, and archives every intercepted prompt as markdown and JSON. You start the proxy in one terminal, run Claude Code or Codex in another, and watch the numbers update in real time.
The interesting bit
Instead of certificate injection or packet sniffing, tokentap simply overrides provider-specific base URL environment variables—like ANTHROPIC_BASE_URL—to route traffic through localhost. For OpenAI-compatible providers such as MiniMax, it uses path-prefix routing, stripping the local prefix before forwarding requests to the correct upstream API.
Key highlights
- Color-coded fuel gauge: green below 50%, yellow to 80%, red above
- Prompt auto-archive: every request saved as both human-readable markdown and raw JSON
- Zero-configuration proxy: no certificates, no setup; just install and run
- Session summaries on exit showing total tokens and request count
- Supports Claude Code, OpenAI Codex, and MiniMax; Gemini CLI is blocked by an upstream OAuth issue
Caveats
- Gemini CLI support is currently non-functional because the upstream tool ignores custom base URLs during OAuth authentication
- macOS and Linux only; Windows is not listed as supported
- Requires Python 3.10 or newer
Verdict
Grab it if you live in Claude Code or Codex and want to debug prompts or catch context-window bloat before it surprises you. Skip it if you only use web chat interfaces or APIs that bypass environment-based proxy settings.
Frequently asked
- What is jmuncor/tokentap?
- Tokentap is a local proxy that shows a live terminal dashboard of token usage and archives every prompt sent by LLM CLI tools like Claude Code and Codex.
- Is tokentap open source?
- Yes — jmuncor/tokentap is open source, released under the MIT license.
- What language is tokentap written in?
- jmuncor/tokentap is primarily written in Python.
- How popular is tokentap?
- jmuncor/tokentap has 810 stars on GitHub.
- Where can I find tokentap?
- jmuncor/tokentap is on GitHub at https://github.com/jmuncor/tokentap.