
What it does
A lightweight macOS menu bar app that shows your real-time Claude desktop app usage. Reads the session cookie directly from the Claude desktop app (no API key needed) and displays session %, weekly %, monthly spend, and routine runs.
Features
- Menu bar icon with color-coded session % (green < 50%, yellow 50-75%, red 75%+)
- Drop-down showing session reset countdown, weekly %, monthly spend vs budget
- Web dashboard at
localhost:8080with charts and CSV export - Auto-sync every 2 minutes via Claude's session cookie
- Notifications at 25%, 50%, and 75% session usage
How it works
app.py(Flask) reads the Claude desktop app's SQLite cookie DB, decrypts the session key via macOS Keychain (Claude Safe Storage), callsclaude.ai/api/organizations/{org}/usagemenubar.py(rumps) polls the Flask endpoint every 30s and updates the iconrun.shstarts both and opens the dashboard
Language
Python (37%) + HTML (62%) for the dashboard. Uses rumps for the macOS menu bar.
Install
git clone https://github.com/divaaker/claude-usage-tracker.git
cd claude-usage-tracker
pip3 install -r requirements.txt --break-system-packages
cp override.example.json override.json
bash run.sh
Requires macOS 12+, Claude desktop app installed and signed in, Python 3.10+.
Configuration
Edit override.json:
{
"monthlyBudget": 20,
"routineRuns": 1
}
Value
Solves the "am I about to hit my rate limit?" problem. The color-coded menu bar icon gives you a glance-able indicator without opening the Claude app. The dashboard adds historical tracking. Very early (1 commit, 0 stars as of late April 2026) but the approach is clever - reading the cookie directly rather than requiring API credentials.