Skip to content

Latest commit

 

History

25 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LLMits

CI Latest release

LLMits is an open-source macOS menu-bar utility for viewing quota utilization from Claude, ChatGPT, and Antigravity subscriptions. It targets macOS 14+ and keeps credentials and usage data local.

Product preview

LLMits popover showing Claude and ChatGPT quota usage

LLMits Claude and ChatGPT quota percentages in the macOS menu bar

Important

LLMits uses provider OAuth and quota endpoints that are not public, supported APIs. Provider-side changes may temporarily break authentication or usage reporting.

Quick install

Install the latest release with one command:

curl -fsSL https://raw.githubusercontent.com/aryan1306/LLMits/main/install.sh | bash

Features

  • Live quota usage for Claude, ChatGPT, and Antigravity, including Antigravity's Gemini and Claude & GPT pools when reported
  • Claude subscription plan detection, including Pro and Max tiers
  • Choose one to three connected providers for the menu bar; Claude and Codex are selected by default
  • Pin providers from the popover and drag to reorder them in Settings; the popover shows every connected provider
  • Used or remaining percentage display modes
  • Claude PKCE and ChatGPT device-code sign-in, plus read-only use of an existing agy CLI login
  • Credentials stored in macOS Keychain
  • Automatic token refresh, configurable polling, and refresh after wake
  • Relative freshness labels, reset times, stale-data indicators, and manual refresh
  • Local snapshot cache so the latest usage remains visible between launches
  • Automatic GitHub release checks with an in-app, user-approved update and relaunch
  • No backend, analytics, telemetry, or account-identity data in cached snapshots

Supported subscriptions

Service Plans Sign-in Quota shown
Claude Pro, Max (5× and 20×), Team, and Enterprise, detected from your account Browser sign-in, then paste the authorization code Five-hour and weekly windows
ChatGPT (Codex) ChatGPT plans that include Codex, labeled with the plan reported by the Codex usage endpoint (for example, Plus or Pro) One-time device code in the browser Five-hour and weekly windows, plus any additional limits the endpoint reports
Antigravity Google accounts with Antigravity access, labeled with the tier reported by agy An existing agy CLI login Gemini and Claude & GPT pools, each with five-hour and, when reported, weekly windows

Each connection tracks one account per service. Provider usage endpoints are unofficial, so available windows and plan labels can change without notice.

Run locally

Requirements:

  • macOS 14 or newer
  • Xcode 16 or newer, including the command-line tools

Clone and run the project:

git clone https://github.com/aryan1306/LLMits.git
cd LLMits
swift test
swift run LLMits

LLMits runs as a menu-bar accessory without a Dock icon. Click its menu-bar item, open Settings…, then choose Connect beside a provider:

  • Claude: complete authorization in the browser, then paste the authorization code or full callback URL into LLMits.
  • ChatGPT: enter the one-time code on the page opened by LLMits and wait for approval.
  • Antigravity: sign in by running agy in Terminal first. LLMits runs agy's read-only /usage report and never reads, copies, or changes its credentials. Set ANTIGRAVITY_CLI_PATH if agy is not in ~/.local/bin, /opt/homebrew/bin, or /usr/local/bin.

Open Settings → Connections to disconnect a provider from LLMits. Disconnecting an agy connection does not sign out of the CLI. In Settings → Menu Bar, drag selected providers or use the arrow buttons to change their order.

After connecting, the menu bar shows the configured used or remaining percentage. Pin up to three connected providers in the popover, and drag their rows in Settings to set their order. Antigravity uses the Gemini pool by default; choose Claude & GPT in Settings if preferred. Each pool prefers its five-hour window and falls back to weekly when available. Open the popover for every connected provider's available quota windows, reset times, plan details, and refresh status.

Note

LLMits keeps Claude and ChatGPT credentials in a single Keychain item and reads it only when a connected provider refreshes, so launching with nothing connected never prompts. Running with swift run produces an ad-hoc-signed development executable, so macOS may ask for Keychain access again after a rebuild because the executable identity changes. Choose Always Allow for the current build, or use a consistently signed app bundle for stable Keychain trust.

Install

