A tiny macOS menu bar app that shows your live Claude usage. It reads the model from your local Claude Code session logs and fetches the 5-hour session utilization directly from claude.ai, so the number matches what claude.ai/settings/usage shows.
Opus 27%
Click the menu bar item to see:
- Session (5-hour window, from claude.ai)
- Weekly (7-day window, from claude.ai)
- Today / This Week / All Time token counts and cost estimates (computed locally from
~/.claude/projects/*.jsonl) - Reset times for the session and weekly windows
- When the data was last fetched
Polls claude.ai every 65 seconds.
- macOS 11 (Big Sur) or later
- A Claude subscription (Pro / Max / Team) signed in at claude.ai
- Xcode command-line tools (
xcode-select --install) forswiftc
git clone https://github.com/SwagatDas/claude-pulse.git
cd claude-pulse
swiftc main.swift -framework Cocoa -framework WebKit -o ClaudeUsageBar
cp ClaudeUsageBar ClaudeUsageBar.app/Contents/MacOS/ClaudeUsageBarThat produces a standalone ClaudeUsageBar.app in the repo root.
Double-click ClaudeUsageBar.app, or:
open ClaudeUsageBar.appOn first launch a sign-in window opens pointing at claude.ai. Log in as you normally would (email, Google, etc.). The window auto-closes once the app successfully fetches your usage. The session cookie is stored in the app's private WKWebView data store (not in the system Keychain), so you won't need to sign in again on subsequent launches.
If the menu ever shows unavailable or a Status error, use Sign in to claude.ai... in the menu to re-open the login window.
cp -R ClaudeUsageBar.app /Applications/A launchd plist is included as a template. Update the path to wherever you installed the app, then load it.
# Copy and edit the template
cp com.local.ClaudeUsageBar.plist ~/Library/LaunchAgents/
# Edit the ProgramArguments path inside the copied file to point at your install location
# (default template assumes /Applications/ClaudeUsageBar.app)
open -e ~/Library/LaunchAgents/com.local.ClaudeUsageBar.plist
# Load it
launchctl load ~/Library/LaunchAgents/com.local.ClaudeUsageBar.plistTo unload:
launchctl unload ~/Library/LaunchAgents/com.local.ClaudeUsageBar.plist- Model: scans
~/.claude/projects/**/*.jsonl, takes themessage.modelfield of the assistant message with the latest timestamp, and strips the version (soclaude-opus-4-7renders asOpus). - Session / weekly percent: hits
https://claude.ai/api/organizations/<org_id>/usagefrom inside a persistentWKWebViewthat holds your login cookies. The org id is read from thelastActiveOrgcookie that claude.ai sets. - Today / week / all-time token counts: summed from the
usageblocks in the local JSONL logs.
- The claude.ai usage endpoint is undocumented. Anthropic can change or remove it without notice, in which case the session/weekly rows will break until the app is updated.
- Cookie-based auth to claude.ai from a non-browser client may bump into Cloudflare challenges; the bundled
WKWebViewpresents itself as Safari, which clears the checkbox challenge the current rollout uses. If that changes, you may need to re-sign-in more often. - Token costs are estimated at Sonnet 4.x public prices and are a rough lower bound, not a bill.
MIT