Skip to content
Edith

Docs

Command reference

Battery Care

Battery Care stops charging at a limit, such as 80%, on MacBooks with Apple silicon. It can let the level drift within a range (sailing), use the battery down to the limit while plugged in, pause charging while the battery is warm, and top up to 100% once or before a calendar event you mark. Intel Macs are not supported.

The ed command line

It has no command group of its own. Every action is an operation on the running extension through ed invoke, with a JSON payload and a JSON result on stdout. A refused request prints its reason on stderr and exits non-zero, as described in conventions.

Operation Payload What it does
status {} Reads the battery and returns the charging state.
on {} Turns the charge limit on. The first time, macOS asks you to approve Edith's helper.
off {} Turns the limit off and restores normal charging at once.
configure {"limit": 80, "mode": "sailing", "sailingFloor": 70, "discharge": false, "heatProtection": true, "heatLimit": 35} Changes any of the listed settings. Every key is optional.
topUp {} Charges to 100% once, then returns to the limit.
cancelTopUp {} Stops the current top up. A top up for an event also unmarks that event.
events {} Lists timed events from Calendar in the next seven days, and which are marked.
mark {"id": "..."} Tops up before that event.
unmark {"id": "..."} Stops topping up before that event.
approve {} Asks macOS to show the approval for Edith's helper.
Terminal
ed invoke batteryCare statused invoke batteryCare oned invoke batteryCare configure --json '{"limit":80,"mode":"sailing","sailingFloor":70}'ed invoke batteryCare topUped invoke batteryCare eventsed invoke batteryCare mark --json '{"id":"synthetic-event-1"}'ed invoke batteryCare off

limit takes 50 to 100, sailingFloor 20 to 95 and always stays below the limit, and heatLimit 30 to 45 degrees Celsius. mode is limit or sailing. Unknown keys and values of the wrong type are rejected. Payloads are limited to 4 KiB.

How charging is decided

Reason When What happens
off The limit is off macOS charges normally
unplugged No adapter Nothing to manage
charging Below the limit macOS charges normally
limitReached At the limit Charging pauses; it resumes 3% below the limit
sailing At the limit in sailing mode Charging pauses until the level falls to the sailing floor
discharging Above the limit with discharge on The battery powers the Mac until it is back at the limit
heat The battery is at or above the heat limit Charging pauses until it is 2 degrees cooler
topUp A top up is running macOS charges to 100%; heat protection still applies
unsupported Intel, no battery, or no charge control in the firmware macOS charges normally

Discharge stops while the Mac sleeps. A top up for an event starts early enough to reach 100% before it begins (about 1.2 minutes per missing percent plus 15 minutes, and at least 30 minutes), stays on until the event starts, and follows the event if it moves in Calendar.

status

JSON
{  "applied": { "adapter": true, "charging": false },  "approval": "approved",  "battery": {    "adapterWatts": 96,    "charging": false,    "cycleCount": 214,    "designCapacitymAh": 5103,    "fullyCharged": false,    "level": 81,    "maxCapacitymAh": 4612,    "pluggedIn": true,    "temperature": 31.4  },  "chargingPaused": true,  "discharging": false,  "hardware": { "dischargeKey": "CH0I", "inhibitKey": "CHTE", "presentKeys": ["CHTE", "CH0B", "CH0I"] },  "markedEvents": [],  "reason": "limitReached",  "reasonTitle": "Paused at the limit",  "settings": {    "discharge": false,    "enabled": true,    "heatLimit": 35,    "heatProtection": true,    "limit": 80,    "mode": "limit",    "sailingFloor": 70  },  "supported": true,  "topUp": { "idle": {} },  "updatedAt": "2026-11-29T09:00:00Z"}

Health is the full charge capacity divided by the design capacity, read from the IORegistry AppleSmartBattery entry, as is the temperature. The adapter wattage comes from the adapter details macOS reports.

Normal charging always comes back

Pausing charging goes through Edith's helper, the same one Lid Awake uses. Normal charging comes back when:

  • you turn the limit off, unplug, or the policy no longer needs a pause;
  • you turn Battery Care off or remove it;
  • Edith quits;
  • Edith stops unexpectedly: the helper sees its connection close and restores;
  • the helper itself stops unexpectedly: it is started again and restores;
  • Edith hangs: every pause is a lease that Edith renews every 30 seconds, and the helper restores on its own when a lease is three minutes old;
  • the Mac restarts, including for a macOS update: Battery Care starts with Edith whenever it left charging changed, and restores normal charging (or applies the limit again if it is still on) from a record it keeps until a restore succeeds.

One case is outside Edith's reach: if the controller kept a pause across a restart and Edith is never opened again, nothing runs to undo it. Turn Battery Care off before uninstalling Edith.

Every restore is read back from the controller, and a restore that does not stick is retried every five seconds.