
I built a macOS menu bar app in ~900 lines of Python that tracks Claude + ChatGPT limits — here's how
I got tired of getting blindsided by Claude Pro rate limits mid-session. The solution: a menu bar app that reads the same private API that claude.ai/settings/usage calls. Here's what made it interesting to build: The Cloudflare problem Claude's API is behind Cloudflare. Regular requests or httpx get 403'd immediately. The fix: curl_cffi with impersonate="chrome131" to spoof the TLS fingerprint. This was the single biggest hurdle. Browser cookie detection Rather than making users copy-paste cookies, I used browser-cookie3 to read them directly from Chrome, Arc, Firefox, Safari, or Brave. Key insight: try Firefox first — it uses a plain SQLite database with no Keychain prompt. Chromium browsers need a one-time "Always Allow" dialog. AppKit threading rule rumps runs on the main thread. All UI updates (menu rebuilds) must happen there. My background fetch thread puts results in a queue.Queue , and a 0.25-second timer on the main thread drains it. Violate this and you get intermittent crash
Continue reading on Dev.to Python
Opens in a new tab


