README.md
May 6, 2026 · View on GitHub
MyUsage
One menu bar for every AI coding tool — across every Mac you use.
Project site: zchan0.github.io/MyUsage — landing, install guide, multi-device sync deep dive, blog.

Why MyUsage
If you use Claude Code, Codex, Cursor, or Antigravity — and especially if you use them across more than one Mac — the official UIs only show what's happening on the device you're sitting at. You hit a weekly limit on Friday afternoon because your laptop has been chewing through tokens all morning while your desktop's "remaining" number lied to you.
MyUsage fixes this with a small native menu bar app that:
- Talks to all four providers and shows them in one popover, so you don't have to flip between four UIs.
- Aggregates across every Mac you own by writing tiny snapshots into a folder you already sync (iCloud Drive, Syncthing, Dropbox, an NFS mount — your call). No MyUsage backend exists; the sync transport is yours.
- Tells you when you're about to run out — when current burn rate would push a limit past 100% before reset, the bar gets a dashed projection marker overflowing past the right edge and a
projected 118%note in the footer. Healthy projections stay silent.
It's free, MIT, no telemetry, and pure Swift / SwiftUI with zero third-party dependencies.
Highlights
- Multi-device aggregation, BYO sync transport. Each Mac drops a per-device JSONL snapshot into
<sync-folder>/devices/<id>/. Use iCloud, Syncthing, Dropbox, NAS, or anything else that keeps a folder in sync. The Devices tab in Settings lets you forget retired peers. - Four providers in one popover — Claude Code, Codex, Cursor, Antigravity. Reorder and enable/disable per provider in Settings.
- Burn-rate projection — alarm-only. When the projected end-of-window usage would exceed 100%, the rolling-window bar surfaces a dashed marker overflowing past the right edge and a
projected 118%footer note in warn-amber. Healthy projections are intentionally silent — the bar fill alone tells you you have headroom; an extra "you'll land at 31%" marker would just be noise. The math waits for at least 20% of the window to elapse before computing anything, so a single early prompt can't false-trigger the alarm. - Per-bucket weekly breakdown for Claude. Anthropic's
/api/oauth/usageexposes plan-dependent sub-caps — model families (Opus, Sonnet, Haiku) and product lines (Design, Cowork, OAuth-apps). MyUsage surfaces every non-zero bucket as an indented row under the weekly bar. Plans without separate sub-caps (e.g. Max 5x, where everything pools into the unified weekly total) show none. - Limit-pressure notifications. Native macOS notifications fire the moment any tracked limit crosses your warn / crit threshold (default 80% / 95%, both tunable). Idempotent — same percent across two refreshes never double-fires.
- In-app update channel. On launch, MyUsage checks GitHub Releases and shows a banner when a newer tag is available. The Settings → About banner can download the next release and reveal it in Finder one drag away from /Applications.
- Privacy-respecting device identity. Multi-device sync uses a salted SHA-256 of
IOPlatformUUIDas the device ID; the raw hardware UUID never leaves the process. Cached in UserDefaults so reinstalling doesn't create a duplicate device. - Zero third-party dependencies. Built only with SwiftUI, SQLite3, Security.framework, Foundation. No Electron, no Sparkle, no analytics SDK.
Supported Providers
| Provider | Data Source | What You See |
|---|---|---|
| Claude Code | OAuth API (~/.claude/.credentials.json / Keychain) + /api/oauth/profile for plan label | 5h session + weekly bars · per-bucket breakdown (model + product caps when plan exposes them) · burn-rate projection · monthly cost (multi-device) |
| Codex | OAuth API (~/.codex/auth.json / Keychain) | 5h session + weekly bars · burn-rate projection · monthly cost (multi-device) · credits |
| Cursor | Local SQLite + Connect RPC (state.vscdb) | Included quota + on-demand budget bars · billing-cycle countdown |
| Antigravity | Local language server process probe | Per-model quota bars · IDE running indicator |
Requirements
- macOS 14+ (Sonoma)
- At least one supported tool installed and signed in
Install
Download the latest MyUsage-<version>.zip from GitHub Releases, unzip it, then move MyUsage.app to /Applications.
MyUsage is ad-hoc signed (no paid Apple Developer certificate), so Gatekeeper will warn on first launch:
- Right-click
MyUsage.app->Open->Openonce. - Or run:
xattr -cr /Applications/MyUsage.app && open /Applications/MyUsage.app
Each release includes a .sha256 file for checksum verification.
Quick Usage
- Launch MyUsage from
/Applications. - Click the menu bar icon to open the usage popover.
- Use the refresh button for manual sync.
- Open Settings for:
General: refresh interval, menu bar tracking, estimated cost toggle, sync folder, launch at loginProviders: reorder providers and toggle each provider on/offDevices: inspect aggregated monthly cost by device and forget stale peersAbout: app version and project link
Build from Source
# Release build + app bundle
./Scripts/package_app.sh
# Or build release binary only
swift build -c release
# Open packaged app
open MyUsage.app
Open in Xcode (SwiftPM workspace):
open .swiftpm/xcode/package.xcworkspace
Architecture Notes
UsageManagerdrives refresh orchestration and UI state.- Provider adapters normalize external/local data into a shared snapshot model.
- Device sync writes each Mac's monthly totals into its own subfolder in the selected sync directory.
More details: docs/architecture.md
Privacy and Data
- MyUsage reads local credential/state files and keychain entries needed by each provider integration.
- Network requests are sent only to provider endpoints required for usage retrieval.
- Multi-device sync uses a user-selected local/shared folder; MyUsage does not run its own cloud backend.
Roadmap
Possible directions, not commitments. Open an issue if any of these would make MyUsage materially more useful for you:
- Notarized + signed releases — so the .app opens without the Gatekeeper warning on a fresh Mac. Blocked on an Apple Developer account.
- More providers as APIs become available. GitHub Copilot is the most requested but doesn't currently expose per-user usage to individual subscribers; we'll add it the moment that changes.
- iOS / iPadOS companion for at-a-glance checking when you're not at a Mac. Lower priority than core macOS feature work.
License
MIT