A native macOS menu bar app that displays your Claude Code usage limits in real-time.
- Real-time usage data - Shows your actual usage from Anthropic's servers
- Current Session - 5-hour rolling window usage with reset countdown
- Weekly Limits - All models combined usage with reset time
- Sonnet Only - Separate tracking for Sonnet model usage
- Auto-refresh - Updates every 5 minutes automatically
- Native macOS app - Built with SwiftUI, lightweight and fast
- Dark theme - Matches macOS menu bar aesthetic
- macOS 14.0 (Sonoma) or later
- Active Claude Pro/Max subscription
- Claude Code installed and logged in
brew tap dmelo/tap
brew install --cask claude-code-statsDownload the latest .app from the Releases page and drag it to your Applications folder.
-
Clone the repository:
git clone https://github.com/dmelo/claude-code-stats.git cd claude-code-stats -
Open in Xcode:
open ClaudeCodeStats/ClaudeCodeStats.xcodeproj
-
Build and run (⌘R)
- Launch the app - a chart icon will appear in your menu bar
- Click the icon, then click ⚙️ (settings) or "Configure Session"
- Get your session cookie from claude.ai:
- Open https://claude.ai in your browser
- Open Developer Tools (
Cmd + Option + I) - Go to Application → Cookies → https://claude.ai
- Find
sessionKeyand copy its value
- Paste the value in the app and click Save
Click the menu bar icon to see your current usage:
| Metric | Description |
|---|---|
| Current Session | Usage in the current 5-hour window |
| Weekly Limit | Combined usage across all models (resets weekly) |
| Sonnet Only | Sonnet-specific usage tracking |
The progress bars change color based on usage:
- 🟢 Green: 0-50%
- 🟡 Yellow: 50-75%
- 🔴 Red: 75-100%
To launch automatically when you log in:
- Open System Settings → General → Login Items
- Click + and add ClaudeCodeStats
The claude.ai session cookie expires periodically. When you see an "unauthorized" error:
- Click the ⚙️ icon
- Get a fresh
sessionKeyfrom claude.ai (see Setup step 3) - Paste and save
cd ClaudeCodeStats
xcodebuild -project ClaudeCodeStats.xcodeproj -scheme ClaudeCodeStats -configuration Release buildThe built app will be in ~/Library/Developer/Xcode/DerivedData/ClaudeCodeStats-*/Build/Products/Release/
ClaudeCodeStats/
├── ClaudeCodeStats.xcodeproj
└── ClaudeCodeStats/
├── ClaudeCodeStatsApp.swift # App entry point
├── ContentView.swift # Main popover view
├── Services/
│ └── WebSessionService.swift # Claude.ai API client
└── Views/
├── UsageCardView.swift # Usage card component
├── ProgressBarView.swift # Progress bar component
└── SettingsView.swift # Settings screen
- Your session cookie is stored locally in UserDefaults
- The app only communicates with claude.ai to fetch your usage data
- No data is sent to any third parties
MIT License - see LICENSE for details
- Built for use with Claude Code by Anthropic
- Inspired by the Warp terminal menu bar design
