ClaudeUsageBar is a lightweight macOS menu bar utility that offers real-time monitoring of your Claude.ai usage quotas without compromising your privacy. It uses a local session cookie to poll Claude’s internal usage API and displays usage data right in your menu bar with color-coded icons and notifications. For those who want a simple, unobtrusive way to keep tabs on their AI usage limits, this app provides a clean and practical solution.
what claudeusagebar does and how it works
ClaudeUsageBar is a native macOS app built with Swift and SwiftUI. It lives in your menu bar, quietly tracking your Claude.ai session usage and weekly limits by periodically polling an undocumented internal API. The key to how it works lies in capturing your session cookie from claude.ai — the app guides you through copying this cookie manually for authentication.
Once authenticated, ClaudeUsageBar requests usage data every 5 minutes, storing all data locally. This local-first approach means there is no external transmission of your usage data beyond calls to Claude’s own API, emphasizing user privacy.
The app’s interface is minimalist, using a small spark icon in the menu bar that changes color according to your usage thresholds. It supports threshold-based notifications at 25%, 50%, 75%, and 90% usage levels to alert you before you hit your limits. If you’re a Pro plan user, the app also tracks your weekly Sonnet usage.
Under the hood, the app leverages SwiftUI for the UI and macOS-specific frameworks for system integration. A notable technical aspect is its use of the Carbon API to implement a global keyboard shortcut (Cmd+U) to quickly bring up the app or update usage. It also uses NSUserNotification, which allows it to show system notifications without requiring explicit user permission, a clever workaround to keep alerts frictionless.
technical highlights: local session cookie authentication and permissionless system notifications
What sets ClaudeUsageBar apart is its pragmatic approach to macOS menu bar utilities focused on privacy and minimal user friction.
The use of a manually extracted session cookie as a bearer token is a straightforward but effective means of authenticating without needing an official API or OAuth flow. The tradeoff here is that users must manually update this cookie if it expires, which can be a slight inconvenience but maintains security and user control.
The polling interval is set to 5 minutes, which balances freshness of data with avoiding excessive network calls and battery drain. This is a common tradeoff in usage monitoring apps.
The app’s notification system is particularly interesting. By using NSUserNotification instead of newer frameworks that require explicit user permission, ClaudeUsageBar can send alerts without interrupting the user with permission dialogs. This is a practical choice that improves the developer experience (DX) and user experience (UX), especially for a utility meant to stay unobtrusive.
The global keyboard shortcut implemented via Carbon API is a neat legacy macOS integration that still serves well for global hotkeys without complex dependencies.
Here’s a snippet illustrating the threshold-based notification logic from the app’s usage monitoring:
let usageThresholds = [0.25, 0.5, 0.75, 0.9]
for threshold in usageThresholds {
if currentUsage >= threshold && !notifiedThresholds.contains(threshold) {
sendNotification(for: threshold)
notifiedThresholds.insert(threshold)
}
}
This simple approach ensures notifications are sent only once per threshold crossing.
quick start with claudeusagebar
Getting started with ClaudeUsageBar is straightforward. The README provides a clear quick start:
- Download
ClaudeUsageBar-Installer.dmgfrom the project’s Releases page. - Open the DMG and drag ClaudeUsageBar into your Applications folder.
- Launch the app from Applications.
- Follow the in-app instructions to copy and paste your session cookie from claude.ai.
- You’re set — your usage will appear in the menu bar and notifications will alert you as you approach limits.
This no-fuss installation path makes it accessible even for non-developers.
verdict: a practical tool for macOS users monitoring Claude.ai usage
ClaudeUsageBar is a no-nonsense, privacy-conscious macOS menu bar app for anyone who regularly uses Claude.ai and needs to keep track of usage quotas without relying on official APIs or cloud services.
Its local session cookie authentication and local data storage ensure your data never leaves your machine, a big plus for privacy-focused users.
The app trades off some convenience — like manual cookie management and a 5-minute polling interval — for simplicity and reliability.
If you want a lightweight, unobtrusive utility that respects your privacy and keeps you informed about your Claude usage at a glance, ClaudeUsageBar is worth trying. It also serves as a solid example of macOS menu bar app design using SwiftUI, demonstrating how to combine legacy macOS APIs like Carbon and NSUserNotification to deliver useful functionality with minimal user friction.
For developers interested in building similar utilities, this repo provides a practical template for polling-based quota monitoring apps that operate fully on the client side, preserving user data privacy and minimizing permissions overhead.
Tags: [“macos”, “swift”, “swiftui”, “menu-bar”, “privacy”, “ai-usage-monitoring”]
→ GitHub Repo: Artzainnn/ClaudeUsageBar ⭐ 163 · HTML