Repository navigation
Releases
v1.5.2
v1.5.2 (CLI)
- Stop actually stops.
battery maintain stopnow reliably stops the running limiter on Apple Silicon too — the maintain loops own the pidfile, so a stale PID can't leave a loop running, and the launchd login daemon is stopped as well as disabled. Stopping only signals a process it has verified is battery, waits for it to exit, and reports failure instead of claiming success. - SMC failures are no longer reported as success. A failed SMC read now reports charging as "unknown" instead of "disabled", and a failed SMC write makes the command exit with an error instead of printing success. If the first charging write fails, maintenance stops instead of looping forever on a dead SMC.
- Verified installs everywhere. Fresh installs and
battery reinstallnow downloadsetup.sh,smc, andbattery.shfrom the latest release and verify their SHA-256 checksums before installing — the same checkbattery updatealready did. The menu bar app's installer is pinned to the release tag instead ofmain, andsetup.shdefaults to the latest release instead ofmain. - Fixed:
battery maintain 0is no longer accepted (it disabled charging forever). Valid limits are now 10–100.
v1.5.1: safer updates and check for updates
battery 1.5.1: safer updates and check for updates.
- Safer updates.
battery updateno longer runs code straight from themainbranch. It downloadsbattery.shfrom the latest GitHub release and checks its SHA-256 checksum before installing, and refuses to install if the checksum doesn't match.battery reinstallnow reinstalls from the latest release tag instead ofmain. - Check for updates.
battery check-updateasks GitHub for the latest release and tells you if a newer version is out — it downloads nothing and changes nothing. The menu bar app's "Check for updates" item now runs this check inside the app and offers to install the update if there is one, instead of opening the releases page. - Fixed: the log no longer gets wiped when it grows past 5 MB (it now keeps the last 100 lines properly).
- Fixed: a mistyped
battery maintainsetting (likebattery maintain 999) no longer kills the running limiter before failing.
Check for an update with battery check-update, install it with battery update.
Fresh install:
curl -s https://raw.githubusercontent.com/Salcedoandrew/battery/main/setup.sh | bashAbout this release: the menu bar app is attached below as battery-1.5.1-mac-universal.zip (works on both Apple silicon and Intel Macs). This build is unsigned — macOS will say it can't verify the developer, so right-click the app and choose Open the first time you run it. The command line tool is attached as battery.sh (with its checksum) for battery update.
v1.5.0: heat protection, top up, Intel calibration
battery 1.5.0: heat protection, top up, and calibration on Intel.
- Heat protection. While battery is keeping your limit, it pauses charging when the battery gets hotter than 35 °C and resumes once it has cooled by 2 °C. Change the temperature with
battery heat 40, or turn it off withbattery heat off.battery statusshows the battery temperature and whether charging is paused for heat. On Intel Macs the charge limit is held at the current level while hot, then restored. - Top up.
battery topupcharges once to 100% (handy before a trip) and then goes back to your normal limit by itself. It carries on if maintenance restarts;battery topup stopcancels it. - Calibration on Intel.
battery calibratenow works on Intel Macs too: it charges to 100%, asks you to unplug and use the Mac down to about 15%, then restores your limit.battery calibrate stopcancels a calibration on any Mac, and also stops the charge or discharge step it started. - Menu bar app. Three new items under Advanced settings: pause charging when hot, top up to 100% once, and calibrate. The menu now refreshes right after you use them.
- Safer updates. The menu bar app only updates the command line tool when GitHub has a newer version, so it never replaces a newer local install with an older one.
- Settings live in
~/.batterynext to the existing ones (heat.threshold, andtopupwhile a top-up is running).
Update the command line tool with battery update, or install it fresh:
curl -s https://raw.githubusercontent.com/Salcedoandrew/battery/main/setup.sh | bashAbout the attached app: battery-1.5.0-mac-universal.zip is a universal (Apple Silicon + Intel) build of the menu bar app. It is unsigned (ad-hoc signed only, not notarized), so macOS will block a normal double-click: unzip it, move battery.app to Applications, then right-click → Open (or allow it under System Settings → Privacy & Security). Automatic app updates don't work for unsigned builds.
Based on actuallymentor/battery (MIT). The bundled smc tool is from hholtmann/smcFanControl (GPL-2).
v1.4.0: Intel Mac support
battery CLI 1.4.0: Intel Mac support.
- Intel Macs are now supported. On Intel Macs that have the
BCLMkey (most T2 Macs, e.g. the 2018–2020 MacBook Pro),battery maintain 80sets the Mac's own charge limit to 80% once, instead of switching charging on and off every minute. It's re-applied after a reboot or wake if needed.battery maintain stopandbattery uninstallset it back to 100%. battery charging on/off,battery statusandbattery uninstallwork on Intel. Forced discharge isn't possible on Intel, sobattery dischargeandbattery adapter offexplain that and skip it instead of failing.battery statusnow also shows whether the battery is really charging, read fromioreg, becausepmsetcan be minutes behind.- AlDente warning: battery warns you when AlDente is running, since both tools control the same setting and would fight each other.
- Universal smc: the bundled
smctool is now one universal binary for Apple Silicon and Intel (built from hholtmann/smcFanControl, GPL-2, license included), withdist/build-smc.shto rebuild it from source. - Setup checks which charging keys your Mac has, instead of assuming Apple Silicon.
- The passwordless
sudorules also allow readingBCLMand setting it to 20–100%. - Updates now come from this fork. Install and update downloads (setup,
battery update, the menu bar app) use github.com/Salcedoandrew/battery (main) instead of the original project.
Install the CLI:
curl -s https://raw.githubusercontent.com/Salcedoandrew/battery/main/setup.sh | bashThis release ships the CLI only; no menu bar app build is attached. Based on actuallymentor/battery (MIT).