openusage
AGENTS.md4.3k starsChanged 5 months agoMITView on GitHub
OpenUsage is a SwiftPM-based SwiftUI menu-bar app for macOS that shows AI provider usage widgets (Claude, Codex, Cursor, Grok, Devin, and more). This file documents the engineering conventions for the project. Read it before contributing. AGENTS.md is the source of truth for agent instructions in this repository. CLAUDE.md files may only point to the nearest AGENTS.md file with @AGENTS.md; do not add guidance, duplicate instructions, or project rules to CLAUDE.md. Repository note: This is the native Swift edition of OpenUsage.…
Trending
More talk lately.about the whole repository
Who's talking about robinebers/openusage
- A Hacker News story“OpenUsage: Track all your AI usage, in one panel”Hacker News · Apr 30, 2026 · 2 points
- @github-trending-js.bsky.social“📦 robinebers / openusage ⭐ 1,831 (+53) 🗒 JavaScript Burning through your subscriptions too fast? Paying …”Bluesky · Apr 12, 2026 · 1 likes
- @mikestaub2.bsky.social“This is a useful too to track your AI agent usage: github.com/robinebers/o...”Bluesky · Feb 3, 2026 · 1 likes
- XusBadia/altillo“Upstream openusage: cambios en proveedores”GitHub · Oct 5, 2026
- sudosubin/agents.nix“agent-skills.github.robinebers.openusage: 0.7.12 → 0.7.13”GitHub · Oct 3, 2026
The biggest 5 of 26 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 26
Talked about on GitHub, Bluesky and Hacker News (26 times).
On GitHub · 23
- Oct 5, 2026Upstream openusage: cambios en proveedores — XusBadia/altillo0 reactions
- Oct 3, 2026agent-skills.github.robinebers.openusage: 0.7.12 → 0.7.13 — sudosubin/agents.nix0 reactions
- Oct 3, 2026Z.ai GLM Coding Plan detected but usage resources are empty — LuigiElleBalotta/AIUsage.NET0 reactions
- Oct 1, 2026agent-skills.github.robinebers.openusage: init at 0.7.12 — sudosubin/agents.nix0 reactions
- Sep 26, 2026[quota-watch] 2026-09-26 — Claude'un oauth/usage'ı artık User-Agent'a göre dallanıyor (cedar_ember); Codex refresh token'ının tek kullanımlık olduğu doğrulandı — erayendes/mimir0 reactions
18 more on GitHub
- Sep 24, 2026usage API が 429 を返し続けると、入札も回復待ちの判定も効かなくなり、自動の着手が止まり、走っている run も stall として止められうる — maimuzo/continuo0 reactions · 130 comments
- Sep 19, 2026[quota-watch] 2026-09-19 — Claude CLAUDE_CONFIG_DIR hiç okunmuyor; Codex kendi auth.json'a token yazıyor; yeni bir oauth/profile ucu var — erayendes/mimir0 reactions · 4 comments
- Sep 16, 2026feat(cursor): Cursor card — plan usage by session token — Rast53/usage-board0 reactions · 1 comment
- Sep 13, 2026[P2][RELIABILITY][DOCUMENTATION] Complete or retire the expired Prometheus counter migration — Reese-max/lobsterpulse0 reactions · 2 comments
- Sep 9, 2026feat(muse) - Add muse-code from Meta as provider — janekbaraniewski/openusage0 reactions · 5 comments
- Sep 5, 2026[quota-watch] 2026-09-05 — Antigravity grup-kota alan adları iki bağımsız rakipte doğrulandı; Claude web endpoint'i Cloudflare engeline takılabiliyor — erayendes/mimir0 reactions · 1 comment
- Aug 29, 2026[quota-watch] 2026-08-29 — Codex 5 saatlik pencere Plus için canlıya geçti; Antigravity grup-kota alan adlarında olası uyuşmazlık — erayendes/mimir0 reactions · 3 comments
- Aug 28, 2026feat(providers): add grok quota monitoring — medokin/ReservePane0 reactions
- Aug 26, 2026feat(providers): add OpenCode Go quota monitoring — medokin/ReservePane0 reactions
- Aug 13, 2026Document OpenCode Go Rate limits from GET /zen/go/v1/usage — lidge-jun/opencodex0 reactions · 4 comments
- Aug 10, 2026[quota-watch] 2026-08-10 — Antigravity: olası app/bundle adı değişikliği ve RetrieveUserQuotaSummary'de auth race raporu (düşük güven) — erayendes/mimir0 reactions · 3 comments
- Aug 4, 2026feat(ai): add Cursor personal usage reporting — can1357/oh-my-pi0 reactions
- Jul 13, 2026openusage: 0.6.13 -> 0.7.5, add Br1ght0ne to maintainers — NixOS/nixpkgs0 reactions
- Jun 26, 2026Wire SQLite reader into getSummary() to fix usage accuracy drift (#23 root cause) — ltmoerdani/opencode-copilot-chat0 reactions · 1 comment
- Apr 30, 2026[feature]: Opencode Go without workspace ID and auth cookie — slkiser/opencode-quota0 reactions · 4 comments
- Apr 10, 2026Upstream merge — Rana-Faraz/usage-tray-windows0 reactions · 1 comment
- Apr 7, 2026limit what provider models show up (includes PR) — Rana-Faraz/usage-tray-windows0 reactions · 1 comment
- Apr 5, 2026openusage: init at 0.6.13 — NixOS/nixpkgs0 reactions · 2 comments
On Bluesky · 2
- Apr 12, 2026📦 robinebers / openusage ⭐ 1,831 (+53) 🗒 JavaScript Burning through your subscriptions too fast? Paying for stuff you never use? Stop… — @github-trending-js.bsky.social1 likes and repost
- Feb 3, 2026This is a useful too to track your AI agent usage: github.com/robinebers/o... — @mikestaub2.bsky.social1 likes and repost
On Hacker News · 1
- Apr 30, 2026OpenUsage: Track all your AI usage, in one panel2 points
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.
Of the AGENTS.md files we read, the 11,773 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository29 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- .cursor/rules/openusage-preview-launch.mdcCursor rule
- appkit-interopSkill
- build-and-run-macos-appSkill
- build-run-debugSkill
- fix-codesign-errorSkill
- liquid-glassSkill
- macos-appkit-interopSkill
- macos-build-run-debugSkill
- macos-liquid-glassSkill
- macos-packaging-notarizationSkill
- macos-signing-entitlementsSkill
- macos-swiftpmSkill
- macos-swiftui-patternsSkill
- macos-telemetrySkill
- macos-test-triageSkill
- macos-view-refactorSkill
- macos-window-managementSkill
- packaging-notarizationSkill
- pricing-updateSkill
- release-swiftSkill
- signing-entitlementsSkill
- swiftpm-macosSkill
- swiftui-patternsSkill
- telemetrySkill
- test-macos-appSkill
- test-triageSkill
- view-refactorSkill
- window-managementSkill
The file
We split this AGENTS.md into the rules it gives an agent
11 rules. About 0 are common, 10 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈10
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 22
Never leave a release in Draft, and never ship blank notes: the release-swift skill generates the changelog and verifies the published …
- Distinctive: line 38
Metric placement defaults: when adding or changing a metric, confirm its four defaults with the owner before choosing — never pick silently:
- Distinctive: line 50
Every PR description must follow this structure so reviewers can skim it quickly:
- Distinctive: line 62
Keep docs simple, less-technical, and easy to skim.
- Distinctive: line 66
Add a regression test when fixing a bug, where it fits.
- Distinctive: line 67
Keep files under ~500 LOC.
- Distinctive: line 68
No new dependencies without justification.
- Distinctive: line 69
When adding a provider, follow the conventions in "## Providers".
- Distinctive: line 73
Always fail loudly into error logging (log file, PostHog) and show friendly errors to the user.
- Distinctive: line 77
Use title case for any hardcoded copy used as a title.
- Very specific: line 79
Only add tooltips (hoverTooltip) when explicitly asked to.
≈ “Common” is an estimate: at least 1 in 5 of the 16,595 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
AGENTS.md
OpenUsage is a SwiftPM-based SwiftUI menu-bar app for macOS that shows AI provider usage widgets (Claude, Codex, Cursor, Grok, Devin, and more).
This file documents the engineering conventions for the project. Read it before contributing.
Agent Instructions
AGENTS.md is the source of truth for agent instructions in this repository. CLAUDE.md files may only point to the nearest AGENTS.md file with @AGENTS.md; do not add guidance, duplicate instructions, or project rules to CLAUDE.md.
Repository note: This is the native Swift edition of OpenUsage. Active development happens on the
mainbranch. (NOT the legacy Tauri version which now sits in thetauri-legacybranch)
Releases
main is the active development line; it ships via .github/workflows/release.yml (Sparkle appcast on gh-pages). Cut releases with the release-swift skill.
Guardrails (do not break)
- Versions are
0.7.xand up. Never reuse a0.6.xnumber — those are the original edition's released tags, now frozen on thetauri-legacybranch (final releasev0.6.28). - Never increase the version number on your own initiative — always ask for explicit approval first. The version is a deliberate owner decision: propose the number and wait for explicit sign-off before tagging or cutting a release.
- Beta releases use
-beta.Ntags and stay GitHub pre-releases on Sparkle's beta channel. Stable releases use plain tags and become GitHub "Latest". - Stable releases must carry forward the legacy
latest.jsonso any remaining0.6.xinstalls can still update tov0.6.28.release.ymlhandles this; verify it with the release-swift skill. - Never leave a release in Draft, and never ship blank notes: the release-swift skill generates the changelog and verifies the published release after every cut.
Architecture
- SwiftPM executable target; SwiftUI content hosted in an AppKit-owned
NSStatusItem+ custom key-capableNSPanel. - Swift 6 with strict concurrency.
- Providers implement the small
ProviderRuntimeprotocol: an auth store reads credentials already on the user's machine, a usage client calls the provider's API, and a mapper normalizes the response intoMetricLinevalues. The UI renders those normalized values. - See
docs/for behavior docs and the developer docs (architecture overview, adding a provider).
Providers
Conventions for the per-provider modules under Sources/OpenUsage/Providers/<Name>/.
- Structure: one folder per provider with an auth store (reads credentials already on the user's machine), a usage client (calls the provider API), and a mapper (normalizes to
MetricLine), conforming toProviderRuntime—refresh()plushasLocalCredentials(), the local-only credential probe used by first-run detection (FirstRunSeeder) and by new-provider detection on the first launch after the provider ships (NewProviderSeeder); mirror the same local credential sources and usability filters thatrefresh()starts with, reusing the auth-store loaders instead of adding a second credential-reading path. Seedocs/adding-a-provider.mdanddocs/provider-enablement.md. - Model pricing: all spend imputation (Claude, Codex, Cursor, Grok) prices through the shared engine in
Sources/OpenUsage/Pricing/(seedocs/pricing.md). Cursor-native model rates and alias rules live inSources/OpenUsage/Resources/pricing_supplement.json— sync new or changed models from Cursor models & pricing (updateupdated_at, pricing entries, andalias_rulesfor CSV model slugs); merging tomainpublishes it to gh-pages, so installed apps pick it up without a release. The bundled LiteLLM/models.dev snapshots regenerate withscript/update_pricing_snapshots.sh(a release-time chore). - Default order: Claude, Codex, Cursor first (the established providers, in that order), then every other provider alphabetically by display name (Antigravity, Devin, Grok, …). The order is the array order in
AppContainer, which seedsLayoutStore's default provider order (andresetToDefault). A new provider slots into the alphabetical tail. - Metric placement defaults: when adding or changing a metric, confirm its four defaults with the owner before choosing — never pick silently:
- enabled on/off (
DefaultLayout.metricIDs), - Always Visible vs. On Demand — above the fold vs. behind the per-provider caret (
DefaultLayout.expandedMetricIDs). Note: a provider always keeps at least one Always Visible row — the dashboard promotes all metrics when every one is marked On Demand, so a fully On Demand provider isn't possible; leave one metric Always Visible for the caret to appear, - pinned to the menu bar (
DefaultLayout.pinnedMetricIDs), - order (within a provider, the
widgetDescriptorsdeclaration order).
- enabled on/off (
Running / Testing Changes
- There is no hot reload. The app is a long-lived menu-bar process, so every code change requires a full rebuild and restart of the running app to take effect — kill the running instance, rebuild, and relaunch before testing.
Pull Requests
Every PR description must follow this structure so reviewers can skim it quickly:
- TL;DR — open with a one- or two-sentence plain-English summary of the change.
- What was happening — plain-English bullet points describing the prior behavior, bug, or gap that motivated the change.
- What this changes — bullet points describing what the PR actually changes.
- Heads-up (optional) — noteworthy things a reviewer or future maintainer should consider (risks, follow-ups, trade-offs).
- Tests (optional) — how the change was verified.
- Screenshots (optional in general, but required for any PR that makes a visual change) — images of the affected UI after the change.
Documentation
- Logic changes must update any docs in
docs/that describe the affected behavior. - Keep docs simple, less-technical, and easy to skim; exclude visual design details.
Code Conventions
- Add a regression test when fixing a bug, where it fits.
- Keep files under ~500 LOC; split or refactor as needed.
- No new dependencies without justification.
- When adding a provider, follow the conventions in "## Providers".
Error Handling
Always fail loudly into error logging (log file, PostHog) and show friendly errors to the user. Do not add silent fallbacks that hide real problems. Only validate at system boundaries (user input, external APIs); trust internal code and framework guarantees.
UI
- Use title case for any hardcoded copy used as a title.
- Match the existing design language; OpenUsage has a specific look and feel.
- Only add tooltips (
hoverTooltip) when explicitly asked to. Don't add them proactively to new controls.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

