macOS menu bar app that shows remaining Claude quota (5-hour session + 7-day weekly) and live countdown to reset.
A lightweight SwiftUI menu bar app (MenuBarExtra) that:
- Reads an OAuth token from macOS Keychain (
Claude Code-credentials) - Calls
GET https://api.anthropic.com/api/oauth/usageevery 90 seconds - Shows remaining quota % and time to reset in a popover
- Colors the menu bar icon green / orange / red based on quota level
Full spec, API details, and paste-ready code scaffold: see SPEC.md
Read SPEC.md Section 11 first — it has five complete Swift files that form a working Phase 1 skeleton. Create the Xcode project, drop those files in, get it compiling, then iterate.
Product Name: Claudicator
Bundle ID: com.ariross.claudicator
Language: Swift
Interface: SwiftUI
Minimum deployment: macOS 13.0 (Ventura)
App Sandbox: OFF ← required for Keychain access without entitlement wrangling
Info.plist — add these two keys:
<key>LSUIElement</key>
<true/>
<key>NSUserNotificationAlertStyle</key>
<string>alert</string>- No external dependencies. Pure SwiftUI + Foundation + Security framework only.
- The usage endpoint is undocumented. Non-200 responses must show a graceful error state, not crash.
- If the Keychain read fails (Claude Code not installed / not signed in), show a "paste your token" fallback in Settings.
- Poll at most every 60 seconds. Don't hammer the endpoint.
LSUIElement = YEShides the app from the Dock and App Switcher — menu bar only.
Phase 1 (build first): Keychain read → API fetch → popover with usage rows → icon color states → manual refresh
Phase 2: 90s polling loop, 1s countdown tick, Settings window (account + notifications), error states
Phase 3: Notifications at 20%/5%, animated progress bars, launch-at-login (SMAppService)
Complete Phase 1 before starting Phase 2.