Battery
A native macOS menu bar app that monitors your Claude Code API usage in real time. Session gauges, weekly tracking, burn rate projections, and usage streaks - all living in your menu bar.
Features
Everything you need to understand and manage your Claude Code API consumption.
What It Tracks
Four distinct usage dimensions, each with its own gauge and detailed metrics. Battery monitors everything the Anthropic API exposes.
Utilization %Current usage as a percentage of your session limitTime remainingCountdown until the 5-hour window resetsTime since resetHow long since your last session window startedWeekly %Usage across the full 7-day rolling windowReset dateExact day and time your weekly limit resetsRemainingPercentage of weekly capacity still availableOpus %Current Opus-specific utilizationWindowOpus rate limit window (varies by plan)AvailabilityPlan-dependent visibilityAmount spentCurrent month's extra usage chargesSpending limitYour configured monthly maximumRemainingBudget left before hitting the capPredictive Intelligence
Battery doesn't just show current usage - it predicts the future. Linear regression on recent snapshots calculates your burn rate and projects when you'll hit limits.
Battery adjusts its polling frequency based on whether you're actively coding. Integrates with Claude Code hooks for automatic session detection.
80%Early warning - start pacing90%Caution - limit approaching95%Critical - almost at limitAll thresholds are customizable. Notifications reset when utilization drops.
How It Works
Battery runs as a lightweight menu bar app with no Dock icon. All data stays local on your machine.
Get Started
Install via Homebrew or download the DMG directly. Battery authenticates via OAuth using the same credentials as Claude Code.
Native Swift app. No Electron. No web views. Runs as a menu bar extra with minimal resource usage.
View on GitHub↗For smarter polling, install the Battery hook in your Claude Code hooks configuration. This enables automatic fast/slow polling based on whether you're actively coding.
SessionStartSwitches to fast polling when Claude Code startsSessionEndReturns to idle polling when session endsPostToolUseKeeps session active during tool useStopMarks session end on explicit stop