A persistent status bar for Claude Code CLI that shows your account's rate limit usage (5h and 7d windows), current session context, and countdown to reset — just like the "Usage" page in Claude settings.
The bar updates automatically after every response, right below the input box.
Plain text preview (no color)
Normal │ 5h: ██░░░░░░ 28% reset 2h 14m | 7d: ████░░░░ 55% reset 4d 0h | ctx: ███░░░░░ 42%
Warning │ 5h: ██████░░ 85% reset 0h 42m | 7d: ████░░░░ 62% reset 1d 6h | ctx: ██████░░ 75%
Critical │ 5h: ███████░ 95% reset 0h 12m | 7d: ███████░ 92% reset 3d 2h | ctx: ███████░ 88%
| Field | Meaning | Color thresholds |
|---|---|---|
| 5h | Rate limit over the last 5 hours (daily proxy) | green < 80% · orange 80–90% · red ≥ 90% |
| 7d | Weekly rate limit | green < 80% · orange 80–90% · red ≥ 90% |
| ctx | Context window usage for the current session | green < 70% · orange 70–80% · red > 80% |
| reset | Countdown to limit reset | hours/minutes if < 24h · days and hours if ≥ 24h |
Note:
5hand7dshow real data only with a Claude.ai Pro or Max plan. They will appear asN/Awhen using a standalone API key.
- Claude Code CLI installed
- Python 3.6+ (macOS/Linux: pre-installed · Windows: python.org)
- Claude.ai Pro or Max plan for rate limit data
git clone https://github.com/bhutano/claude-usage-bar.git
cd claude-usage-bar
bash install.shThe installer will ask you to choose a language, then set everything up automatically.
Then restart Claude Code.
-
Copy
statusline-usage.shto~/.claude/and make it executable:cp statusline-usage.sh ~/.claude/statusline-usage.sh chmod +x ~/.claude/statusline-usage.sh
-
Copy the config file:
cp usage-bar.conf ~/.claude/usage-bar.conf -
Add to
~/.claude/settings.json:{ "statusLine": { "type": "command", "command": "~/.claude/statusline-usage.sh" } } -
Restart Claude Code.
Copy the repo folder into ~/.claude/skills/:
cp -r . ~/.claude/skills/usage-barThen type /usage-bar inside Claude Code to install everything automatically.
Open ~/.claude/usage-bar.conf and change the LANG line:
LANG=en # English
LANG=it # ItalianoNo restart needed — the change takes effect on the next response.
bash install.sh --lang itOverride the language for a single session without changing the config:
USAGE_BAR_LANG=it claudeType /usage-bar and ask Claude to change the language.
| Code | Language |
|---|---|
en |
English |
it |
Italiano |
Open statusline-usage.sh and add a new entry to the T dictionary in the Python block:
T = {
"en": { ... },
"it": { ... },
"fr": { # ← add your language here
"waiting": "En attente de la première réponse...",
"reset_now": "réinitialisation maintenant",
"na": "N/D",
"5h": "5h",
"7d": "7j",
"ctx": "ctx",
"reset": "réinit.",
"days": "j",
"hours": "h",
"minutes": "m",
},
}Then set LANG=fr in ~/.claude/usage-bar.conf.
Claude Code pipes a JSON object to the script's stdin after each response. The script extracts rate_limits and context_window fields and formats them with ANSI color bars and a reset countdown.
Relevant JSON fields:
{
"context_window": {
"used_percentage": 42
},
"rate_limits": {
"five_hour": { "used_percentage": 28.0, "resets_at": 1743000000 },
"seven_day": { "used_percentage": 55.0, "resets_at": 1743500000 }
}
}claude-usage-bar/
├── README.md ← this file
├── SKILL.md ← /usage-bar skill (auto-installer + help)
├── statusline-usage.sh ← status bar script (i18n, cross-platform)
├── usage-bar.conf ← language config (copy to ~/.claude/)
└── install.sh ← one-shot installer with language prompt
| Platform | Status |
|---|---|
| macOS | ✓ |
| Linux | ✓ |
| Windows (Git Bash / WSL) | ✓ |
Python is auto-detected (python3, python, common paths). No external dependencies — standard library only.
MIT
Una barra di stato persistente per Claude Code CLI che mostra in tempo reale i limiti di utilizzo dell'account (finestre 5h e 7d), la finestra di contesto della sessione corrente e il countdown al reset — esattamente come la pagina "Utilizzo" nelle impostazioni di Claude.
La barra si aggiorna automaticamente dopo ogni risposta, sotto la casella di input.
| Campo | Significato | Soglie colore |
|---|---|---|
| 5h | Rate limit ultime 5 ore (proxy giornaliero) | verde < 80% · arancione 80–90% · rosso ≥ 90% |
| 7d | Rate limit settimanale | verde < 80% · arancione 80–90% · rosso ≥ 90% |
| ctx | Finestra di contesto della sessione corrente | verde < 70% · arancione 70–80% · rosso > 80% |
| reset | Countdown al reset | ore/minuti se < 24h · giorni e ore se ≥ 24h |
Nota:
5he7dmostrano dati reali solo con piano Claude.ai Pro o Max. Con API key standalone appariranno comeN/A.
git clone https://github.com/bhutano/claude-usage-bar.git
cd claude-usage-bar
bash install.shL'installer chiederà la lingua preferita e configurerà tutto automaticamente.
Poi riavvia Claude Code.
-
Copia
statusline-usage.shin~/.claude/e rendilo eseguibile:cp statusline-usage.sh ~/.claude/statusline-usage.sh chmod +x ~/.claude/statusline-usage.sh
-
Copia il file di configurazione:
cp usage-bar.conf ~/.claude/usage-bar.conf -
Aggiungi a
~/.claude/settings.json:{ "statusLine": { "type": "command", "command": "~/.claude/statusline-usage.sh" } } -
Riavvia Claude Code.
Apri ~/.claude/usage-bar.conf e cambia la riga LANG:
LANG=en # English
LANG=it # ItalianoNon serve riavviare — la modifica è attiva dalla risposta successiva.
bash install.sh --lang enUSAGE_BAR_LANG=en claudeScrivi /usage-bar e chiedi a Claude di cambiare la lingua.
Apri statusline-usage.sh e aggiungi una nuova voce nel dizionario T nel blocco Python:
T = {
"en": { ... },
"it": { ... },
"fr": { # ← aggiungi qui la tua lingua
"waiting": "En attente de la première réponse...",
"reset_now": "réinitialisation maintenant",
"na": "N/D",
"5h": "5h",
"7d": "7j",
"ctx": "ctx",
"reset": "réinit.",
"days": "j",
"hours": "h",
"minutes": "m",
},
}Poi imposta LANG=fr in ~/.claude/usage-bar.conf.