Skip to content

Chargectl

Chargectl

Battery charge limiter for Mac, with limits below 80%

CI Latest release License: Apache-2.0 macOS 27 Apple silicon

Quickstart · Features · Screenshots · Widgets · How it works · FAQ · Install · Contributing · Security

Chargectl's Overview page: the charge against the limit, power flowing from the charger to the Mac and the battery, battery health, the charge over the last 6 hours and recent activity


Chargectl is a free, open-source battery charge limiter for Apple silicon MacBooks, including MacBook Air and MacBook Pro, on macOS 27. macOS's own Charge Limit goes no lower than 80% and still charges to 100% now and then. Chargectl takes any limit from 20% to 100%, brings the battery back when macOS charges past it, and keeps the Mac running on the charger while the battery rests. It shows what the charger, the Mac and the battery are doing each second, and keeps working while the app is closed.

Quickstart

Requirement Version
Mac Apple silicon MacBook
macOS 27 or later
brew install --cask tyldra/tools/chargectl

You can also download Chargectl-<version>.zip from Releases, or build it from source.

Then open Chargectl from Applications. A short welcome walks you through:

  1. Installing the helper, the small root service that controls charging. macOS asks for your password once. Updates restart the helper and reopen Chargectl by themselves.
  2. Choosing a limit. It starts from the limit already set in System Settings › Battery, so nothing changes until you pick another one.

After that Chargectl lives in the menu bar. Click the Chargectl ring to see your battery, switch options and drag the white marker to change the limit.

Important

Quit any other charge limiter, such as AlDente, before you install. Two of them fight over the same settings.

Features

Charge limit, 20% to 100% Charging stops at the limit and the Mac runs on the charger. The battery is not used to hold it.
Smart limit (beta) Learns how much charge you use each time you unplug, and holds that plus a 20% reserve, from 50% up to your limit. With calendar trips on, holds your full limit before flights, trains and trips in the next day. Off unless you turn it on.
Sailing After reaching the limit, the charge may drift down a few percent before charging resumes, so the battery is not topped up all day.
Above the limit Plugged in above the limit, either hold the current charge or discharge down to the limit.
Overcharge guard When macOS charges past the limit anyway (its occasional charge to 100%, or "Charge to Full Now"), Chargectl brings the battery back.
Two-way sync Chargectl's limit shows in System Settings › Battery, and a limit chosen there becomes Chargectl's limit.
Jobs Top up to 100% once, discharge to the limit, or calibrate the battery gauge.
Full by Charge to 100% just in time for a time you set, once or on chosen days, then back to the limit.
Heat protection Pause charging while the battery is warm.
Live readings Charger, Mac and battery power each second, battery health, cycles and temperature.
Time to the limit How long until the charge reaches your limit, the end of sailing or a discharge target, or empty on battery.
Energy by app The apps using significant energy, averaged over the last minute, with each app's helpers and commands counted for it.
History and logs 24 hours of charge, temperature and power, and a log of what the battery and Chargectl did.
Health over time One summary a day, kept for years: health, cycles, hours at 90% or more and the warmest moment.
Ageing avoided An estimate of the battery ageing Chargectl saved, from the charge and temperature each minute, against macOS charging to 100% whenever plugged in.
Widgets and controls Widgets in every size for the charge, power, health, today, Full by, time left and quick controls; Control Center controls for charge control, Top Up, Discharge and Full by.
Shortcuts and notifications Shortcuts actions for the limit, jobs and Full by. Notifications for problems, finished jobs and the limit.
Checks Warns when the charger is too weak to run the Mac, when cutting wall power stops working after an update, or when the battery's cells stay far apart at rest.
Automatic updates New releases install themselves while Chargectl's windows are closed, checked against their checksum and code signature. On by default; Settings › Updates.
Clean removal Uninstall restores normal charging and your macOS limit, and removes every file Chargectl added, including its caches, widget data and Dock tile. Dragging the app to the Trash does the same within a few minutes, through the helper.

Screenshots

Every page comes in light and dark; GitHub shows the one that matches your theme.

Control page: the charge limit on a slider with the sailing range, Full by, charge control, heat and the MagSafe light
Control
The limit on a slider with the sailing range drawn in, Full by, heat and the MagSafe light.
History page: totals for the range, the charge chart, temperature, power and battery health over time
History
Totals for the range, charge, temperature and power under one crosshair, and health over months.
Logs page: events grouped by day, with filters for battery, Chargectl and warnings, search and Copy
Logs
Every battery change and Chargectl action, by day, with filters, search (⌘F) and Copy.
Settings page: menu bar, appearance, notifications, the helper and updates
Settings
Menu bar, appearance, notifications, the helper and automatic updates.
Menu bar panel: the charge, the limit, health and live power, quick switches and jobs
Menu bar
Charge, live power, quick switches and jobs. Drag the marker to change the limit.
Setup window, first step: Welcome to Chargectl
Setup
Four short steps: welcome, install the helper, choose a limit, done.

