Show Claude Code rate limits in waybar — 5h utilization % and hours until reset
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Nikita Kolmogorov b21e7782da Add funding links
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 15:24:44 -07:00
.github Add funding links 2026-10-08 15:24:44 -07:00
install.sh Poll OpenAI usage limits directly 2026-05-04 08:23:05 -07:00
LICENSE Initial commit: claude code rate limits for waybar 2026-03-17 07:48:59 -07:00
limits-waybar.sh Poll OpenAI usage limits directly 2026-05-04 08:23:05 -07:00
README.md Poll OpenAI usage limits directly 2026-05-04 08:23:05 -07:00

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.json and calls the Anthropic usage API (/api/oauth/usage). Responses are cached for 5 minutes.
  • Codex: reads your ChatGPT auth from ~/.codex/auth.json and 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
  • curl and jq

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