Keep a plugged-in MacBook charged at 80% instead of 100% to extend long-term battery health
Set a custom charge range like 70, 80% from the terminal for precise control over when charging starts and stops
Run a full battery calibration cycle with one command to discharge and recharge the battery completely
Only works on Apple Silicon Macs (M1, M2, M3), not compatible with Intel-based Macs.
Battery is a free, open-source tool for Apple Silicon Macs (the M1, M2, and M3 chip models) that lets you cap how high your battery charges. The main use case is keeping a laptop that stays plugged in most of the time at 80% charge, which is a well-documented way to slow down battery aging over time. It is not compatible with older Intel-based Macs. You can use it two ways. The first is a menu-bar app with a simple interface that sits in your system tray, which you install through Homebrew or by downloading a disk image from the releases page. The second is a command-line tool for people comfortable with a terminal, which lets you set custom charge limits or ranges, like keeping the battery between 70% and 80%. Installing the menu-bar app automatically installs the command-line tool as well. The tool works by talking directly to your Mac's hardware controller to enable and disable charging. When you set a limit, it stays active across reboots and even after closing the menu-bar app, so you do not need to remember to turn it back on. It also includes a calibration command that runs the battery through a full discharge and recharge cycle. The README explains clearly how this differs from Apple's own Optimized Battery Charging feature. Apple's built-in version uses machine learning and adapts to your charging schedule automatically, while this tool gives you manual, consistent control over the exact percentage at which charging stops and starts. The author originally built the command-line version as a holiday side project after finding the license of a similar paid app too restrictive, then added the graphical interface after a colleague asked for one. The app contacts a few external URLs for update checks and anonymous install counting (tracking only unique IP addresses, not personal data). Blocking those URLs will only break automatic updates, not the core charging functionality.
← actuallymentor on gitmyhub — every repo by this author, as a profile.
Verify against the repo before relying on details.