Widgets

Chargectl widgets on the desktop: Charge in large and medium, Controls, Full by, Ring, Power, Health, Time left and Today

Right-click the desktop, choose Edit Widgets and search for Chargectl. Each widget answers one question, and clicking one opens the matching page.

Widget Sizes Shows
Charge Small to Extra Large Portrait The charge against your limit; larger sizes add the last hours, live power, and Top Up and Discharge
Ring Small The charge as a ring that closes at your limit
Power Small, Medium Watts from the charger, to the Mac and into the battery
Health Small, Medium Battery health and cycles, and how health changed over months
Today Small, Medium Time at 90% or more and on the charger, the lowest charge and the warmest moment
Full by Small to Extra Large Portrait The next full charge and its days, with Skip and Change; larger sizes add a track of the hours until then and the next few full charges
Controls Small, Medium The limit in 5% steps, Top Up and Discharge; Medium adds the charge control switch
Time left Small, Medium How long until the limit, full or empty

Control Center has controls for charge control, Top Up, Discharge and Full by. Add them in Control Center › Edit Controls; each can also sit in the menu bar.

How it works

On current Apple silicon firmware, the SMC keys that pause charging (CH0B, CH0C, CHTE, bfF0) are reserved for Apple through a private entitlement, so no third-party process can pause charging directly. Chargectl uses the two tools that remain:

Chargectl.app talks to the root helper over XPC; the helper sets macOS's charge limit through PowerUI and switches wall power with the CHIE SMC key.

  • macOS's own charge limit. PowerUIAgent holds the entitlement. At its limit the battery holds its charge while the Mac runs on the charger; above it the battery discharges to the limit. Limits from 80% to 100% go through PowerUISmartChargeClient. Lower limits are written to PowerUIAgent's preferences (com.apple.smartcharging.topoffprotection, mclLimitValue) after an allowed 80% request, and the com.apple.smartcharging.defaultschanged notification makes PowerUIAgent reload them. Chargectl reads the limit back and falls back to switching wall power if macOS did not take it.
  • Switching wall power with the CHIE SMC key, which runs the Mac on its battery while the charger stays plugged in. It is used to discharge to a limit below 80%, for heat protection, calibration, the overcharge guard and the fallback.
Situation What Chargectl does
Charging to the limit, or at it Sets macOS's limit to the limit. The Mac holds on the charger.
Above the limit, holding Sets macOS's limit to the current charge.
Above the limit, discharging, 80% or more Sets macOS's limit to the limit; macOS discharges to it.
Above the limit, discharging, below 80% Cuts wall power until the limit, sets macOS's limit, then reconnects.
Sailing macOS's limit follows the charge down until limit minus sailing, then charging resumes.
Heat protection Cuts wall power at the threshold and reconnects 2 °C below it.
Sleep macOS holds the limit while asleep. A discharge in progress reconnects wall power before sleep unless "Sleep discharge" is on.

Chargectl saves your own macOS charge limit before its first change and restores it when it stops, when you turn charge control off and when you uninstall. Readings come from the AppleSmartBattery registry entry and live SMC keys (B0AC, B0AV, PDTR, PSTR, VD0R, ID0R, TB0T) and need no privileges.

FAQ

How do I stop my MacBook charging at 80%?

macOS 26.4 and later can do it without an app: open System Settings › Battery, click the info button next to Charging and choose a Charge Limit from 80% to 100%. Chargectl uses that same setting, so a limit chosen in either place shows in both. Install Chargectl when you want a limit below 80%, sailing, Full by or heat protection.

Can I set a charge limit below 80%?

Yes. Chargectl takes any limit from 20% to 100%: drag the white marker in its menu bar panel, or use the Control page. Below 80%, it cuts wall power until the battery is down to the limit, then holds it there on the charger.

Why does my Mac still charge to 100% with a charge limit set?

macOS charges to 100% now and then to keep its battery estimate accurate, and "Charge to Full Now" does the same. Chargectl's overcharge guard notices and brings the battery back down to your limit.

Does Chargectl work on macOS 27?

Yes, it requires macOS 27. There, the SMC keys that pause charging are reserved for Apple's own software, so an app can no longer pause charging by writing them. Chargectl uses macOS's own charge limit and the wall-power switch instead, as How it works explains.

Does limiting the charge help my battery?

Keeping a lithium-ion battery full for long stretches wears it faster. That is why macOS's Optimized Battery Charging holds at 80% until shortly before you usually unplug. A limit cuts that wear, though the battery still ages with time and charge cycles.

