CLI ToolsMay 12, 2026·2 min read

Tokentap — Token Tracker for LLM CLIs

Tokentap adds a live terminal dashboard and prompt archive for LLM CLI tools, so you can see token usage in real time while using Claude Code or Codex.

Agent ready

Safe staging for this asset

This asset is staged first. The copied prompt tells the agent to inspect the staged files and ask before activating scripts, MCP config, or global config.

Stage only · 17/100Policy: stage
Agent surface
Any MCP/CLI agent
Kind
CLI Tool
Install
Stage only
Trust
Trust: Established
Entrypoint
Asset
Safe staging command
npx -y tokrepo@latest install ba7f169a-42d1-583d-a08e-2ff368dd171b --target codex

Stages files first; activation requires review of the staged README and plan.

Intro

Tokentap adds a live terminal dashboard and prompt archive for LLM CLI tools, so you can see token usage in real time while using Claude Code or Codex.

  • Best for: power users of LLM CLIs who need visibility into token burn and context window pressure
  • Works with: Python 3.10+; supports Claude Code, Codex, Gemini CLI (noted as blocked by an upstream issue), and OpenAI-compatible providers (per README)
  • Setup time: 5–15 minutes

Practical Notes

  • Per README: shows a context “fuel gauge” (default limit 200,000) and saves prompts to Markdown + JSON.
  • Useful for regression: compare token usage before/after prompt/tool changes.
  • Combine with guardrails: when fuel gauge hits 70–80%, switch to summarization or retrieval mode.

Main

A simple workflow that pays off quickly:

  1. Run your normal CLI session with Tokentap enabled.
  2. When usage spikes, open the saved prompt archive and identify the culprit: retrieval payload, tool output, or template bloat.
  3. Fix one thing at a time (shorten tool output, add truncation, or dedupe context), then measure again.

Treat token usage as a budget: you’ll get better answers by spending tokens on relevant evidence, not repeated boilerplate.

FAQ

Q: Does it require certificates? A: Per README: no—"Zero configuration" and it runs as a local proxy with path-prefix routing for OpenAI-compatible providers.

Q: Can it run with Gemini CLI? A: README notes Gemini CLI is currently blocked by an upstream issue when using OAuth; check the linked issue for status.

Q: What should I store? A: Keep prompt archives in a private directory; they may contain secrets or code. Add redaction if you share logs.

🙏

Source & Thanks

Source: https://github.com/jmuncor/tokentap > License: MIT > GitHub stars: 798 · forks: 37

Discussion

Sign in to join the discussion.
No comments yet. Be the first to share your thoughts.

Related Assets