I got tired of running /usage to check how close I was to my limits, so I built a status line that just shows it all the time, right above the prompt. What it does:
- Shows your 5-hour session usage, weekly usage, a separate Opus bar on plans that meter it, your plan name, and any extra credits in your billing currency.
- Hits the same oauth/usage endpoint the built-in /usage command uses, with the OAuth token Claude Code already stored (macOS Keychain, or ~/.claude/.credentials.json on Linux/Windows). No extra setup or API key.
- Bars go yellow at ≥90% and red at ≥95% with a ! cue.
- A background refresher keeps the cache warm every 60s even when Claude Code is idle/closed, so the numbers are fresh the moment you look. A freshness glyph (● fresh, ↻ refreshing, (stale Nm)) tells you if you can trust them.
- Self-healing around the endpoint’s rate limit (it shares a budget with /usage’s own polling), and a /usage-refresh command to force an immediate update.
- Disables Claude Code’s redundant built-in yellow usage-warning bar. - (kinda broken) Works on macOS, Linux (incl. WSL), and Windows (Git Bash). Just needs bash + jq. One-line install: git clone https://github.com/fletcherholt/cc-usage-statusline.git cd cc-usage-statusline bash install.sh Repo: https://github.com/fletcherholt/cc-usage-statusline Open to feedback / PRs. submitted by /u/rokorr
Originally posted by u/rokorr on r/ClaudeCode
You must log in or # to comment.