Is Chargectl an alternative to AlDente?

Yes. Both stop a MacBook from charging to 100%. Chargectl is free and open source under the Apache 2.0 license. Run one or the other, not both. Two charge limiters fight over the same settings.

Does it keep working when the app is closed or the Mac is asleep?

Yes. A small helper controls charging in the background, so closing the dashboard changes nothing. While the Mac sleeps, macOS holds the limit.

Quit Chargectl in the menu bar stops the helper too: wall power comes back, and your own macOS charge limit and MagSafe light settings take over again. Opening Chargectl starts the helper and takes charging back.

Does it work on Intel Macs?

No. Chargectl needs an Apple silicon MacBook with macOS 27 or later.

Does Chargectl collect any data?

No. It has no account, analytics or tracking. Its only network request asks GitHub for the latest release every few hours. With automatic updates on, it downloads that release from GitHub.

How do I uninstall it?

Choose Settings › Uninstall Chargectl. It restores normal charging and your macOS charge limit, then removes everything Chargectl added. Details are under Uninstall.

Install and uninstall

Homebrew

brew install --cask tyldra/tools/chargectl                  # install
brew update && brew upgrade --cask tyldra/tools/chargectl   # update
brew uninstall --zap --cask tyldra/tools/chargectl          # remove everything

Chargectl updates itself, so brew upgrade without a name skips it. Use the full name tyldra/tools/chargectl: Homebrew only loads casks from other taps when you name them, or after brew trust tyldra/tools.

Download

Each release has Chargectl-<version>.zip, its SHA-256 checksum and a build provenance attestation. Unzip it and move Chargectl to Applications. Releases are not notarized, so macOS blocks the first launch of a downloaded copy: open it once, then choose Open Anyway in System Settings › Privacy & Security. To check a download:

shasum -a 256 -c Chargectl-<version>.zip.sha256
gh attestation verify Chargectl-<version>.zip --repo tyldra/chargectl

Build from source

Needs Xcode 27 and XcodeGen (brew install xcodegen).

git clone https://github.com/tyldra/chargectl.git
cd chargectl
./scripts/install.sh           # build and install the app
./scripts/install.sh --logs    # same, then follow the helper's log
./scripts/uninstall.sh         # remove everything Chargectl added

Run install.sh again after pulling changes. The helper notices the new app and restarts into it. If Chargectl.app is deleted, the helper removes itself. How local builds are signed, and what that changes for the helper, is in CONTRIBUTING.md.

Uninstall

Settings › Uninstall Chargectl works for every install method and does the same as uninstall.sh. It reconnects wall power, restores your macOS charge limit, and removes:

  • the helper, its launchd job, its sudoers rule, data, caches and crash reports;
  • the Login Items entries, preferences, caches and saved state;
  • Chargectl's tile in the Dock, pinned or under recent apps;
  • Homebrew's record of the cask, its cached download, and the tyldra/tools tap when nothing else from it is installed.

If the helper is not running, it asks for your password and does the same as an administrator.

Limitations

  • Chargectl relies on private macOS interfaces: PowerUI, PowerUIAgent's preferences and SMC keys. A macOS or firmware update can change them.
  • The helper runs as root. SECURITY.md describes what it can do and who can talk to it.
  • Releases are signed with Chargectl's own certificate, not an Apple developer one, and are not notarized. The Homebrew cask removes the quarantine flag after install so the app opens; a downloaded zip needs Open Anyway once.
  • Only Apple silicon MacBooks on macOS 27 are supported and tested.

Development

Path Contents
App/ Menu bar app: welcome, dashboard, menu bar panel, XPC client
Daemon/ Chargectl Service: control loop, SMC and macOS limit adapters, XPC service
Shared/ Code built into both: SMC access, battery readings, ChargePolicy, XPC models
Tests/ Swift Testing suites for the charging policy and shared models
scripts/ Build, test, install, uninstall and the CI entry point
./scripts/check.sh   # format, build, test, shell and workflow checks (what CI runs)
./scripts/test.sh    # unit tests only
./scripts/run.sh     # install a Debug build

The maintainer publishes releases; the steps are in CONTRIBUTING.md.

Charging decisions live in ChargePolicy, a pure function tested without hardware. Read CONTRIBUTING.md before opening a pull request, and AGENTS.md if you work with a coding agent.

Contributing

Contributions are welcome. Read CONTRIBUTING.md and follow the Code of Conduct. Changes to how charging is controlled must be tried on a real MacBook; say which one in the pull request.

Security

Report vulnerabilities privately as described in SECURITY.md. Do not open public issues for security problems.

License

Chargectl is licensed under the Apache License 2.0. Copyright 2026 Yogesh Prasad.