個人 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