Skip to content

About

No description, website, or topics provided.

Resources

Stars

3 stars

Watchers

0 watching

Forks

Repository files navigation

Claude Usage app icon

Claude Usage

Your Claude plan limits as circular meters in the macOS menu bar.

macOS 13+ Swift 5.9 MIT License

🐧 On Linux? Try polybar-claude-usage by @rogsme, which puts the same usage in your Polybar.

Four usage rings in the menu bar, with the details panel open below them

Claude Usage puts one small ring in your menu bar for each of your Claude plan's limits. Each ring fills as you use that limit up, so you can see at a glance how close you are before you hit one.

  • 5: the rolling 5-hour session limit
  • W: the weekly limit across all models
  • S, O, F, …: per-model weekly limits (Sonnet, Opus, Fable, …). These appear once you start using them.

These are the same numbers shown by /usage in Claude Code and on claude.ai › Settings › Usage. The limits are shared between claude.ai, the Claude apps and Claude Code, so the rings show your usage across all of them.

Features

  • At-a-glance rings. They turn orange, then red, as you get close to a limit, following Claude's own reading of each one.
  • Details on click. The panel shows exact percentages and when each limit resets. Pin or unpin any limit to choose which rings stay in the menu bar.
  • Claude Code doesn't need to be open. The app asks your installed Claude Code for its /usage report in the background. Claude Code keeps its own sign-in fresh, and the app never sees a token.
  • Light and dark menu bars. Three color styles, optional percentages, and labels inside the rings.
  • Polite polling. It refreshes every 5 minutes by default and backs off when Claude rate-limits. It also refreshes right after a limit resets and fades the rings when the data is out of date.
  • Tiny and private. It's a native AppKit/SwiftUI app with no dependencies, no analytics and no Dock icon.

Install

You'll need:

  • macOS 13 Ventura or later, on Apple silicon or Intel
  • Claude Code, signed in once with your Claude Pro, Max, Team or Enterprise account (run claude auth login)

Download

  1. Download Claude-Usage.dmg from the latest release.
  2. Open it and drag Claude Usage onto the Applications folder.
  3. Open Claude Usage from Applications. The rings appear in your menu bar right away. To keep them there after a restart, open Settings… and turn on Launch at login.

The first time you open it, macOS asks you to confirm, because the app isn't notarized by Apple:

  • macOS 15 Sequoia or later: macOS says it can't verify the app. Click Done, open System Settings › Privacy & Security, scroll down and click Open Anyway.
  • macOS 13 or 14: Control-click the app in Applications, choose Open, then click Open again.

To update, download the new version and drag it onto Applications again, replacing the old one. Opening it quits the old copy in the menu bar.

Build from source

You'll also need Xcode 15+ or the Xcode Command Line Tools (Swift 5.9+).

git clone https://github.com/mihok/osx-claude-usage.git
cd osx-claude-usage
make install

make install builds Claude Usage.app, copies it to /Applications (or ~/Applications) and starts it. To update, git pull and run make install again.

Using it

Action What happens
Click the rings Opens the details panel
Right-click the rings Refresh Now, Settings…, Quit
Click a 📌 pin in the panel Shows or hides that limit's ring in the menu bar
Hover over the rings A tooltip lists every limit and its reset time

Menu bar styles

Choose a style in Settings › Menu bar. You can also replace the labels inside the rings with percentages next to them.

The ring styles on light and dark menu bars: adaptive, traffic light, monochrome, with percentages, and faded when out of date

Where the numbers come from

Every few minutes the app runs your installed Claude Code in the background with its /usage command:

claude -p /usage --output-format stream-json --verbose --no-session-persistence --safe-mode
  • /usage runs inside Claude Code. No message is sent to a model, so checking usage doesn't use any of it up.
  • Claude Code fetches the numbers with its own sign-in. It renews that sign-in when needed, so you never have to open Claude Code just to keep the rings working. The app never reads, stores or sends a Claude token or cookie.
  • The checks stay out of your way. --safe-mode keeps your hooks, plugins and MCP servers from starting, and --no-session-persistence keeps the checks out of your session history.
  • It never runs without those options. If your Claude Code is too old to know them, the app asks you to update it instead.

Claude Code runs with the same environment your shell gives it in Terminal, minus ANTHROPIC_API_KEY, ANTHROPIC_AUTH_TOKEN and CLAUDE_CODE_OAUTH_TOKEN. An API key or token can't report your plan's usage, so Claude Code uses your Claude account's sign-in instead. The app looks for claude on that PATH and in the usual install locations, such as ~/.local/bin and /opt/homebrew/bin, and uses the newest one it finds. To use a different one, choose it in Settings › Claude Code.

Privacy and security

  • The app makes no network requests of its own. Claude Code does the fetching, with the sign-in it already has.
  • It never reads, stores or sends Claude credentials, tokens or cookies.
  • If Claude Code says it isn't signed in, the app checks whether Claude Code's sign-in is in your Keychain, to explain why. It only asks whether the entry exists and never reads it.
  • It has no analytics, telemetry or update checks.
  • The source is small and readable. Start with ClaudeCLI.swift to see exactly how Claude Code is run.

