See how much Claude Code usage you have left — directly in your VSCode status bar.
🟢 5h ████░░░░ 42% | 🟡 7d ██████░░ 68%
Lightweight extension that shows your 5-hour and 7-day rolling usage windows in real time.
Claude Code usage limits are not visible during real work. This extension gives you a clear, always-on status so you can:
- Avoid hitting limits mid-session
- Plan longer coding tasks
- Understand your real usage patterns
- Use Pro / Max plans more efficiently
Reads your locally stored Claude Code OAuth token and calls the Anthropic usage API every 5 minutes (configurable) to fetch your current utilisation for both quota windows. The result is shown as a progress bar in the VSCode status bar at the bottom right.
- 5-hour window — short-term rolling limit (resets 5 h after your first message)
- 7-day window — weekly rolling limit (resets 7 days after your first message)
| Colour | Utilisation |
|---|---|
| 🟢 Green | < 50 % |
| 🟡 Yellow | 50 – 79 % |
| 🔴 Red | ≥ 80 % |
Click the status bar item → pick display mode (5h only, 7d only, both)
Hover → detailed tooltip with exact percentages and reset countdown
| Requirement | Details |
|---|---|
| Claude subscription | Pro or Max — API-key-only accounts have no quota windows to display |
| Claude Code CLI | Must be installed and authenticated (claude auth login) — this creates the credentials file the extension reads |
| VSCode | Version 1.85 or newer |
| Node.js | Version 20 or newer (only needed to build from source) |
| Platform | Path |
|---|---|
| Windows | %USERPROFILE%\.claude\.credentials.json |
| macOS | macOS Keychain (Claude Code-credentials), falls back to ~/.claude/.credentials.json |
| Linux | ~/.claude/.credentials.json |
Search for ClaudeProUsage in the Extensions view (Ctrl+Shift+X), or install directly via the VSCode Marketplace.
If you already have a built .vsix file:
code --install-extension claude-usage-monitor-1.0.3.vsixOr via the VSCode UI: Extensions → ··· → Install from VSIX…
git clone https://github.com/AndJae/claude-usage-monitor
cd claude-usage
npm install
npm run compile
npx @vscode/vsce package --no-yarn
code --install-extension claude-usage-monitor-1.0.3.vsix- Install dependencies and compile:
npm install npm run compile
- Copy the extension folder into VSCode's extensions directory:
# Windows (PowerShell) Copy-Item -Recurse . "$env:USERPROFILE\.vscode\extensions\local.claude-usage-monitor-1.0.3" # macOS / Linux cp -r . ~/.vscode/extensions/local.claude-usage-monitor-1.0.3
- Restart VSCode completely (close all windows, then reopen).
Open Settings (Ctrl+,) and search for claudeUsage.
| Setting | Default | Description |
|---|---|---|
claudeUsage.refreshIntervalSeconds |
300 |
How often to poll the API in seconds (minimum: 60) |
claudeUsage.defaultMode |
"both" |
What to show: "5h", "7d", or "both" |
claudeUsage.credentialsPath |
"" |
Override the credentials file path (leave empty for auto-detect) |
Open the Command Palette (Ctrl+Shift+P) and type:
| Command | Description |
|---|---|
Claude Usage: Refresh Now |
Force an immediate API refresh |
Claude Usage: Toggle View (5h / 7d / Both) |
Change the status bar display mode |
- Your OAuth token is read from a local file (or macOS Keychain) — it never leaves your machine directly
- Usage data is fetched from
api.anthropic.comusing that token — this is the same API your Claude Code CLI uses - No analytics, no telemetry, no third-party services
Status bar shows "No token — run claude auth login"
→ Claude Code CLI is not authenticated. Run claude auth login in a terminal.
Status bar shows "Auth error — re-login to Claude Code"
→ The stored token has expired. Run claude auth login again.
Status bar shows "Rate limited — retrying in Xm"
→ The Anthropic usage API has a rate limit. The extension backs off automatically (5 min → 10 min → 20 min → max 60 min) and retries on its own. No action needed.
Status bar shows "Fetch failed"
→ Network error or temporary API issue. The extension will retry on the next interval.
Extension does not appear after install
→ Make sure VSCode was fully restarted (all windows closed). Check Help → Toggle Developer Tools → Console for any loading errors.
- Requires an active Claude Pro or Max subscription
- Accuracy depends on what the Anthropic usage API reports
- Not an official Claude / Anthropic integration
MIT