Back to Portfolio

Token Usage Indicator

A tiny menu bar app that shows how much of my Claude plan I've used, without opening a terminal.

My Claude usage is shared across every terminal session, script, and scheduled automation I run, not just whichever one I happen to be looking at, so no single window ever shows the full picture. I built a small menu bar app that reads the same local cache Claude Code keeps on disk and surfaces that combined usage at a glance, with no API key of its own and no extra network calls.

No API key needed

Claude Code already caches your account's usage numbers locally every time it checks your rate limits. Rather than authenticate against Anthropic's API separately, the app just reads that file every 30 seconds and pulls out the session and weekly percentages. That keeps the whole thing a single Python script with no credentials of its own to store, rotate, or leak.

The Claude usage icon shown live in the macOS menu bar, next to the other system icons

Flagging stale numbers

The usage cache doesn't update on every request, so there's a short window, usually 15 to 30 minutes, where the number can lag behind reality. The app tracks the age of its last read and adds a small warning triangle to the menu bar once it crosses that window, so I always know when the count might be a few minutes behind rather than trusting it blindly.

Closeup of the menu bar item showing 18 percent usage with a stale-data warning triangle