Troubleshooting

"Couldn't find Claude Code" Install Claude Code. If it's already installed in an unusual place, choose the claude executable in Settings › Claude Code. Run which claude in Terminal to find it.

"Claude Code isn't signed in" Run claude auth login in Terminal and sign in with your Claude account. Claude Code doesn't need to stay open; the rings update within a minute. Your sign-in lasts a long time, but if it ever fully expires, sign in again the same way.

If claude already works in Terminal, the app may have found a different install. Settings › Claude Code shows which claude it uses and its version; compare that with which claude and claude --version in Terminal, and choose the right one if they differ. The app runs Claude Code with your shell's environment, so restart the app after changing your shell profile.

"In Terminal, Claude Code signs in with CLAUDE_CODE_OAUTH_TOKEN" (or ANTHROPIC_API_KEY, ANTHROPIC_AUTH_TOKEN) Your shell profile signs Claude Code in with a token or API key. Neither can report your plan's usage, so the app leaves them out, and Claude Code then has no sign-in of its own. Sign in once with your Claude account, leaving the variable out:

env -u CLAUDE_CODE_OAUTH_TOKEN claude auth login

The variable stays set, so Claude Code in Terminal keeps working as before.

"In Terminal, claude is an alias" (or a shell function) An alias or function can run Claude Code with other settings, such as a different CLAUDE_CONFIG_DIR. Run type claude to see what it does. To sign in without it, run command claude auth login. If it sets CLAUDE_CONFIG_DIR, export that in your shell profile instead so the app uses it too, then restart Claude Usage.

"Claude Code couldn't read its sign-in from the Keychain" Your Keychain has Claude Code's sign-in, but Claude Code couldn't read it when the app started it. Make sure your login keychain is unlocked, or run claude auth login to save the sign-in again.

"Claude Code … is too old to report usage" Run claude update, or choose a newer install in Settings › Claude Code.

"Claude Code couldn't fetch your usage" Claude limits how often usage can be checked. The app keeps showing the last known values and retries with a growing delay. If it keeps happening, set a longer refresh interval. Updating Claude Code with claude update can also help.

macOS says the app can't be opened or verified This happens the first time you open a downloaded copy. Confirm it as described under Download, or run xattr -dr com.apple.quarantine "/Applications/Claude Usage.app" in Terminal.

Anything else Click Copy Diagnostics in the error message or in Settings and paste it into an issue. It lists which claude ran, its version, whether it's signed in, which sign-in variables your shell sets (names only) and what Claude Code printed. It contains no email address, token or key.

Development

make build     # swift build (debug)
make test      # unit tests (needs full Xcode for XCTest)
make app       # build/Claude Usage.app, release, ad-hoc signed
make dmg       # build/Claude-Usage.dmg to share: the app for Apple silicon and Intel, next to Applications
make release   # build the disk image and publish it as a GitHub release for the version in VERSION
make run       # build and launch the .app
make preview   # render the rings, panel, settings and icon with sample data to build/preview

You can also open the folder in Xcode (xed .), pick the ClaudeUsage scheme and press ⌘R.

Sources/ClaudeUsageCore/   Running Claude Code, parsing its usage report, formatting, refresh scheduling (unit-tested, Foundation only)
Sources/ClaudeUsage/       The app: status item, ring renderer, details panel, settings
Tests/                     XCTest suite for ClaudeUsageCore
Packaging/Info.plist       App bundle metadata (menu bar only, no Dock icon)
scripts/                   build-app.sh (assemble, render icon, sign), make-dmg.sh, release.sh and install.sh

To build a universal (Apple silicon + Intel) app, run UNIVERSAL=1 make app.

Releasing

  1. Raise the number in VERSION, then commit and push.
  2. Run make release. It needs the GitHub CLI (brew install gh, then gh auth login). It builds Claude-Usage.dmg, tags the release v<VERSION> and uploads it, so the download link above always gets the newest version.

Without an Apple Developer ID, the app is ad-hoc signed and people confirm it once on first launch. With a Developer ID (Apple Developer Program), sign and notarize it so it opens like any other downloaded app:

# Once: save notarization credentials (uses an app-specific password from appleid.apple.com)
xcrun notarytool store-credentials claude-usage --apple-id you@example.com --team-id TEAMID

CODESIGN_IDENTITY="Developer ID Application: Your Name (TEAMID)" NOTARY_PROFILE=claude-usage make release

Caveats

  • The structured usage report Claude Code prints is marked experimental, so its shape may change between Claude Code versions. If it does, the app falls back to reading /usage's text, which has percentages but not reset times.
  • Not affiliated with or endorsed by Anthropic. Claude is a trademark of Anthropic, PBC.

License

MIT

About

No description, website, or topics provided.

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages