Skip to content

data-wrights/claude-meter

Repository files navigation

Claude Meter

A VS Code extension that shows your Claude subscription usage directly in the status bar — no browser required.

Features

  • Status bar display — live Daily and Weekly usage percentages at a glance
  • Trend arrows/ appear next to percentages when usage is rising or falling vs. an hour ago
  • Countdown to reset — shows time remaining (e.g. Daily:26%↑·3h Weekly:20%→·5d)
  • Color-coded alerts — orange at ≥80%, red background at ≥100%
  • Burn rate / pacing — tooltip shows your consumption rate (~X%/hr) and projected time to exhaustion, with a warning when you're on pace to exceed before reset
  • Cooldown timer — when usage hits 100%, the status bar switches to a live countdown (Claude: Resets in 47m) that updates every minute without extra API calls
  • Reset notification — get a desktop notification when a previously exhausted window drops back below 100%, so you know you can resume
  • Hover tooltip — ASCII progress bars, exact reset times, trend deltas, and burn rate per window
  • Detail panel — click the status bar item for a full breakdown with pacing gauges, bar charts, short-term sparklines (last 2 hours), and a 30-day daily history chart
  • Persistent history — usage data survives VS Code reloads; daily peak values are stored for up to 3 months
  • Model breakdown — optional Opus/Sonnet sub-bars in the tooltip
  • Enterprise support — admin API keys (sk-ant-admin-...) show token counts (Today/Week) with daily history
  • Auto token detection — reads your Claude Code credentials automatically, no setup needed

Status Bar

$(pulse) Daily:26%·3h  Weekly:20%·5d         ← normal (white)
$(pulse) Daily:26%↑·3h  Weekly:20%→·5d       ← with trend arrows (after 1h of data)
$(alert) Daily:81%↑·45m  Weekly:20%·5d       ← high usage ≥80%
$(warning) Daily:103%·now  Weekly:95%·2d     ← over limit ≥100%
$(clock) Claude: Resets in 47m               ← cooldown countdown at 100%
$(pulse) Today:1.2M  Week:8.5M               ← enterprise / admin key

Token Support

Token type Source What you see
OAuth (auto) ~/.claude/.credentials.json Daily % · Weekly %
OAuth (manual) VS Code setting Daily % · Weekly %
Admin key (sk-ant-admin-...) VS Code setting Token counts (Today / Week)

Claude Code users are detected automatically — no configuration needed.

Setup

Claude Code users (automatic)

Install the extension and open any workspace. The extension reads your token from ~/.claude/.credentials.json automatically.

Manual token

  1. Open the Command Palette (Ctrl+Shift+P / Cmd+Shift+P)
  2. Run Claude Meter: Enter Token
  3. Paste your OAuth bearer token

Enterprise / Admin key

  1. Open VS Code Settings (Ctrl+,)
  2. Search for claudeMeter.manualToken
  3. Paste your admin key (sk-ant-admin-...)

Commands

Command Description
Claude Meter: Refresh Now Force an immediate data refresh
Claude Meter: Show Details Open the detail panel
Claude Meter: Enter Token Paste a token manually (saved to settings)
Claude Meter: Clear Cached Token Remove the manually saved token

Settings

Setting Default Description
claudeMeter.refreshIntervalMinutes 10 How often to poll the API (1–60 min)
claudeMeter.manualToken "" Override the auto-detected token
claudeMeter.statusBarPosition "right" "left" or "right" side of the status bar
claudeMeter.statusBarPriority 100 Position within the chosen side (higher = further left)
claudeMeter.showModelBreakdown false Show Opus/Sonnet sub-bars in the tooltip
claudeMeter.displayMode "used" "used" shows percent consumed, "remaining" shows percent available
claudeMeter.notifyAtThreshold 0.9 Notify when any window hits this fraction (set to 1.0 to silence)
claudeMeter.notifyOnReset true Show a notification when a previously exhausted usage window resets

Requirements

  • VS Code 1.94 or later
  • An active Claude subscription (Pro, Max, Teams, or Enterprise)
  • Claude Code installed and authenticated, or a manually entered token

Links

About

VS Code extension that shows Claude AI subscription usage (daily & weekly limits) in the status bar. Auto-detects Claude Code credentials. Supports OAuth and enterprise admin keys.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors