Skip to content

Releases

v1.5.2

Choose a tag to compare

@Salcedoandrew Salcedoandrew released this 25 Oct 19:23

v1.5.2 (CLI)

  • Stop actually stops. battery maintain stop now 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 reinstall now download setup.sh, smc, and battery.sh from the latest release and verify their SHA-256 checksums before installing — the same check battery update already did. The menu bar app's installer is pinned to the release tag instead of main, and setup.sh defaults to the latest release instead of main.
  • Fixed: battery maintain 0 is no longer accepted (it disabled charging forever). Valid limits are now 10–100.

v1.5.1: safer updates and check for updates

Choose a tag to compare

@Salcedoandrew Salcedoandrew released this 25 Oct 06:34

battery 1.5.1: safer updates and check for updates.

  • Safer updates. battery update no longer runs code straight from the main branch. It downloads battery.sh from the latest GitHub release and checks its SHA-256 checksum before installing, and refuses to install if the checksum doesn't match. battery reinstall now reinstalls from the latest release tag instead of main.
  • Check for updates. battery check-update asks 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 maintain setting (like battery 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 | bash

About 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

Choose a tag to compare

@Salcedoandrew Salcedoandrew released this 23 Oct 00:32

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 with battery heat off. battery status shows 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 topup charges 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 stop cancels it.
  • Calibration on Intel. battery calibrate now 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 stop cancels 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 ~/.battery next to the existing ones (heat.threshold, and topup while 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 | bash

About 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

Choose a tag to compare

@Salcedoandrew Salcedoandrew released this 22 Oct 22:06

battery CLI 1.4.0: Intel Mac support.

  • Intel Macs are now supported. On Intel Macs that have the BCLM key (most T2 Macs, e.g. the 2018–2020 MacBook Pro), battery maintain 80 sets 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 stop and battery uninstall set it back to 100%.
  • battery charging on/off, battery status and battery uninstall work on Intel. Forced discharge isn't possible on Intel, so battery discharge and battery adapter off explain that and skip it instead of failing.
  • battery status now also shows whether the battery is really charging, read from ioreg, because pmset can 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 smc tool is now one universal binary for Apple Silicon and Intel (built from hholtmann/smcFanControl, GPL-2, license included), with dist/build-smc.sh to rebuild it from source.
  • Setup checks which charging keys your Mac has, instead of assuming Apple Silicon.
  • The passwordless sudo rules also allow reading BCLM and 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 | bash

This release ships the CLI only; no menu bar app build is attached. Based on actuallymentor/battery (MIT).