Charge bypass and a battery toolkit for Apple Silicon Macs (macOS 11+). See requirements first.
When you enable bypass, your battery is held at whatever level you want. Your computer, from this point forward, will only suck energy from the charger, meaning effective power draw from the battery drops to 0mA. You can choose between using the menu-bar app or the CLI utility from the terminal, which is much lighter on resources.
You don't need to build it locally, you can just click on actions > build, or grab a release from Releases for the .pkg and .dmg installers.
Want to see how the menu bar UI looks, how its controls work, and what features are included? See the UI and features guide.
- Building
- Components
- CLI Usage
- How bypass works
- Requirements
- How to Install
- How to Uninstall
- Project layout
- License
- Credits
- Fork the repo.
- In your forked repo, open the Actions tab and run the Build workflow.
- Leave
versionempty unless you want a specific label. - Tick
releaseto publish a GitHub Release. - When the run finishes, grab the files from the run page or from Releases.
On the other hand, to build it locally (faster), run:
make all # bin/byper, bin/byper-mon.command, byper.app
./pkg/build_pkg.sh # byper-installer.pkg + byper-installer.dmg| Name | Explained | Notes |
|---|---|---|
| core | byper CLI |
Lives at /usr/local/bin/byper. You can launch it through the terminal by running byp |
| menu bar | byper.app |
SwiftUI app that can be used as a replacement to the stock battery menu. Native battery pill matched to the system icon, showing percentage, charging bolt, bypass state and Low Power Mode |
| telemetry | SMC power rails | Per-rail wattage for SoC, DRAM, PMIC and DC-In, and individual pack cell voltages |
| bypass | Hardware charge bypass | System runs off the adapter at 0 mA net battery draw, battery held at whatever level you picked |
| powersave | Low Power Mode | Manual toggle, plus per-app auto-LPM while a designated app is frontmost. The manual switch wins over automation |
| caffeinate | Display and idle sleep hold | Manual toggle, or any of four conditions: on bypass, on lid close, on charger, per app. Again, the manual switch wins. "On lid close" also holds the privileged sleep switch, because the idle-sleep assertions do not survive a lid close |
| automations | Auto-bypass | On charger connect, at login, or on external display attach |
| logger | Session logger | Records CSV telemetry to your Desktop |
| shortcuts | Hotkey and App Intents | Global ⌘⌥B, plus App Intents for bypass on/off/toggle on macOS 13+ |
See docs/ui/README.md for screenshots and a detailed walkthrough of every popover control.
byper # Interactive real-time TUI monitor
byper on # Engage charge bypass (plugged in)
byper off # Resume standard charging
byper t # Toggle bypass state
byper s # One-line status summary
byper p # Hardware power rails (SoC, DRAM, PMIC, cells)
byper json [power] # Telemetry snapshot (or rails) formatted as JSON
byper mon [--export] # Continuous timestamped stream (--export writes Desktop log)
byper lpm on|off # Low Power Mode
byper caffeinate on|off # Manual display and idle sleep hold
byper caffeinate bypass|lid|charger on|off # Condition-based sleep holds
byper caffeinate app <bundle-id>|off # Hold sleep while a specific app is frontmost
byper caffeinate status # Show caffeinate state and armed conditions
byper lid on|off # Disable or restore system sleep (switch behind lid condition)
byper lid status # Show lid sleep switch state
byper logger [--quiet] # Continuous CSV session log on the Desktop
byper auto # Automation settings (plug, login, display, auto LPM)
byper auto run [--quiet] [--force] # Run the automations until interrupted
byper auto plug|login|display|off-on-exit on|off # Toggle one automation
byper auto lpm add|remove|list|clear [bundle-id] # Per-app Low Power Mode
byper help # Command usagemacOS has no public API for "stop charging at the current level". Every surfaced knob (Optimized Charging, charge limits via pmset) is managed by PowerUIAgent, a system daemon whose in-memory charging state is neither persisted nor externally controllable.
So byper attaches to it:
- It locates
PowerUIAgentby PID via sysctl, no subprocess. - Writes a small lldb batch script to
/tmp, serialized with a lock file. - Forks an orphaned worker that runs
lldb -p <pid> --batchas root, calls the daemon's own smart-charge entry points to enter Not Charging / hold mode, then detaches. The parent returns immediately. - Confirms the result by polling SMC registers, never by trusting the injection.
The CLI never reads the SMC mode-of-operation value. It confirms a hold from four things at once: the adapter is attached, charging has stopped, the amperage is near zero, and either the not-charging reason carries the 0x01000000 flag or the pack is at 95 percent or above.
Direct SMC writes to the charge-limit keys were tested and are rejected by the firmware. CHBI writes don't stick, so injection is the only path that works.
Because the attach takes seconds, the UI's verify-poll gates truth and the engine retries on a 1.5s / 3.5s / 6s / 10s curve, capped at 45s. A toggle can therefore lag a tap by up to ~45s. That is expected, not a hang.
| Requirement | Why |
|---|---|
| apple silicon (M1-M5) | Builds target arm64-apple-macos11.0. Intel would need a universal2 build and untested SMC register maps |
| macOS 11 Big Sur or newer | Oldest release running on Apple Silicon. App Intents need macOS 13+. The Liquid Glass popover needs macOS 26; older systems get the previous dark solid shell |
| SIP debug flag disabled | Bypass attaches to PowerUIAgent with lldb, which stock SIP refuses |
| command line tools | The installer sets them up if missing |
Boot to recovery mode on macOS, open terminal and run:
csrutil enable --without debugThis only partially disables SIP. Filesystem, kernel-extension and NVRAM protections (the stuff that matter) stay on; only the debugger policy changes. Without it, byper on command fails with "Not allowed to attach" and bypass cannot work on that machine.
To install:
curl -fsSL https://byper.org/install | bashOr with Homebrew:
brew tap Unnidentified/byper https://github.com/Unnidentified/byper
brew install --cask byperOr grab byper-installer-<version>.pkg from Releases. In each case, your settings survive upgrades, and the installer sets up Command Line Tools if you don't have them and installs the SUID helper.
Seeing "App is damaged and can't be opened"? That's macOS's gatekeeper being gatekeeper. To fix that issue, clear the quarantine attribute:
xattr -cr /Applications/byper.app(or for a downloaded package:
xattr -c byper-installer.pkg).
Run the .pkg and choose Uninstall (its postinstall removes every trace, including settings), run brew uninstall --cask --zap byper, or remove the paths in Project layout by hand and clear ~/Library/{Preferences/com.gefaass.byper.plist, Caches/com.gefaass.byper, HTTPStorages/com.gefaass.byper, Saved Application State/com.gefaass.byper.savedState}.
byper must have SUID privileges in order to work, you can't just copy the .app to another computer and expect it to work (it won't, unless you reinstall it using the .pkg from the releases page). Check the permissions with:
ls -la /usr/local/bin/byper /Applications/byper.app/Contents/Resources/bypersrc/ the engine: main.c (dispatcher + TUI), powerui.m (PowerUIAgent
bridge), smc.c (SMC registers), battery.c, power.c (rails + cells)
src/app/ the SwiftUI menu bar application and helper
pkg/ package builder scripts (preinstall keeps settings;
uninstall-postinstall is a complete uninstaller)
completions/ Zsh and Bash shell completion
docs/ architecture, install, troubleshooting, limitations, releasing, handoff
docs/images/ menu bar icon showcase
docs/ui/ UI screenshots and feature walkthrough
.github/ workflows, issue templates and PR template
Installed paths:
| Where | Explained |
|---|---|
/usr/local/bin/byper |
SUID-root CLI (chown root:wheel, chmod 4755) |
/usr/local/bin/byp, /usr/local/bin/chbypass |
Symlinks to the same binary |
/usr/local/bin/byper-mon.command (+ byp-mon.command) |
Standalone monitor, from install.sh |
/usr/local/share/zsh/site-functions/_byper, _byp |
Zsh completions |
/usr/local/share/bash-completion/completions/byper, byp |
Bash completions |
/Applications/byper.app |
Menu bar app |
Released under the MIT License.
| Project | Author | Link |
|---|---|---|
| FiraCode | Nikita Prokopov | github.com/tonsky/FiraCode |