Live Claude Code usage monitor — real /usage limits + burn rate, web + TUI, zero dependencies
- JavaScript 100%
| .forgejo/workflows | ||
| .gitignore | ||
| LICENSE | ||
| README.md | ||
| usage-live.js | ||
claude-usage-live
Live Claude Code usage monitor — the real /usage limits + burn rate, in a
web dashboard and a terminal (TUI). Zero dependencies: one file, plain
Node, no npm install.
What it shows
- Top row — the real subscription limits. Fetched from Anthropic's own
endpoint
GET /api/oauth/usageusing your OAuth token, so the percentages and reset countdowns match what Claude Code itself reports (session 5h window, weekly, etc.). A desktop alert fires when any limit crosses 90%. - Bottom row — local token & cost accounting. Parsed from your
~/.claude/projectstranscripts: exact token counts and an API-equivalent cost estimate, per current 5h block / today / all-time, plus a live tokens-per-minute burn rate.
How the token is read (no secret is ever stored)
The OAuth token is read live from the macOS Keychain on every poll:
security find-generic-password -s "Claude Code-credentials" -w
Nothing is ever written to disk, so it auto-follows Claude Code's own token refreshes. There is no token, key, or credential committed to this repo — if the Keychain entry is missing the tool simply reports the local token/cost panel and a "token expired — run any claude command to refresh" hint.
Run
node usage-live.js
Then open the printed URL (default http://127.0.0.1:8787) for the web view,
or watch the TUI in the terminal. macOS only (uses the security CLI to read
the Keychain and osascript for the 90% alert).
License
MIT — see LICENSE.