Show Claude Code rate limits in waybar — 5h utilization % and hours until reset
- Shell 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
|
|
||
| .github | ||
| install.sh | ||
| LICENSE | ||
| limits-waybar.sh | ||
| README.md | ||
limits-waybar
Show your Claude Code and Codex rate limits in Waybar. Displays 5-hour utilization and time until reset for each tool.
14%:2h 0%:4h
Hover for a tooltip with both 5h and 7d utilization for Claude and Codex.
How it works
- Claude Code: reads your OAuth credentials from
~/.claude/.credentials.jsonand calls the Anthropic usage API (/api/oauth/usage). Responses are cached for 5 minutes. - Codex: reads your ChatGPT auth from
~/.codex/auth.jsonand polls the Codex usage endpoint (/backend-api/wham/usage). Responses are cached for 10 minutes.
Requirements
- waybar
- Claude Code logged in via OAuth for Claude limits
- Codex logged in with ChatGPT auth for Codex limits
curlandjq
Install
git clone https://github.com/backmeupplz/limits-waybar.git
cd limits-waybar
bash install.sh
Then add "custom/limits-waybar" to your Waybar modules and add the module definition to your config.jsonc:
"custom/limits-waybar": {
"exec": "$HOME/.config/waybar/scripts/limits-waybar.sh",
"interval": 600,
"return-type": "json",
"format": "{}",
"tooltip": true
}
If you already use the legacy custom/claude-limits module, rerun install.sh and it will keep working with the updated script.
Restart Waybar.
Manual install
Copy limits-waybar.sh to ~/.config/waybar/scripts/, make it executable, and add the module config above to your Waybar config.
Claude API response
The Claude part calls https://api.anthropic.com/api/oauth/usage, which returns:
{
"five_hour": { "utilization": 14.0, "resets_at": "2026-03-17T17:00:01Z" },
"seven_day": { "utilization": 16.0, "resets_at": "2026-03-20T15:00:01Z" },
"seven_day_sonnet": { "utilization": 20.0, "resets_at": "2026-03-19T21:00:00Z" }
}
License
MIT