Claude Code Token Meter
Live Claude Code usage in your VS Code status bar — session limits, weekly limits, and token counts, updated after every response.


Features
- Current session bar — 5-hour usage limit with percentage
- Weekly bar — all-models weekly usage with percentage
- Hover tooltip — reset times, input/output/cache token counts
- Auto-setup — configures itself on first install, no manual steps needed
- Updates automatically after every Claude Code response
Status bar preview:
⚡ ████░░░░░░ 35% (cur) | ██░░░░░░░░ 17% (wk)
Installation
- Install from the VS Code Marketplace
- A prompt appears: "Set up automatically" — click it
- Done. Send a message to Claude Code and the status bar updates
Requirements
- Claude Code v2.1.178+
- Windows (PowerShell hooks)
- Claude AI subscription (OAuth login)
How it works
On first activation, the extension:
- Writes a Stop hook script to
~/.claude/hooks/stop-usage.ps1
- Registers it in
~/.claude/settings.json
After each Claude response, the hook:
- Reads the session transcript to extract token counts
- Calls
https://api.anthropic.com/api/oauth/usage using your local Claude credentials
- Writes results to
~/.claude/usage-current.json and ~/.claude/plan-usage.json
The extension watches these files and updates the status bar instantly.
Manual setup (optional)
If you prefer to set up manually, copy hooks/stop-usage.ps1 to ~/.claude/hooks/ and add to ~/.claude/settings.json:
{
"hooks": {
"Stop": [
{
"matcher": "",
"hooks": [
{
"type": "command",
"command": "powershell -ExecutionPolicy Bypass -File \"C:\\Users\\YOUR_USERNAME\\.claude\\hooks\\stop-usage.ps1\""
}
]
}
]
}
}
Repository
github.com/som3669/Claude-Code-Token-Meter
License
Proprietary — All rights reserved. See LICENSE.