Power in
Watts, volts and amps arriving at the USB-C or MagSafe port, and how much of the charger’s negotiated power you’re using.
macbat is a terminal power monitor for Apple Silicon laptops. It shows what the charger is
delivering, what the system is drawing, and whether the battery is charging or covering the
shortfall. It updates every second and never asks for sudo.
Four live panels and a history chart, laid out like macmon: the name on the left of each border, the live value on the right, and the details along the bottom.
Watts, volts and amps arriving at the USB-C or MagSafe port, and how much of the charger’s negotiated power you’re using.
Whole-system power with its average and peak. When the charger can’t keep up and the battery covers the difference, it says by how much.
Signed charge or discharge power, pack voltage and current, and the time until full or empty.
Charge level, mAh remaining, capacity compared with the design capacity, cycle count and pack temperature.
Power in, system and battery on one chart over the last 1, 5, 15 or 60 minutes, plus the energy each has used since start.
The power your Mac negotiated with the charger, the levels the charger offers, and a note when a standard 3 A cable is holding back a bigger charger.
macOS already knows all of this, but it’s spread across tools that need root, update slowly, or only show a percentage.
Reads the SMC sensors and the battery’s registry entry as a normal user, so there’s nothing to elevate and nothing running as root.
The battery driver’s own power figures only refresh every 30 to 60 seconds. macbat reads sensors that update about once a second.
macbat pipe prints one JSON sample per line, ready for jq, a log file or your own dashboard.
A single 1.2 MB Rust binary with no daemon, no background service and nothing to configure.
macbat is built from source with Cargo. There are no prebuilt downloads yet.
Builds the latest version from GitHub and puts macbat in ~/.cargo/bin.
$ cargo install --git https://github.com/patsissons/macbatBuilds a release binary and installs it to ~/.local/bin. Set BINDIR to install somewhere else.
$ git clone https://github.com/patsissons/macbat
$ cd macbat
$ scripts/install.shRun macbat for the dashboard, or use a subcommand to get the data as text.
$ macbat # dashboard
$ macbat -i 500 # dashboard, sampling every 500 ms
$ macbat pipe # JSON lines, one sample per interval
$ macbat pipe -s 1 | jq # a single sample
$ macbat debug # raw SMC keys and the battery registry entry
$ macbat debug P # every SMC key starting with "P"Your choices are saved in ~/.config/macbat.json.
Live power comes from the SMC, the chip that manages power and sensors. Charger, capacity and
time estimates come from the battery’s IORegistry entry, the same data ioreg shows.
| Metric | Source | Notes |
|---|---|---|
| Power in | SMC PDTR, VD0R, ID0R | Power after the USB-C or MagSafe port, about once a second |
| System | SMC PSTR | Whole-system draw, the same value macmon reports |
| Battery | SMC B0AV × B0AC | Positive while charging, negative while discharging; checked against the registry voltage |
| Battery temperature | SMC TB0T–TB2T | Average of the pack sensors |
| Charger, charge, capacity, cycles, time left | IORegistry AppleSmartBattery | Also the fallback for power when the SMC can’t be read |
The header shows the power your Mac and the charger agreed on over USB-C, not the number printed on the charger. A charger can only offer more than 3 A when the cable is rated for 5 A, so a 70 W charger on a standard USB-C cable tops out at 20 V × 3 A = 60 W. macbat adds “3 A cable limit” to the header when it sees this.
Dual-port chargers often offer less than their label on each port, and some never offer their full rating over USB-C.
Not exactly. It’s the battery’s nominal capacity divided by its design capacity. The “Maximum Capacity” in System Settings uses Apple’s own formula, which isn’t published, so the two can differ by a few percent.
The sensors are read at slightly different moments, so during load spikes a single sample can be off by a watt or two. The averages in the history panel line up.
macbat is built for Apple silicon laptops. Desktops have no battery, and Intel Macs use different sensors.