Show HN: macOS menu bar gauges for your Claude Code quota

grzracz1 pts0 comments

GitHub - grzegorz-raczek-unit8/claude-quota: Menu bar gauges for Claude Code quota (SwiftBar plugin) · GitHub

/" data-turbo-transient="true" />

Skip to content

Search or jump to...

Search code, repositories, users, issues, pull requests...

-->

Search

Clear

Search syntax tips

Provide feedback

--><br>We read every piece of feedback, and take your input very seriously.

Include my email address so I can be contacted

Cancel

Submit feedback

Saved searches

Use saved searches to filter your results more quickly

-->

Name

Query

To see all available qualifiers, see our documentation.

Cancel

Create saved search

Sign in

/;ref_cta:Sign up;ref_loc:header logged out"}"<br>Sign up

Appearance settings

Resetting focus

You signed in with another tab or window. Reload to refresh your session.<br>You signed out in another tab or window. Reload to refresh your session.<br>You switched accounts on another tab or window. Reload to refresh your session.

Dismiss alert

{{ message }}

grzegorz-raczek-unit8

claude-quota

Public

Notifications<br>You must be signed in to change notification settings

Fork

Star

main

BranchesTags

Go to file

CodeOpen more actions menu

Folders and files<br>NameNameLast commit message<br>Last commit date<br>Latest commit

History<br>12 Commits<br>12 Commits

docs

docs

.gitignore

.gitignore

LICENSE

LICENSE

README.md

README.md

claude-quota.5m.py

claude-quota.5m.py

install.sh

install.sh

View all files

Repository files navigation

claude-quota

Menu bar gauges for your Claude Code quota — one bar per account, like this:

(drawn for dark menu bars — white outlines)

Each bar shows the 5-hour-window utilization for one account, colored<br>green / orange (≥70%) / red (≥90%).

When the 5-hour window is fully used, the bar shows a countdown until<br>reset (4:28) instead of the percentage.

When the weekly limit is hit, the bar turns black with a countdown<br>to the weekly reset (2D) — that's the harder cap, whatever the 5-hour<br>window says.

The dropdown lists full detail for every account inline: 5-hour and weekly<br>windows, per-model windows where your plan reports them, extra-usage<br>credits, and reset times.

Refreshes every 5 minutes (SwiftBar filename convention) plus a manual<br>"Refresh now" entry.

Quick install

curl -fsSL https://raw.githubusercontent.com/grzegorz-raczek-unit8/claude-quota/main/install.sh | bash

Requires macOS and Homebrew. When macOS shows a Keychain<br>permission dialog on the first refresh, click Always Allow .

How it works

The plugin reads your Claude Code OAuth token from the macOS Keychain<br>(read-only — it never refreshes or rewrites tokens, so it can't log you<br>out) and queries the same usage endpoint that Claude Code's /usage screen<br>uses. No passwords, no scraping, no third-party services.

Note: that endpoint is internal to Claude Code and undocumented, so a<br>future Claude Code change may require a small fix here.

Install from a checkout

git clone https://github.com/grzegorz-raczek-unit8/claude-quota.git<br>cd claude-quota<br>./install.sh

Either install path sets up SwiftBar<br>via Homebrew if you don't have it. If an account shows ⚠, its token went<br>stale from disuse — run that claude CLI once and the widget recovers on the<br>next cycle.

Accounts

By default the plugin auto-discovers accounts: every ~/.claude /<br>~/.claude-* config directory that has a Claude Code Keychain entry gets a<br>bar, labeled by the directory suffix (~/.claude-work → W). A single<br>auto-discovered account shows no letter label — just the bar.

To pin or rename accounts (e.g. you use multiple CLAUDE_CONFIG_DIRs), create<br>~/.config/claude-quota/accounts with one path [label] per line<br>(single-word labels):

~/.claude-work Work<br>~/.claude-priv Priv

To hide an account's menu bar gauge (its dropdown detail stays), use<br>Hide from menu bar under that account's row in the dropdown — or edit<br>~/.config/claude-quota/hidden (one label per line).

Multiple accounts via CLAUDE_CONFIG_DIR look like this in your shell rc:

claude() { CLAUDE_CONFIG_DIR="$HOME/.claude-work" command claude "$@"; }<br>claude-priv() { CLAUDE_CONFIG_DIR="$HOME/.claude-priv" command claude "$@"; }

Uninstall

Delete claude-quota.5m.py from your SwiftBar plugin folder<br>(~/.swiftbar by default).

About

Menu bar gauges for Claude Code quota (SwiftBar plugin)

Resources

Readme

License

MIT license

Uh oh!

There was an error while loading. Please reload this page.

Activity

Stars

stars

Watchers

watching

Forks

forks

Report repository

Releases

No releases published

Packages

Uh oh!

There was an error while loading. Please reload this page.

Contributors

Uh oh!

There was an error while loading. Please reload this page.

Languages

Python<br>93.4%

Shell<br>6.6%

You can’t perform that action at this time.

claude quota code menu install account

Related Articles