Skip to main content

usage-limits-bar

PyPI License: MIT

Claude Code and Codex usage limits, always visible in the macOS menu bar.

See how close each signed-in account is to its session and weekly limits, and when those limits reset, before a coding session is interrupted.

What it looks like

Each signed-in provider gets its own menu-bar item with compact ring gauges and a countdown to its active limit reset. Claude uses green and purple rings; Codex uses blue and teal. A provider that is not signed in is not shown. Warning states stay consistent across providers: orange at 80% and red with ! at 100%.

Signed-in providers Menu bar Dropdown
Claude only One Claude item: green session ring, purple weekly ring, reset countdown Claude session donut, weekly outer arc, Claude limits, sponsor / usage / refresh
Codex only One Codex item: blue session ring, teal weekly ring, reset countdown Codex session donut, weekly outer arc, Codex limits, sponsor / usage / refresh
Claude and Codex Two independent items, one in each provider’s colors Each item opens only its own provider’s limits and controls

Click an item for the full picture. Every provider dropdown uses the same native layout: a large session donut, a thin weekly outer arc, and one row per reported limit with its reset time. Claude errors stay in Claude’s item; Codex errors stay in Codex’s item.

  • Data for Claude and Codex refreshes independently every minute, so one unavailable provider does not hide the other.
  • Every provider dropdown has three header buttons: sponsor, provider usage, and refresh. The gauges spin while fetching.
  • The last successful response for each provider is cached in ~/Library/Caches/usage-limits-bar/ and shown immediately after a restart.
  • The app checks once a day for a newer version and adds an Update available menu item when one exists.

Install

Requires macOS 11+ and Python 3.9+. Pick whichever tool you already use:

Method Install Update
Homebrew brew install tilbertbalaban/tap/usage-limits-bar brew upgrade usage-limits-bar
uv uv tool install usage-limits-bar uv tool upgrade usage-limits-bar
pipx pipx install usage-limits-bar pipx upgrade usage-limits-bar
pip pip install usage-limits-bar pip install -U usage-limits-bar
From source git clone https://github.com/TilbertBalaban/usage-limits-bar && cd usage-limits-bar && uv tool install . git pull && uv tool install . --reinstall

Then:

usage-limits-bar                # launch the menu bar app and return immediately
usage-limits-bar autostart on   # start automatically at login
usage-limits-bar autostart off  # remove the login item
usage-limits-bar status         # print all available limits

After updating, quit the app from its menu and start it again. If autostart was configured under an earlier installation, disable it there once before enabling it with the new command.

Provider setup

Claude Code

Sign in with Claude Code by running claude and using /login. The app reads the OAuth token from the macOS Keychain service Claude Code-credentials, falling back to ~/.claude/.credentials.json, then polls api.anthropic.com/api/oauth/usage.

Claude usage reporting works with Pro and Max plans.

Codex and ChatGPT

Run codex login and choose ChatGPT sign-in. The app reads the OAuth session from ~/.codex/auth.json, or $CODEX_HOME/auth.json when CODEX_HOME is set, then polls chatgpt.com/backend-api/wham/usage. CODEX_ACCESS_TOKEN and the optional CODEX_ACCOUNT_ID environment variables are also supported.

Codex limits are the usage included with the signed-in ChatGPT plan. API-key billing does not expose these ChatGPT plan windows.

Credentials are sent only to their matching provider: Claude tokens to api.anthropic.com, and Codex tokens to chatgpt.com. Tokens are never logged or copied into the cache.

Support

If this app saves you from surprise rate limits, you can support development through the $ button or at base.monobank.ua/tilbertbalaban.

Development

git clone https://github.com/TilbertBalaban/usage-limits-bar
cd usage-limits-bar
python3 -m unittest discover -s tests -v
python3 -m usage_limits_bar.cli status

The data layer (usage_limits_bar/limits.py) is standard-library only and unit-tested. The native menu shell (usage_limits_bar/menubar.py) depends on PyObjC/AppKit.

Troubleshooting

  • ? in the menu bar — open the menu to see which provider needs attention, then sign in with claude or codex login.
  • Usage API rate-limited — the affected provider keeps showing its last cached data while the app backs off for a few minutes.
  • Codex shows no limits — confirm Codex is signed in with ChatGPT, not only an OpenAI API key.
  • Requests stop below 100% — provider APIs may round utilization or report it with a short delay; treat an orange ring as a cue to wrap up.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

usage_limits_bar-2.0.1.tar.gz (19.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

usage_limits_bar-2.0.1-py3-none-any.whl (17.1 kB view details)

Uploaded Python 3

File details

Details for the file usage_limits_bar-2.0.1.tar.gz.

File metadata

  • Download URL: usage_limits_bar-2.0.1.tar.gz
  • Upload date:
  • Size: 19.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for usage_limits_bar-2.0.1.tar.gz
Algorithm Hash digest
SHA256 8557022bb65837678ced70fb7186995eb9211bac53564ee31b12ac6f3a24d74b
MD5 769c86923b0662a41e0fc2e0980dc936
BLAKE2b-256 9c15948aec4925e8248784597b3a087d1f9171259e49739460b8581adb1e29f7

See more details on using hashes here.

Provenance

The following attestation bundles were made for usage_limits_bar-2.0.1.tar.gz:

Publisher: publish.yml on TilbertBalaban/usage-limits-bar

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file usage_limits_bar-2.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for usage_limits_bar-2.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b39be1fa15a5b79afb5babaea98131b8a7f86dd7a395502f1e06792b03f6b916
MD5 5320caa61a3f5445bdfd4be58f896ec6
BLAKE2b-256 e73e87b7a2290e1f91eeed00d6bd1caebb09a5717c77d5249ce40d65307e4140

See more details on using hashes here.

Provenance

The following attestation bundles were made for usage_limits_bar-2.0.1-py3-none-any.whl:

Publisher: publish.yml on TilbertBalaban/usage-limits-bar

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

2.0.1 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page