Skip to content

mstallone/runway

 
 

Repository files navigation

OpenUsage

Track your AI coding subscriptions from the macOS menu bar — native Swift edition.

OpenUsage shows how much of your AI coding plans you've used: session and weekly limits, credits, and spend, all in one popover. Pin your most important metrics straight into the menu bar.

OpenUsage menu bar tracker showing Claude and Codex session, weekly, and spend usage

Installation

Direct download: grab the latest universal DMG from the releases page, open it, and drag OpenUsage to your Applications folder.

The app updates itself in place via signed, notarized Sparkle updates. Requires macOS 15 (Sequoia) or later.

Supported Providers

  • Antigravity — shared Gemini and Claude pool quotas, 5-hour and weekly windows
  • Claude — session, weekly, model-specific limits, extra usage, local daily spend
  • Codex — session, weekly, credits, local daily spend
  • Copilot — AI credits, extra usage, organization billing, chat and completions
  • Cursor — credits, total/auto/API usage, requests, on-demand, per-day spend
  • Devin — weekly and daily quota, extra usage balance
  • Grok — weekly shared pool, pay-as-you-go, local daily spend
  • Kimi — five-hour and weekly Kimi Code quota, Extra Usage balance and monthly spend
  • OpenCode — Go session/weekly/monthly caps, Zen spend, local daily spend
  • OpenRouter — credit balance, daily/weekly/monthly spend (API key)
  • Sakana Fugu — subscription quota plus local Fugu Ultra usage trend and estimated API-rate value
  • Z.ai — session, weekly, web-search quotas (GLM Coding Plan, API key)

Most providers read the credentials already on your machine (keychain, auth files, app state) — no extra login. OpenRouter and Z.ai are the exceptions: they have no local credential to reuse, so you supply an API key (see OpenRouter setup or Z.ai setup). Credentials are used only for the corresponding provider requests. OpenUsage collects no product analytics or usage statistics; public pricing downloads and optional iCloud sync are documented under Privacy.

Features

  • Menu bar pins. Pin metrics to the menu bar (up to 2 per provider); render as compact text or mini bars. The strip hides metrics with no data instead of showing placeholders.
  • Dashboard popover. Provider-grouped meters with live reset countdowns and pace indicators. Click usage or reset values to flip their display everywhere; right-click a row to hide or star it, refresh its provider, or open Customize.
  • Global shortcut. Toggle the popover from anywhere — record any combo in Settings.
  • Customize. Turn providers and metrics on or off, choose which rows stay Always Visible or On Demand, and drag-reorder both.
  • Stale-while-revalidate. Cached values display instantly at launch; refresh runs every 5 minutes.
  • One-shot CLI. Agents can read stable limit JSON through the same five-minute cache with openusage, or bypass freshness with openusage --force; the menu-bar app does not need to be running.
  • Local HTTP API. Other apps can read machine-friendly limits from 127.0.0.1:6736/v1/limits; the legacy /v1/usage UI contract remains supported. It is loopback-only and never serves credentials; note that browser pages can read it too — see the privacy note.
  • Proxy support. Route provider requests through SOCKS5 or HTTP(S) via ~/.openusage/config.json.
  • Native settings. Launch at login, global shortcut, icon style, theme, density, 12/24-hour time — see Settings.
  • Automatic updates. Signed, notarized stable updates via Sparkle.

Documentation

Behavior docs live in docs/: the dashboard, menu bar pins, settings, refresh & caching, the CLI, the local HTTP API, the proxy, and one page per provider.

For working on the code, see the developer docs: architecture, adding a provider, and debugging & capturing logs.

Requirements

  • macOS 15 (Sequoia) or later
  • Universal binary — runs natively on both Apple Silicon and Intel Macs

The Today / Yesterday / Last 30 Days spend tiles are computed natively from local CLI logs (Claude, Codex, Grok, and Sakana Fugu) or Cursor's usage export — no Node.js or other runtime needed. Dollars are estimated with model pricing.

Building

swift build            # debug build
swift test             # run the test suite
./script/build_and_run.sh   # build and launch the dev app from dist/ (no install)

Architecture

SwiftPM package, SwiftUI content hosted in an AppKit-owned NSStatusItem + custom key-capable NSPanel, Swift 6 strict concurrency. The app and CLI share one module: providers implement a small ProviderRuntime protocol (auth store → usage client → mapper → ProviderSnapshot), and both surfaces read the same normalized data — see the architecture overview for how the pieces fit together and AGENTS.md for engineering conventions.

Releasing

Releases are automated: pushing a stable tag such as v0.7.1 on main tests, builds, signs, notarizes, and publishes a new version with its SHA-256 checksum. Prerelease suffixes are rejected. The pipeline lives in .github/workflows/release.yml, and the step-by-step is in the release-swift skill.

Release setup (one-time)

The release workflow needs these repository secrets (Settings → Secrets and variables → Actions):

Secret What it is
DEVELOPER_ID_CERTIFICATE_BASE64 base64 of the OpenUsage Developer ID Application .p12
DEVELOPER_ID_CERTIFICATE_PASSWORD the password set when exporting that .p12
APPLE_NOTARY_PRIVATE_KEY_BASE64 base64 of an App Store Connect API private key (.p8)
APPLE_NOTARY_KEY_ID the App Store Connect API key ID
APPLE_NOTARY_ISSUER_ID the App Store Connect API issuer ID
APPLE_DEVELOPER_ID_ICLOUD_PROFILE base64 Developer ID provisioning profile for the production iCloud container
SPARKLE_PUBLIC_KEY base64 EdDSA public key, baked into the build as SUPublicEDKey
SPARKLE_PRIVATE_KEY base64 EdDSA private key used to sign the DMG

Export the NextByte Developer ID Application cert (with its private key) from Keychain Access as a .p12, then base64 -i DeveloperID.p12 | pbcopy. Create an App Store Connect API key with access to notarize the OpenUsage app, download its .p8 file once, and base64-encode it the same way. The certificate, API key, and iCloud profile must all belong to NextByte team 8KZBNZJBAX. Generate the Sparkle EdDSA key pair once with Sparkle's generate_keys tool; the public and private values must be a matching pair or signing is silently skipped.

For iCloud Sync, store the original development and Developer ID provisioning profiles in 1Password as secure documents. Install the development profile on each registered Mac; base64-encode the Developer ID profile and store it only in the APPLE_DEVELOPER_ID_ICLOUD_PROFILE Actions secret. See iCloud Sync for the container identifiers, build command, and file-inspection command.

The repository must be public (Sparkle fetches the DMG and appcast anonymously), and the appcast is served from GitHub Pages. Set Settings → Pages → Build and deployment → Source to GitHub Actions; the publishing workflows create and maintain the gh-pages branch.

Contributing

Issues are welcome. Pull requests are strict and issue-first: external PRs must link an issue a maintainer has approved with the approved label, and automation closes anything that doesn't follow the rules — so most external PRs are closed by design. Read CONTRIBUTING.md before opening one. Report security issues privately per SECURITY.md. The OpenUsage name and logo are covered by the trademark policy.

License

MIT

About

Multiple accounts. Multiple providers. One fast, observable view of your AI usage.

Resources

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages