Real-time Claude Code API usage monitor for VS Code — shows cumulative token usage, cache hit rate, and API key balance directly in the status bar.

- 📊 Cumulative Token Tracking — Automatically scans Claude Code session transcripts (
~/.claude/projects/*.jsonl) and aggregates token usage per model
- 🗄️ Cache Hit Rate — Calculates prompt cache hit rate from
cache_read_input_tokens data, with color-coded status bar indicator
- 💳 API Balance — Queries DeepSeek balance API to show remaining credits
- ⏱️ Auto-Refresh — Configurable refresh interval (default: 5 minutes)
- 🔍 Detailed View — Click status bar for per-model breakdown, hover for full stats in markdown tooltip
| Backend |
Token Tracking |
Cache Hit Rate |
Balance |
| DeepSeek (api.deepseek.com) |
✅ |
✅ |
✅ |
| Anthropic (api.anthropic.com) |
✅ |
✅ |
❌ (balance requires Anthropic Console API) |
| Other Anthropic-compatible providers |
✅ |
✅ |
❌ |
- VS Code 1.80+
- Claude Code installed and configured
- DeepSeek API key (for balance checking; token tracking works without it)
The extension activates automatically on VS Code startup. Look for the status bar item in the bottom-right corner:
⚡ v4-pro 2.15M tok 🗄 96.2% 💳 ¥23.50
| Action |
Result |
| Click status bar |
Open detailed QuickPick panel with per-model stats |
| Hover status bar |
Markdown tooltip with full breakdown table |
Cmd/Ctrl+Shift+P → Claude Usage Monitor: Refresh Now |
Manually trigger refresh |
Cmd/Ctrl+Shift+P → Claude Usage Monitor: Show Detailed Usage |
Open detail panel |
| Indicator |
Green |
Yellow |
Red |
| Cache hit rate |
≥ 80% |
50–79% |
< 50% |
| Setting |
Type |
Default |
Description |
claudeUsageMonitor.refreshIntervalMinutes |
number |
5 |
Refresh interval (1–60 min) |
claudeUsageMonitor.showBalance |
boolean |
true |
Show API balance in status bar |
claudeUsageMonitor.showCacheHitRate |
boolean |
true |
Show cache hit rate in status bar |
claudeUsageMonitor.claudeDataDir |
string |
(auto) |
Claude Code data directory path |
claudeUsageMonitor.deepseekApiKey |
string |
(auto) |
DeepSeek API key for balance check |
- Token data — Parses every
type: "assistant" entry in Claude Code's JSONL session files, extracting input_tokens, output_tokens, cache_read_input_tokens, and cache_creation_input_tokens grouped by model name
- Cache hit rate =
cache_read_input_tokens / (cache_read_input_tokens + input_tokens)
- Balance — Queries
GET https://api.deepseek.com/user/balance with your API key
- All data stays local — no telemetry, no external servers
This extension:
- ✅ Reads only local Claude Code files on your machine
- ✅ Makes API calls only to DeepSeek's balance endpoint (with your key)
- ✅ Sends NO data to any third party
- ✅ Contains NO telemetry or analytics
- Initial release
- Per-model token tracking from local JSONL transcripts
- Cache hit rate calculation with color-coded status bar
- DeepSeek balance API integration
- Configurable auto-refresh timer
- QuickPick detail panel and markdown hover tooltips