Battery

A native macOS menu bar app that monitors your Claude Code usage in real time - now with iPhone and Android companions. Session and weekly gauges, forecasts, streaks and multi-account support, on your Mac and your Lock Screen.

$ brew tap allthingsclaude/battery
$ brew install --cask claude-battery
Star us on GitHub↗
38% · 1h 59m
Battery
38
Session (5-hour)
38%used
1h 59m remaining
Weekly (7-day)26% used
Resets on Sunday, Feb 15 at 3:00 PM
Extra Usage56%
$56.46 / $100.00$43.54 remaining
Projections
Increasing
Limit in 3h 48m (after reset)
Projected 70% at reset
Burn rate: 16.3%/hr
29day streak
Last 30 Days
M
T
W
T
F
S
S
7-Day Usage
Today: 22%
MonTueWedThuFriSatSun
Updated just now
Quit
38% · 1h 59m
Battery
38
Session (5-hour)
38%used
1h 59m remaining
Weekly (7-day)26% used
Resets on Sunday, Feb 15 at 3:00 PM
Extra Usage56%
$56.46 / $100.00$43.54 remaining
Projections
Increasing
Limit in 3h 48m (after reset)
Projected 70% at reset
Burn rate: 16.3%/hr
29day streak
Last 30 Days
M
T
W
T
F
S
S
7-Day Usage
Today: 22%
MonTueWedThuFriSatSun
Updated just now
Quit
3
Platforms
macOS menu bar, iPhone, and Android
5
Gauges
Session, weekly, Opus, Fable, and extra usage
5
Accounts
Instant switching, with per-account history
0
Telemetry
Native apps, and your data stays yours

Features

Everything you need to understand and pace your Claude Code usage, on your Mac and your phone.

01
Session & Weekly Gauges
Circular rings for the 5-hour session and the 7-day weekly window. On Ultra, with no 5-hour limit, the menu bar, gauge, projections and alerts all follow the weekly window.
02
Weekly in Days
Optionally read the 7-day window as days of the week (“2.5 of 7 days used”) on a bar with a tick per day, so pacing a week feels like pacing a week.
03
Burn Rate Projections
Linear regression on recent snapshots predicts when you'll hit your limit, where the window lands at reset, your pace, and the headroom left.
04
Streaks & Heatmap
A contribution-style heatmap and a daily streak counter. Past active days are recovered from your Claude Code prompt history, so streaks don't shrink.
05
Project Breakdown
See which projects your tokens went to, read from Claude Code's local session files.
06
Multi-Account
Up to 5 Claude accounts with instant switching. Point each one at its own Claude Code config folder and every account gets its own streak, heatmap, chart and project breakdown.
07
iPhone Companion
Home Screen and Lock Screen widgets, plus a Live Activity that appears only while a session is worth watching and escalates as you near the limit.
08
Android Companion
A lock-screen card that also shows in the Now Bar, status bar and always-on display, plus home screen widgets and a Quick Settings tile for switching accounts.
09
Themes & Session Detection
Terracotta or classic multi-color themes on the Mac, a choice of app icon on iPhone and Android, and Claude Code hooks that poll faster while you're working.

What It Tracks

Every usage dimension your plan reports, each with its own gauge and detailed metrics.

Session
5-Hour Window
Tracks your rate limit consumption within the current 5-hour session. Shows percentage used, time remaining, and a circular progress ring that fills as you consume capacity. Plans without a 5-hour limit, like Ultra, are tracked on their weekly window instead.
Utilization %Current usage as a percentage of your session limit
Time remainingCountdown until the 5-hour window resets
Time since resetHow long since your last session window started
Weekly
7-Day Window
Monitors your rolling 7-day usage with a progress bar. Includes the exact reset date and time so you can plan longer coding sessions around your weekly capacity.
Weekly %Usage across the full 7-day rolling window
Reset dateExact day and time your weekly limit resets
RemainingPercentage of weekly capacity still available
Models
Model-Specific Limits
Separate gauges for models with their own limits, such as Opus and Fable's weekly window. Each appears only when your plan reports that limit.
Opus %Current Opus-specific utilization
Fable %Fable's own 7-day window, when reported
AvailabilityShown only when your plan has the limit
Extra Usage
Spending Monitor
Tracks overuse credits and monthly spending when extra usage is enabled. Shows dollar amounts spent, your configured limit, and remaining budget.
Amount spentCurrent month's extra usage charges
Spending limitYour configured monthly maximum
RemainingBudget left before hitting the cap

Predictive 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.

