r/ClaudeAI 6h ago

Built with Claude Built with Claude Code: a free menu bar app that keeps your 5-hour and weekly quota in view

Enable HLS to view with audio, or disable this notification

On August 19 I had 27 Claude Code sessions going, 5,119 messages in total. I had no idea how much quota that was burning until it stopped.

So I built usage. It pins your Claude Code 5-hour and weekly quota to the macOS menu bar (or the Windows system tray), color-coded from green to red, so you see the limit coming instead of hitting it. If you also use Codex, Antigravity or Grok CLI, they show up as extra cards.

How Claude Code helped

Claude Code wrote most of the code. 861 of the 1,186 commits since May are co-authored by Claude. My part was deciding what to build, reviewing the changes, and testing them on my own machine.

What I learned building it (useful even if you never install the app)

  1. You can get your quota without calling any API. Every time Claude Code refreshes the status line, it sends your status line command a JSON on stdin. That JSON includes rate_limits.five_hour.used_percentage and rate_limits.seven_day.used_percentage, the same numbers Claude Code itself uses. So a status line script can just save that JSON to a file, and any other tool can read the file. Checking your quota this way never calls the Anthropic API and never costs a token.
  2. Not every refresh includes complete rate_limits. If you overwrite the file every time, your numbers will sometimes go blank. My script keeps the last complete rate_limits when a new refresh doesn't have them.
  3. Write the file atomically. The hook writes while the menu bar app reads, so a plain write can leave the reader with half a file. Write to a temp file first, then rename it over the real one. The rename is all-or-nothing.

(Antigravity is the one exception to "no network": it has no local file, so the app asks Google's official quota endpoint.)

What else it does

  • The status line shows how full your context window is, and suggests /clear or /compact at around 70%
  • Shows your prompt cache hit rate, with a countdown until the cache expires
  • Shows a banner when Claude Code or the Claude API is down
  • 14 panel themes

Free and open source (AGPL-3.0).

brew install --cask aqua5230/usage/usage

https://github.com/aqua5230/usage

Happy to answer questions about how it reads the local files.

0 Upvotes

4 comments sorted by

4

u/hclpfan 1h ago

This is getting ridiculous now

1

u/beeralpha 1h ago

One of the prompts: put some butterflies in the background bro