个人 GitHub 账号下公开仓库的所有者可以登录并验证所有权,自行管理介绍,无需管理员批准。
登录并生成验证文件,在 30 分钟内将其提交到此仓库的默认分支。其他分支或分叉仓库中的文件无效。然后在下方检查文件,即可无需管理员批准直接管理项目。请保留文件以维持管理权限。
如需登录,将前往登录页面。登录后请回到此处,再次点击所选的验证按钮。
在项目文件夹中运行 /nomorevibe verify,即可验证所有权并自行管理介绍。
一分钟完成验证Free, open-source macOS battery care: charge limit, schedules and measured battery health. Features other apps charge for are free here.
翻译准备中
取自仓库 README
正在加载完整 README。
查看完整 README ↗English · 한국어
A laptop's lifespan is decided by its battery. Save the Battery keeps yours healthy for longer — and features other apps charge for are all free here.
Free and open source (MIT). A macOS menu bar app for battery care, with helpers for long terminal coding sessions.
curl -fsSL https://github.com/y-minion/savethebattery/releases/latest/download/install.sh | sh
First thing: set the limit to 80% (Apple silicon, macOS 26.4 or later). The app offers Set 80% when you first open it, or pick 80% in the menu window. macOS then stops charging there, even when Save the Battery is not running.
This is a beta (0.2.0). It has been tested on one Mac so far (an M4 Pro with macOS 27.0.1). Please report problems.
Lithium-ion cells age faster when they sit at a high charge, and faster still when they are also warm. Apple documents a Charge Limit for this reason (support.apple.com/102338), and Battery University explains the stress curve (BU-808). Save the Battery does not promise a number of months or years. It shows what it measured on your Mac: hours spent at 90% and 95% or more, hours spent at 35 °C and 40 °C or more, cycles, and the capacity-based health estimate. The "if the limit had been 80%" comparison is a relative stress index from general Li-ion data, never a lifespan.
stb health --json prints them.claude, codex or any command with stb run to keep the Mac awake while it works, with a time limit and screen-off option.| Your Mac | Charge limit, schedules, full charge, heat hold, Low Power Mode, MagSafe LED | Everything else |
|---|---|---|
| Apple silicon, macOS 26.4 or later | Yes | Yes |
| Apple silicon, macOS 15 to 26.3 | After updating macOS to 26.4 | Yes |
| Intel, macOS 15 or later | Not supported | Yes |
The app is a universal build. On an Apple silicon Mac with an older macOS, a free macOS update to 26.4 or later turns on charge limiting. Intel Macs get everything except the charge features. The details are in docs/COMPATIBILITY.md and docs/VALIDATION.md.
curl -fsSL https://github.com/y-minion/savethebattery/releases/latest/download/install.sh | sh
The script checks your macOS version, downloads savethebattery.zip and its checksum from the same release, verifies the SHA-256 and copies the app to /Applications without sudo. Files fetched with curl carry no quarantine flag, so macOS shows no Gatekeeper prompt. The app is not notarized (that needs the paid Apple program), so read the script before you pipe it to sh: scripts/install.sh.
savethebattery.dmg and open it.You do this once. The app is signed with a free Apple Development certificate, so the signature is valid; it is just not notarized. If you open the app straight from the disk image or from Downloads, it offers to move itself into Applications.
When a new version is out, Settings › Updates shows Update now. The app downloads the release from GitHub and installs it only if the checksum matches, the app is signed by the same team (JQWWU7443A) and it is the announced newer version. Then it restarts. There is no Terminal step and no Gatekeeper prompt, and the helper stays installed. A self-built copy, or a copy outside Applications, shows the install command instead.
charge.json.A limit of 80% or more, schedules and the one-time full charge need no extra rights. Limits below 80%, the Low Power Mode switch and the MagSafe LED need a small root helper. The app installs it with the standard macOS administrator-password dialog, only when you choose such a feature: picking a limit below 80% offers Install helper and apply, and the Low Power Mode switch and LED install it on first use. It is never installed silently, and updates keep it; it needs reinstalling only when its protocol version changes.
ACLC, values 0, 1, 3, 4)./Applications/Save the Battery.app, run by the logged-in user, and official builds are pinned to the signing team JQWWU7443A. A self-built (ad-hoc) copy is not team-pinned, and says so.More in SECURITY.md.
curl -fsSL https://github.com/y-minion/savethebattery/releases/latest/download/uninstall.sh | sh
It removes the app and, with the macOS password dialog, the helper (the MagSafe LED goes back to macOS). It asks before it deletes your history and settings (kept by default). If the app is running, it also asks whether to turn off the macOS charge limit (kept by default); otherwise the limit stays as it is, and you can change it in System Settings › Battery. Source: scripts/uninstall.sh.
You need Xcode. The project is generated from project.yml with XcodeGen; run xcodegen generate after changing it.
swift test --disable-xctest
python3 scripts/smoke-sessions.py .build/debug/stb
scripts/build-app.sh
open "dist/Save the Battery.app"
scripts/build-app.sh signs with an "Apple Development" certificate from your keychain (or the one named in STB_SIGN_IDENTITY). Without one it signs ad-hoc: the app works, but the Shortcuts app will not list its actions, and the helper will not be team-pinned (a self-built copy). See CONTRIBUTING.md.
The app must be running. stb asks it to apply charge settings over a same-user local channel. The first line makes stb a shell command; add it to ~/.zshrc to keep it.
alias stb="'/Applications/Save the Battery.app/Contents/MacOS/stb'"
stb charge set 70 # 50 to 100, steps of 5
stb charge off # turn the limit off
stb charge topup # one-time full charge
stb charge end # end the full charge
stb charge status --json # also works without the app
stb health --json
stb run --hours 4 --screen-off -- claude
Exit codes: 0 success, 1 failed or unverified, 2 usage error, 3 app not running. A session's idle-sleep protection ends after its time or when the adapter is unplugged; the command itself is never killed.
There is no telemetry and no account. History and sessions are stored only in ~/Library/Application Support/savethebattery. The app makes a daily check of api.github.com for a new version, with no identifying data; you can turn it off in Settings. It downloads a new version from GitHub only when you click Update now. Network failures are silent, and nothing is installed automatically.
Design notes and plans live in docs/superpowers. Release notes: docs/release-notes/0.2.0.md.
MIT · License · Third-party notices