To inspect the script before running it:

curl -fsSL https://raw.githubusercontent.com/aryan1306/LLMits/main/install.sh -o install-llmits.sh
less install-llmits.sh
bash install-llmits.sh

Pass options through bash to install into ~/Applications without administrator access or select a specific release:

curl -fsSL https://raw.githubusercontent.com/aryan1306/LLMits/main/install.sh | bash -s -- --user
curl -fsSL https://raw.githubusercontent.com/aryan1306/LLMits/main/install.sh | bash -s -- --version 1.0.0

You can also download LLMits.dmg from the latest release, open it, and drag LLMits into Applications.

Release builds are signed with a self-signed LLMits certificate, which keeps Keychain access approved across updates. The certificate is not issued by Apple, so on first launch macOS may require you to right-click LLMits and choose Open. A future Developer ID-signed and notarized release will remove this extra confirmation.

Packaged apps check GitHub for a newer published release at launch, every six hours, and after wake. When an update is available, the popover's refresh control becomes a small download icon. Click it for Update and Relaunch, Refresh quotas, or Cancel. To check right away, choose Check Now under Settings → Updates; manual checks are limited to one per minute and pause while GitHub's API rate limit is in effect. After confirmation, LLMits downloads and verifies the release, replaces the app in its current location, then relaunches. Updating requires write access to the app's containing folder. Development builds started with swift run do not self-update.

How it works

  • AppKit owns the status item and transient popover; SwiftUI renders the popover and settings UI.
  • LLMitsCore contains provider-neutral quota models, OAuth flows, endpoint adapters, persistence, formatting, and refresh policy.
  • Claude usage comes from the OAuth usage endpoint and is enriched with profile data for the plan label.
  • ChatGPT usage comes from the Codex usage endpoint associated with the authorized account.
  • Antigravity usage comes from agy's /usage report. The unofficial remote response may omit weekly windows.
  • Quota values are clamped and normalized before display, with a five-hour window preferred in the menu bar and weekly usage used as a fallback.

See Architecture and Roadmap.

Development

Run the complete test suite:

swift test

Build without launching the app:

swift build

Create a universal app and DMG locally:

./scripts/build-dmg.sh 0.1.0

Without signing variables the app is ad-hoc signed. To sign with the release certificate, pass a PKCS#12 identity:

CODESIGN_P12_PATH=path/to/llmits-codesign.p12 CODESIGN_P12_PASSWORD=… ./scripts/build-dmg.sh 0.1.0

The script imports the identity into a temporary keychain, signs, and removes it. Tagged releases require the CODESIGN_P12_BASE64 and CODESIGN_P12_PASSWORD repository secrets. Keep the certificate unchanged: a new certificate changes the app's identity and makes every user approve Keychain access again.

Artifacts are written to dist/. GitHub Actions runs CI on pushes and pull requests. A manual Build DMG workflow run uploads the DMG as a workflow artifact; pushing a tag such as v0.1.0 also creates a GitHub Release with the DMG and SHA-256 checksum.

The test suite covers authorization primitives, credential storage, provider response parsing, quota calculations, persistence, diagnostics, refresh policy, and update detection. The live updater integration test is skipped by default. To run it against the latest GitHub release, build an older packaged version in a temporary directory and run:

TEST_DIST=$(mktemp -d)
DIST_DIR="$TEST_DIST" ./scripts/build-dmg.sh 0.1.0
LLMITS_UPDATE_TEST_CURRENT_APP="$TEST_DIST/LLMits.app" swift test --filter UpdateIntegrationTests

The test copies that app into another temporary directory, then checks download, verification, waiting for the old process, replacement, relaunch, and rollback. It does not modify the app installed in Applications.

Privacy

LLMits has no backend, analytics, telemetry, or crash-reporting service. Packaged apps contact GitHub to check for releases and download an update only after approval. OAuth credentials are stored in macOS Keychain. Cached quota snapshots are written locally and contain neither credentials nor account identity.

License

MIT

About

An open-source macOS menu-bar utility for viewing quota utilization from Claude Code and Codex subscriptions

Topics

Resources

Stars

7 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages