{"id":50989121,"url":"https://github.com/Bread-bang/claude-usage","last_synced_at":"2026-07-05T12:00:40.217Z","repository":{"id":364117845,"uuid":"1266483122","full_name":"Bread-bang/claude-usage","owner":"Bread-bang","description":"Native macOS menu bar app showing Claude Code usage (session / weekly / Sonnet / credits) — no backend, notarized, brew install","archived":false,"fork":false,"pushed_at":"2026-06-11T18:14:55.000Z","size":5081,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-11T19:04:24.214Z","etag":null,"topics":["anthropic","claude","claude-code","developer-tools","macos","macos-app","menu-bar-app","menubar","statusbar","swift","swiftui","usage-tracker"],"latest_commit_sha":null,"homepage":"https://github.com/Bread-bang/claude-usage#readme","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Bread-bang.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-06-11T16:54:46.000Z","updated_at":"2026-06-11T18:16:26.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/Bread-bang/claude-usage","commit_stats":null,"previous_names":["bread-bang/claude-usage"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/Bread-bang/claude-usage","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bread-bang%2Fclaude-usage","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bread-bang%2Fclaude-usage/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bread-bang%2Fclaude-usage/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bread-bang%2Fclaude-usage/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Bread-bang","download_url":"https://codeload.github.com/Bread-bang/claude-usage/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bread-bang%2Fclaude-usage/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35153109,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-05T02:00:06.290Z","response_time":100,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["anthropic","claude","claude-code","developer-tools","macos","macos-app","menu-bar-app","menubar","statusbar","swift","swiftui","usage-tracker"],"created_at":"2026-06-20T00:00:28.870Z","updated_at":"2026-07-05T12:00:40.203Z","avatar_url":"https://github.com/Bread-bang.png","language":"Swift","funding_links":[],"categories":["AIツール","AI Usage/Status"],"sub_categories":["その他のツール"],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"docs/icon.png\" alt=\"Claude Usage\" width=\"120\"\u003e\n\u003c/p\u003e\n\n\u003ch1 align=\"center\"\u003eClaude Usage\u003c/h1\u003e\n\nA lightweight, native macOS app for Claude Code that does two things from the moment you\nopen a pane:\n\n- **Context in the status line.** A one‑line readout right under your prompt — model,\n  percent full, and tokens used (e.g. `Opus 4.8 · 11% · 113K/1M`) — so you can `/compact`\n  *before* the model starts forgetting. Each pane renders its own, so it's always the right\n  session across tmux and cmux, with no Accessibility permissions.\n- **Usage in the menu bar.** Current session (5‑hour), weekly (all models / Sonnet), and\n  pay‑as‑you‑go credits — each with a utilization bar and reset time, in real time, without\n  launching Claude Code or spending Agent SDK credits.\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"docs/screenshot.png\" alt=\"Claude Usage menu bar app showing session, weekly, Sonnet, and credit usage\" width=\"480\"\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"docs/statusline.png\" alt=\"Context-window readout in Claude Code's status line: model, percent full, and tokens used\" width=\"420\"\u003e\n\u003c/p\u003e\n\n- **100% local.** No backend, no telemetry, no cookies — it reuses the OAuth token already\n  in your Keychain from Claude Code.\n- Pure Swift + SwiftUI + `MenuBarExtra`. No Electron, no dependencies. Notarized.\n\n## Install\n\n**Homebrew**\n```bash\nbrew install bread-bang/tap/claude-usage\n```\nAfter the tap is added, `brew install claude-usage` works too. The build is notarized, so\nit opens with no Gatekeeper warnings.\n\n**Build from source**\n```bash\ngit clone https://github.com/Bread-bang/claude-usage.git\ncd claude-usage\n./scripts/bundle.sh --open\n```\n\n**Requirements:** macOS 13+ and Claude Code signed in (run `claude` once so the Keychain\nitem exists). To start it at login: System Settings → General → Login Items → add\n*Claude Usage.app*.\n\n## Features\n\n- Current session (5‑hour), current week (all models and Sonnet only), and usage credits —\n  each with a utilization bar and its reset time.\n- **Context in the status line:** a one‑line readout under your Claude Code prompt — model,\n  percent full, and tokens used (e.g. `Opus 4.8 · 11% · 113K/1M`), with the 200K vs 1M window\n  reported directly by Claude Code. Because each pane renders its own, it's always the right\n  session — even across many panes (tmux, cmux) — with no guesswork and no Accessibility\n  permissions.\n- Menu‑bar number for the window of your choice, with traffic‑light colors.\n- Selectable icon and refresh interval (30s / 1m / 5m); settings and the last report\n  persist across launches.\n- Keeps showing the last good data with a subtle warning when a refresh fails, and backs\n  off on rate limits.\n\n## Privacy \u0026 trust\n\n- The only network request is `GET https://api.anthropic.com/api/oauth/usage` — the same\n  endpoint Claude Code uses. Nothing is sent anywhere else; no analytics.\n- The token is read from Claude Code's Keychain item through Apple's `/usr/bin/security`\n  tool and held only in memory for each request — never written to disk or logged.\n- The context readout is local too: Claude Code passes the live context window to a\n  status‑line command on stdin, and we just format it. We register that command in\n  `~/.claude/settings.json` only when the status‑line slot is empty or already ours —\n  another tool's status line is never overwritten. Nothing leaves your machine.\n\n## Development\n\n```bash\nswift run               # run from source\nopen Package.swift       # or open in Xcode\n./scripts/bundle.sh      # build dist/Claude Usage.app (locally signed)\n./scripts/release.sh     # Developer ID-signed + notarized .zip for a release\n```\n\nGetting repeated Keychain prompts on every rebuild? Run `./scripts/create-signing-cert.sh`\nonce. Architecture and the reverse‑engineering notes (endpoint choice, Keychain access,\ntoken refresh) are in **[DESIGN.md](DESIGN.md)**.\n\n## Limitations\n\n- Relies on the **undocumented** `api.anthropic.com/api/oauth/usage` endpoint and on Claude\n  Code's Keychain format — both can change without notice.\n- The `claude.ai/api/.../usage` endpoint is intentionally not used (Cloudflare‑walled for\n  non‑browser clients; see [DESIGN.md](DESIGN.md)).\n\n## License\n\n[MIT](LICENSE) © Bread-bang\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FBread-bang%2Fclaude-usage","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FBread-bang%2Fclaude-usage","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FBread-bang%2Fclaude-usage/lists"}