Live Claude Code usage monitor — real /usage limits + burn rate, web + TUI, zero dependencies
  • JavaScript 100%
Find a file
2026-07-15 12:28:00 +02:00
.forgejo/workflows ci: block-style env (valid YAML) 2026-07-15 12:28:00 +02:00
.gitignore Initial snapshot: live Claude Code usage monitor (web + TUI, zero deps) 2026-07-15 01:38:36 +02:00
LICENSE Initial snapshot: live Claude Code usage monitor (web + TUI, zero deps) 2026-07-15 01:38:36 +02:00
README.md Initial snapshot: live Claude Code usage monitor (web + TUI, zero deps) 2026-07-15 01:38:36 +02:00
usage-live.js Initial snapshot: live Claude Code usage monitor (web + TUI, zero deps) 2026-07-15 01:38:36 +02:00

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/usage using 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/projects transcripts: 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.