brew install --cask GAM3RG33K/tap/unrestor
sudo unrestor install
# check
unrestor status
Background service: running
Install it once
One Homebrew command, plus a one-time password prompt to set up the small background service.
Unrestor keeps your MacBook awake with the lid shut for exactly as long as a command, a process, or a timer needs it. Then it lets go, and your Mac sleeps again.
brew install --cask GAM3RG33K/tap/unrestor
Then run sudo unrestor install once, and unrestor run -- your-command any time.
Wraps whatever you already run
No settings to hunt for and nothing to remember to switch off. A hold belongs to the thing that asked for it.
One Homebrew command, plus a one-time password prompt to set up the small background service.
Put unrestor run -- in front of any command, watch a process by id, or hold with a timer.
The work keeps going. When it ends, or a limit is hit, your Mac goes back to sleep on its own.
brew install --cask GAM3RG33K/tap/unrestor sudo unrestor install # one time: the background service unrestor run -- npm run build # close the lid and walk away
It does one job, keeping the Mac awake while work runs, and spends the rest of its effort making sure it never overstays.
A hold lives and dies with the command, process, or timer that asked for it. Quit, crash, or lose the connection and the service releases it and restores your original setting, even after a reboot.
Lid closed, no charger needed. Power-only is there if you want it.
Pick a battery floor from 10% to 50%. The service enforces it, along with a heat limit, so nothing running on your Mac can switch them off.
The menu-bar app keeps a live countdown for timed holds, with one-tap timers from 30 minutes to 8 hours.
Nothing to sign up for and nothing sent anywhere.
The app looks for a new release once a day (you can turn that off). Homebrew installs update through Homebrew, so its records stay correct.
Keeping a Mac awake lid-closed needs a tiny root service. So we made it tiny, wrote down exactly what it can and can't do, and put all of it in the open.
Unrestor is something I built for myself, then opened up. I'm keeping the code and the workflow my own, so it's open to read and fork, not to contributions.
Apache-2.0. Use it, change it, ship your own version, commercially or not. Give it its own name and icon.
Pull requests from outside are rejected, however good they are. It's what keeps this repo mine.
Bug reports and ideas are read. There's no guarantee of a reply, a fix, or a timeline.
sudo unrestor uninstall to stop the service and restore your sleep setting, then brew uninstall --cask unrestor.brew install --cask GAM3RG33K/tap/unrestor