macOS menu bar app for Claude Code usage
翻譯準備中
取自儲存庫 README
正在載入完整 README。
檢視完整 README ↗macOS menu bar app for Claude Code usage. Live plan limits, today's spend, weekly cap, and per-model breakdown — without leaving the keyboard.
Claude Code logs every assistant turn locally in ~/.claude/projects/**/*.jsonl, and Anthropic exposes per-plan usage at api.anthropic.com/api/oauth/usage. Claude Status stitches both together into a tiny native menu-bar item so you can answer "how much did today cost me?" / "am I about to hit my weekly cap?" without opening a browser.
*.jsonl logs. The API call is configurable and can be turned off entirely.MenuBarExtra. ~1.5k lines. No Electron, no background daemons.brew tap bcollard/claude-status
brew trust --tap bcollard/claude-status # Homebrew 6.0+ requires trusting third-party taps
brew install --cask claude-status
Or grab the latest .dmg from the Releases page.
Requirements:
The release build is signed with a Developer ID and notarized by Apple, so Gatekeeper opens it without warnings.
Three honest pieces of plumbing:
svce="Claude Code-credentials". Picks the freshest entry by expiresAt (Claude Code may leave older acct=<username> and acct=claude-code-user entries around after an SSO re-login).~/.claude/projects/**/*.jsonl line by line, filters by timestamp window, aggregates input / output / cache-read / cache-write per model.GET https://api.anthropic.com/api/oauth/usage with the Bearer token. Honors Retry-After on 429s, keeps the last good values on screen during backoff.┌────────────────────────┐ ┌───────────────────────────┐
│ ~/.claude/projects/ │ │ macOS Keychain │
│ **/*.jsonl │ │ "Claude Code- │
│ (token usage) │ │ credentials" │
└────────┬───────────────┘ └────────────┬──────────────┘
│ │
▼ ▼
SessionLogScanner KeychainReader
│ │
└─────────────┬───────────────────┤
▼ ▼
UsageStore UsageAPIClient ──► api.anthropic.com
│ │ /api/oauth/usage
▼ │ (Bearer OAuth)
MenuView ◄──────────────┘
See CLAUDE.md for the full architecture notes (Keychain shape, /api/oauth/usage response schema for both Enterprise and Pro, known limitations).
Open the dropdown → Options… (or press ⌘,):
SMAppService (app must live in /Applications or ~/Applications).The local-log scan runs every 60 s regardless and is not user-configurable (file I/O is cheap).
api.anthropic.com/api/oauth/usage — the same endpoint Claude Code calls.usage blocks are parsed; conversation content is never read.git clone https://github.com/bcollard/claude-status-macos-menu-bar
cd claude-status-macos-menu-bar
./build.sh # → .build/bundler/apps/ClaudeStatus/ClaudeStatus.app (ad-hoc signed)
cp -R .build/bundler/apps/ClaudeStatus/ClaudeStatus.app /Applications/
open /Applications/ClaudeStatus.app
Requires Xcode (for the Swift toolchain) and swift-bundler. macOS 14 SDK or newer.
./scripts/screenshots.sh
Outputs marketing canvases (2880×1800) to docs/screenshots/ and clean popup + settings cards to website/assets/. All demo data is anonymous — no real account info leaks.
Bump version in Bundler.toml and Casks/claude-status.rb, then:
./scripts/release.sh
# → .build/bundler/apps/ClaudeStatus/ClaudeStatus.{zip,dmg}
# → signed with Developer ID, notarized + stapled, ready for upload
# → prints sha256 to paste into the cask formula
The script requires a notarytool keychain profile (default claude-status-notary):
xcrun notarytool store-credentials claude-status-notary \
--apple-id [email protected] --team-id YOURTEAMID --password <app-specific-password>
claude /logout then re-login to mint a fresh Keychain entry.claude /logout + re-login or an SSO re-bootstrap — the new item has no prior authorization for Claude Status, so macOS prompts again. The notarized DMG keeps Claude Status's Team ID stable across releases; an ad-hoc ./build.sh rebuild also invalidates previous trust because each binary hash is its own identity. A clean fix would need Anthropic to write the credential with an allowlist of trusted observer Team IDs.Pricing.swift hardcodes per-million-token rates. Update when Anthropic publishes new pricing.amirhayek.dev/ClaudeUsage — paid Mac App Store app with similar goals, iOS companion, history charts.ccusage — Node CLI that aggregates Claude Code local logs.MIT © 2026 Baptiste Collard
Uses Apple SF Symbols under Apple's symbol license. Not affiliated with Anthropic.