Burn Rate
Percentage points consumed per hour, calculated from recent snapshots
Linear regression · Last 20 snapshots · Min 3 data points
Time to Limit
Predicts exactly when you'll hit 100% based on current consumption rate
Accounts for window resets · Filters stale data
Reset Projection
Projects what your utilization will be when the rate limit window resets
Session window · Weekly window · Trend classification
Smart Polling

Battery adjusts its polling frequency based on whether you're actively coding. Integrates with Claude Code hooks for automatic session detection.

State
Interval
Description
Active session
1 minute
Fast updates while you're coding (adjustable)
Idle
5 minutes
Low-impact background polling (adjustable)
Session hook detected
1 minute
Auto-switches when Claude Code starts
Notifications
80%Early warning - start pacing
90%Caution - limit approaching
95%Critical - almost at limit

All thresholds are customizable. Notifications reset when utilization drops.

% + Time
38% · 1h 59m
Full context at a glance
% Only
38%
Minimal, just the number
Time Only
1h 59m
Focus on time remaining
Icon Only
●
Cleanest possible

On Your Phone

Battery now runs on iPhone and Android too: the same sign-in, the same usage data, the same terracotta - on your Lock Screen.

iPhone
Widgets & Live Activity
A standalone companion that signs in with the same Claude account and polls on its own - no server or Mac required.
Home ScreenSmall, medium and large widgets, with the forecast on the large one
Lock ScreenCircular, rectangular and inline accessories, and StandBy
Live ActivityAppears only while a session is worth watching, escalates near the limit, ends itself on reset
Push relayOptional: your Mac keeps the Live Activity current through your own Cloudflare Worker
Build it in Xcode under your own Apple team (iOS 16.2+). Not on the App Store.
Android
Lock-Screen Card & Widgets
One card that shows wherever Android surfaces it, plus widgets that stay current on their own, with no vendor-specific code.
Live cardNow Bar pill, status-bar chip, expanded lock-screen card and always-on display
WidgetsHome screen widgets, each bound to an account
AccountsSwitch from the app header, the live card or a Quick Settings tile
UpdatesChecks GitHub Releases for new versions and opens the release page
Download the APK from GitHub Releases (Android 12+; Live Updates on Android 16).
Cloud Updates (optional, iPhone)

When none of your Macs is awake, your own Worker can poll every 5 minutes and keep the Lock Screen live. It uses a separate sign-in that can read usage but can't make calls billed to your account, stored encrypted in your own Cloudflare account. An awake Mac always takes over, since it's faster and costs nothing.

How It Works

Battery runs as a lightweight menu bar app with no Dock icon. Usage history stays local on your machine.

Authenticate
OAuth via Claude.ai
Battery uses the same OAuth credentials as Claude Code. Sign in once, tokens refresh automatically.
Poll
Fetch usage data
Queries the Anthropic OAuth usage API at regular intervals: every minute during active sessions, every 5 minutes when idle. Both are adjustable.
Store
Local SQLite database
Snapshots are stored locally with 90-day retention. Enables burn rate calculations and historical stats.
Project
Linear regression
Uses the last 20 snapshots to calculate burn rate and predict when you'll hit your rate limit.
Display
Menu bar popover
Renders circular gauges, progress bars, heatmaps, and charts in a native SwiftUI popover.
Notify
Threshold alerts
Sends macOS notifications when usage crosses configurable thresholds. Resets when utilization drops.
Relay
Optional, to your iPhone
When paired, the Mac forwards changes to your own push relay, which updates the iPhone's Live Activity and widgets. The relay never receives your Claude credentials.

Get Started

Install via Homebrew or download the DMG directly. Battery authenticates via OAuth using the same credentials as Claude Code.

Homebrew
$ brew tap allthingsclaude/battery
$ brew install --cask claude-battery
Manual
Download DMG from GitHub Releases
iPhone & Android
Android: APK from GitHub Releases
iPhone: build from source in Xcode

Native Swift and Kotlin apps. No Electron. No web views. On the Mac it runs as a menu bar extra with minimal resource usage, and updates itself.

View on GitHub↗
Requirements
macOS 13.0 (Ventura) or later
Claude Code installed and authenticated
iPhone: iOS 16.2+ and Xcode with your own Apple team
Android: Android 12 or later
Swift 5.9+ (for building the Mac app from source)
Session Detection Hook

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 starts
SessionEndReturns to idle polling when session ends
PostToolUseKeeps session active during tool use
StopMarks session end on explicit stop
Privacy
Usage history stays local on your machine
Tokens stored with 0600 file permissions
90-day local data retention in SQLite
No telemetry
The optional iPhone push relay runs on your own Cloudflare Worker and never receives your Claude credentials

Also from All Things Claude