claude-peak
Claude Max usage monitor for macOS menu bar
Claude Peak
A macOS menu bar app that monitors Claude Max usage limits โ with real-time flame animation that burns hotter as you consume more tokens.
Screenshots
The menu bar displays the current 5-hour utilization (%) and time until reset. Click to see detailed usage.
When tokens are being consumed, a flame icon animates based on activity level.
Why Claude Peak?
| ๐ฅ Live flame animation | The only app that monitors JSONL token logs in real time โ flames burn brighter as tps climbs |
| ๐ฎ MADMAX mode | Gamified with challenge messages from "Pathetic" to "WITNESS ME" |
| ๐ One-click OAuth | No session keys, no DevTools โ just login in your browser |
| โก Pure Swift | No Electron, zero dependencies, 8 source files via SPM |
MADMAX Challenge
Enable MADMAX mode and push your token throughput to the limit. Each flame tier unlocks a new challenge message:
| Flames | tps | EN | ํ๊ตญ์ด |
|---|---|---|---|
| ๐ฅ ร 0 | 0 | Light it up. If you can. | ๋ถ ์ข ๋ถํ๋ด. ์ถฅ๋ค์ผ. |
| ๐ฅ ร 1โ2 | 1 โ 19,999 | That's it? Pathetic. | ๊ฒจ์ฐ ์ด๊ฑฐ? |
| ๐ฅ ร 3โ4 | 20,000 โ 39,999 | Warming up... | ์ฌ์ฌ ๊ฐ๋ณผ๊น |
| ๐ฅ ร 5โ6 | 40,000 โ 59,999 | Now we're cooking. | ์ ๋ฒ์ธ๋ฐ? |
| ๐ฅ ร 7โ8 | 60,000 โ 79,999 | FEEL THE BURN | ๋ฏธ์ณค๋ค!!! |
| ๐ฅ ร 9 | 80,000 โ 89,999 | ONE MORE. DO IT. | ๊ฑฐ์ ๋ค ์๋ค!!! |
| ๐ฅ ร 10 | 90,000+ | WITNESS ME | ๋๋ฅผ ๊ธฐ์ตํด!!! |
Can you hit 10 flames? Most people never get past "That's it? Pathetic."
Weekly Pace
Shows how your weekly usage is trending based on elapsed time vs utilization:
pace = actual utilization / (elapsed days รท 7 ร 100)
| Pace | EN | ํ๊ตญ์ด |
|---|---|---|
| < 0.3 | Go absolutely wild | ๋ง๊ตฌ ๋์ฌํด๋ ๋จ |
| < 0.6 | Plenty of room | ์ฌ์ ๋์นจ |
| < 0.85 | Cruising nicely | ์ ๋นํ ์ฐ๋ ์ค |
| < 1.1 | Right on pace | ๋ฑ ๋ง๋ ํ์ด์ค |
| < 1.4 | Getting warm | ์ฌ์ฌ ๊ฑฑ์ ๋๋ค์ |
| < 1.7 | Burning hot | ์ด๋ฌ๋ค ๊ฑฐ๋๋จ |
| โฅ 1.7 | Hit the brakes! | ๊ฑฐ๋์ง์ |
Flame Modes
Four modes available in settings:
- Off โ No flame icon
- 1 โ Single flame, animates when tokens are active
- 3 (default) โ Dynamic 1โ3 flames based on tps
- MADMAX โ Dynamic 1โ10 flames (10,000 tps per flame)
| tps | Flames | Animation Speed |
|---|---|---|
| 0 | (small ember, static) | None |
| 0 โ 30,000 | ร 1 | 0.50s โ 0.20s |
| 30,000 โ 60,000 | ร 2 | 0.30s โ 0.15s |
| 60,000+ | ร 3 | 0.20s โ 0.08s |
| tps | Flames | Animation Speed |
|---|---|---|
| 0 | (small ember, static) | None |
| 1 โ 9,999 | ร 1 | 0.40s |
| 10,000 โ 19,999 | ร 2 | โ |
| ... | ... | โ |
| 90,000+ | ร 10 | 0.06s |
Features
- Real-time flame animation โ Monitors
~/.claude/projects/JSONL logs, animates flames based on token throughput - Remote server monitoring โ Aggregate token activity from remote machines (e.g. via Tailscale) into a single flame display
- Menu bar display โ 5-hour utilization %, time until reset (configurable)
- Detailed popover โ 5-hour, 7-day (All models), 7-day (Sonnet) usage + reset timers
- Weekly pace indicator โ Shows whether you're on track, have room to spare, or burning too fast
- Korean / English messages โ Toggle message language in settings
- Settings โ Display format, refresh interval (1/5/10 min), flame mode, message language, remote server
- OAuth PKCE โ Browser-based auth with automatic token refresh
Installation
Homebrew (Recommended)
Pre-built bottles available โ no Xcode required.
brew tap letsur-dev/claude-peak https://github.com/letsur-dev/claude-peak.git
brew install claude-peak
# Launch (auto-links to ~/Applications on first run)
claude-peak
Update:
brew update
brew upgrade claude-peak
Troubleshooting
If you see undefined local variable or tap-related errors:
brew untap letsur-dev/claude-peak
brew tap letsur-dev/claude-peak https://github.com/letsur-dev/claude-peak.git
brew reinstall claude-peak
Note: The URL is required because the repo name is
claude-peak, nothomebrew-claude-peak.
Build from Source
Requires Xcode or Command Line Tools with full Xcode.
git clone https://github.com/letsur-dev/claude-peak.git
cd claude-peak
./build.sh
# Launch
open ~/Applications/Claude\ Peak.app
Remote Server
Monitor Claude Code sessions running on remote machines. Token activity is fetched via HTTP and merged with local activity โ flames reflect combined throughput.
Setup
On the remote machine (requires Node.js 18+):
npx claude-peak-server # starts in background
npx claude-peak-server status # check if running
npx claude-peak-server down # stop
The server scans ~/.claude/projects/**/*.jsonl every 2 seconds and exposes:
GET /api/activityโ{ tokensPerSecond, recentTokens: [{date, tokens}] }GET /healthโ{ ok: true }
Default port: 3200 (override with PORT env var).
On your Mac:
Settings โ Remote Server โ toggle ON โ enter host and port โ ๐ข = connected.
Connects via HTTP (direct network access required, e.g. Tailscale, LAN, VPN).
SSH-only environmentsIf only SSH access is available, use port forwarding:
ssh -L 3200:localhost:3200 your-server
Then set host to localhost in Settings.
Tech Details
Auth FlowOn first launch, click "Login with Claude" โ sign in with your Claude account in the browser โ tokens are saved automatically.
- App starts a local HTTP server (random port, IPv6)
- Opens
claude.ai/oauth/authorizein browser (with PKCE code_challenge) - After authentication, redirects to
http://localhost:PORT/callback?code=xxx - App exchanges the code for tokens at
platform.claude.com/v1/oauth/token - Tokens saved to
~/.config/claude-peak/tokens.json(0600 permissions)
Token Refresh:
- Automatically refreshes 5 minutes before access token expiry
- Prompts re-login on refresh failure
Usage Query
GET https://api.anthropic.com/api/oauth/usage
Headers:
Authorization: Bearer {access_token}
anthropic-beta: oauth-2025-04-20
User-Agent: claude-code/2.0.32
Example response:
{
"five_hour": { "utilization": 2.0, "resets_at": "2026-01-29T09:59:59Z" },
"seven_day": { "utilization": 63.0, "resets_at": "2026-01-29T23:59:59Z" },
"seven_day_sonnet": { "utilization": 0.0, "resets_at": null },
"extra_usage": { "is_enabled": false }
}
utilization: 0โ100 (percentage)resets_at: ISO 8601 timestamp or null
Token Refresh
POST https://platform.claude.com/v1/oauth/token
Content-Type: application/json
{
"grant_type": "refresh_token",
"refresh_token": "...",
"client_id": "9d1c250a-e61b-44d9-88ed-5944d1962f5e",
"scope": "user:profile user:inference"
}
Lessons Learned
- Keychain token expiration: Claude Code re-authenticates via browser OAuth each session, which can invalidate Keychain refresh tokens. A standalone OAuth flow is needed.
claude setup-tokenlimitations: Issues inference-only tokens (user:inferencescope only), which cannot access the usage API (requiresuser:profile).- OAuth redirect URI: Must be
http://localhost:PORT/callbackexactly.127.0.0.1or/oauth/callbackpaths are rejected. - IPv6: On macOS,
localhostmay resolve to::1(IPv6), so an IPv6 socket is required. - Token exchange: The
stateparameter is required for both the authorize and token exchange requests. - Utilization values: The API returns utilization as 0โ100 integers (not 0โ1 decimals).
- Field naming: The API response uses
resets_at(with plural 's'). - JSONL token logs: Claude Code creates per-session JSONL files under
~/.claude/projects/, with token usage recorded inmessage.usageof each line.
Reviews (0)
Sign in to leave a review.
Leave a reviewNo results found