☾ SleepToggle · alternatives
SleepToggle vs Amphetamine, KeepingYouAwake and caffeinate
All of these keep a Mac awake. They differ in mechanism — and the mechanism decides what happens when you close the lid.
| Tool | Mechanism | Lid closed? | Price | Notes |
|---|---|---|---|---|
| SleepToggle | pmset disablesleep (system master switch) | yes — on battery, nothing attached | free | ~100 lines of open source, compiled on your own Mac; one toggle, no features |
| Amphetamine | power assertions | partly — needs its separate Enhancer helper, with caveats | free | the most featureful by far: sessions, triggers, schedules; Mac App Store |
| KeepingYouAwake | power assertions (caffeinate) | no | free | open source, minimal menu bar toggle |
| Caffeine | power assertions | no | free | the 2008 original that named the category |
| caffeinate | power assertions | no | built-in | ships with macOS; Terminal only |
The honest recommendation
If you want features — keep-awake for 20 minutes, while an app runs, while a display is connected — use Amphetamine. It's excellent, free, and the category standard.
If you want a closed MacBook to keep running — a download finishing in a drawer, a build, a server, an SSH session — power assertions can't do it, because closing the lid triggers forced sleep, which ignores them (the full explanation). SleepToggle flips the one macOS setting that can: sudo pmset -a disablesleep. That's its entire job. ☾ normal sleep, ☕ awake, one click each way.
If you don't want to install anything, the two commands are on the lid-closed page — SleepToggle just makes them a menu bar button with a visible state.
curl -fsSL https://sleep.138.dk/install.sh | bash
The installer compiles the app from source you can read on your own Mac — no prebuilt binary, no App Store, no account. Exactly what it touches.