Skip to content
| Marketplace
Sign in
Visual Studio Code>Machine Learning>AI Token Usage — Local Claude, Codex & Gemini TrackerNew to Visual Studio Code? Get it now.
AI Token Usage — Local Claude, Codex & Gemini Tracker

AI Token Usage — Local Claude, Codex & Gemini Tracker

Ben Smida

|
2 installs
| (0) | Free
100% local, zero-network, privacy-first tracker for daily, weekly, and monthly AI token usage across Claude Code, OpenAI Codex CLI, Gemini CLI, and custom tools—with built-in project architecture attribution.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

AI Token Usage — Local Claude, Codex & Gemini Tracker

100% local, zero-network, privacy-first VS Code extension that tracks daily, weekly, and monthly AI token usage across Claude Code, OpenAI Codex CLI, Gemini CLI, and custom local AI tools—paired with a built-in local project reverse-engineering engine that maps token consumption onto your codebase's module dependency graph.

Highlights

  • 100% Offline & Privacy-First: Zero runtime dependencies, zero telemetry, and strict Webview CSP (default-src 'none'). Reads only numeric token counts, timestamps, and file path mentions from local JSONL logs—prompt and code contents are never stored.
  • Sub-25ms Incremental Refresh: Byte-offset file cursors (token-index.json) and mtimeMs caching (arch-index.json) keep memory under 15 MB with zero background polling loops.
  • Multi-Tool Local Log Discovery:
    • Claude Code: ~/.claude/projects/**/*.jsonl
    • OpenAI Codex CLI: ~/.codex/sessions/**/*.jsonl
    • Gemini CLI: ~/.gemini/tmp/**/*.jsonl
    • Custom Local Tools: ~/.ai-token-usage/custom/*.jsonl
  • Built-In Reverse-Engineering Engine: Discovers architectural modules across TypeScript/JavaScript, Python, Go, Rust, Java/Kotlin, and C/C++/C#, classifies module roles (Hub, Entry, Bridge, Leaf), optionally enriches with graphify-out/graph.json, and attributes AI token consumption per module.
  • Rich Status Bar & Sidebar Dashboard: Live status bar pill with an inline 7-day SVG hover chart, circular daily goal ring, radial SVG dependency graph, 7-day bar chart, and 28-day consistency heatmap.

Commands

  • AI Token Usage: Refresh Usage & Architecture (ai-token-usage.refresh)
  • AI Token Usage: Open Dashboard (ai-token-usage.openDashboard)

Extension Settings

Setting Type Default Description
aiTokenUsage.dailyGoal number 150000 Daily token target for progress bar and motivational feedback.

Custom Local AI Tool Log Format

Drop .jsonl files into ~/.ai-token-usage/custom/*.jsonl with lines shaped like:

{"provider": "Ollama", "tokens": {"input": 1200, "output": 450}, "cwd": "/path/to/project", "ts": "2026-12-05T14:20:00Z"}

License

MIT

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft