ClamshellKeeper
MacBook clamshell keep-awake from the menu bar, without hiding the exact pmset commands it can run.
For developers who want a clear, reversible GUI around pmset -a disablesleep 1 and pmset -a disablesleep 0.
Source-build-only preview
No public binary is distributed until Developer ID signing, notarization, stapling, checksums, and Gatekeeper testing are complete.
Exact privileged scope
/usr/bin/pmset -a disablesleep 1
/usr/bin/pmset -a disablesleep 0
Managed sessions require a limited NOPASSWD rule for only those commands, so automatic Off never waits for an administrator prompt.
Bounded by design
A 3-hour default timer, 20% battery cutoff, thermal protection, current-user AI process detection, and idle display sleep keep long-running work bounded.
Before turning keep-awake on, ClamshellKeeper confirms the baseline is Off, writes a private durable lease, and starts a user-space session guardian. The guardian journals a suspended command-group identity before resuming the serialized On transition, so recovery can terminate delayed work before Off. It also handles app exit, heartbeat expiry, stalled activation/release, plus the absolute deadline when a bounded timer is selected.
Undo everything
sudo /usr/bin/pmset -a disablesleep 0
rm -f "$HOME/Library/Application Support/ClamshellKeeper/managed-session.json"
sudo rm -f /private/etc/sudoers.d/clamshellkeeper