Skip to content
askuksovPublic

About

Limit MacBook charging from the menu bar to extend battery lifespan

Topics

Resources

Stars

5 stars

Watchers

0 watching

Forks

Repository files navigation

Kombucha icon

Kombucha

Limit MacBook charging from the menu bar to extend battery lifespan. A native Swift app.

A MacBook that stays on its adapter spends its life at 100%, the level at which a lithium-ion cell ages fastest. Kombucha holds the battery inside a range you choose: it stops charging at the upper threshold and resumes at the lower one, so the Mac runs from the adapter while the battery rests.

Features

  • Charge range. Set where charging stops (55–95%) and where it resumes (40–85%). Default 80% / 75%.
  • Charge to 100% Once. Suspends the range for one full charge, then returns to it by itself.
  • Heat Protection. Pauses charging at 40 °C and resumes at 37 °C.
  • Menu bar panel. Level, status, sliders and the protection switch; an optional percentage next to the icon.
  • History. Seven- and thirty-day charts of the charge level, charging and Battery Rest periods, and the maximum capacity trend. Stored on your Mac only.
  • Battery health. Cycle count, maximum capacity, condition, temperature and live power readings.
  • Notifications. Full charge finished, protection stopped or resumed, capacity drop, hot battery, and a charge limit that is not holding.
  • Discharge to the limit. Switches the adapter off while the cable stays in, runs on the battery down to the stop level, then switches the adapter back on.
  • Shortcuts. App Intents for Shortcuts, Spotlight and Siri.
  • Safe by design. A small helper daemon writes two SMC keys — the charge inhibit and the adapter switch — and nothing else. It refuses callers it cannot verify and has no network access. Kombucha has no accounts and no telemetry; it contacts GitHub only to check for updates, when you press the button or, if you turn it on, once a day.
  • Stays out of the way. Kombucha detects another running battery manager and leaves charging to it.

The Kombucha panel in the menu bar

Settings, History: charge level and maximum capacity Settings, Battery: health and power

More in docs/screenshots.md.

Requirements

  • Apple Silicon MacBook whose SMC publishes the CHTE key.
  • macOS 15 to 26. macOS 27 and later are not supported yet.
  • One administrator approval in System Settings → General → Login Items & Extensions to enable the helper.

Other battery managers

Two apps writing the same charge limit would fight each other, so Kombucha checks for a running battery manager and leaves charging to it. It currently recognizes:

AlDente, BatFi, BattOpt, Juicy, Energiza, Battery Toolkit and batt.

Use one at a time. Quit the other app and Kombucha takes charging back on its next check.

All product names are trademarks of their respective owners. Kombucha is not affiliated with them.

Install

With Homebrew:

brew install --cask askuksov/tap/kombucha

Or by hand:

  1. Download Kombucha-<version>.zip from the latest release and unzip it.
  2. Move Kombucha.app to /Applications.

Then open Kombucha and approve the helper once in System Settings → General → Login Items & Extensions.

The app is signed with a Developer ID and notarized by Apple.

Building

make help lists shortcuts for the commands below (make build, make install, make test).

Xcode 26 (macOS 26 SDK), XcodeGen and an Apple Development certificate.

The Xcode 26 app itself needs macOS 26.2 to launch. On an older macOS, build from the terminal with its command-line tools; the built app still runs on macOS 15:

export DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer
xcodegen generate
xcodebuild -project Kombucha.xcodeproj -scheme Kombucha -configuration Release \
  -derivedDataPath build/DerivedData build

The helper refuses callers it cannot verify, so an unsigned build starts but cannot change charging. To build under your own team, copy Config/Local.xcconfig.example to Config/Local.xcconfig and set your team ID.

Tests:

xcrun swift test --package-path Packages/KombuchaKit
xcodebuild -scheme Kombucha -configuration Debug -derivedDataPath build/DerivedData \
  -destination 'platform=macOS,arch=arm64' test

The first command covers KombuchaKit. The second builds and launches the app to run KombuchaTests: the engine against fakes, lifecycle included; AppModel on that engine; the helper client against an XPC stand-in inside the test process; the settings store against a throwaway defaults suite; the pure halves of the power source, wake, SMC and battery health readers; a real process scan; the helper registration status mapping; the exactly-once reply gate; the test-host guard and the delegate that builds no engine inside it; and the code signing requirements against the binaries this machine just signed. Nothing in it registers the helper, starts the wake monitor or writes to the SMC.

Launching the built app outside the tests starts a live engine: it registers the helper and, unless another charge manager is running, sends charge commands.

Want Kombucha in your language? See Add a translation.

License

MIT License

About

Limit MacBook charging from the menu bar to extend battery lifespan

Topics

Resources

Stars

5 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages