Awake alternative

Same job as Awake.
A narrower key to the power settings.

Awake, an open-source app Ilias Ism launched in November 2026, is built for one thing: closing your MacBook lid while Claude Code, Codex, or Cursor keeps working. It's a good app with sharp ideas. Midnight Oil does the same job, runs as a full app on more Macs, and turns sleep off through a signed helper that only answers Midnight Oil.

The short version

On Apple Silicon with macOS 26 and happy with a sudoers rule? Awake is a solid, MIT-licensed choice. Want the menu bar app on an Intel Mac or an older macOS, or triggers, schedules, and sleep restored even if the app is killed? Midnight Oil.

What Awake gets right

It starts from the right problem. Bare caffeinate only blocks idle sleep, so closing the lid still triggers clamshell sleep, drops Wi-Fi, and kills a running agent. Raw sudo pmset -a disablesleep 1 fixes that but leaves the screen unlocked and can cook a MacBook in a backpack. Awake bundles the fix and the safeguards: it locks the screen the instant the lid closes, pauses at 10% battery or 40 °C, and resumes when the Mac recovers. It has a Control Center toggle, a menu bar timer, a short CLI (awake 45m, awake -- codex …), a Nix flake, and no telemetry. It's a thoughtful first release.

Where it stops

A passwordless sudo rule

Setup writes /etc/sudoers.d/awake, letting every member of the admin group run pmset -a disablesleep 0 or 1 without a password. The rule is narrow, two exact commands and validated with visudo, but it applies to every process running as any admin user, not just Awake. Midnight Oil's helper accepts connections only from the Midnight Oil app signed by its developer team.

A shell watcher holds the off switch

pmset disablesleep is a system setting that outlives the process that set it. Awake turns sleep back on from a background shell process that watches its caffeinate. That works when the timer or command ends, but if the watcher itself is killed, say by a logout or a stray kill, it exits without restoring sleep, and the Mac stays sleepless until you run asleep. Midnight Oil's helper is a launchd service: it turns sleep back on when the app quits or crashes, and again on its own launch if it was ever stopped.

The app is Apple Silicon and Tahoe only

Its Homebrew cask depends on arch: :arm64 and macos: :tahoe, and the only download is an arm64 DMG. On an Intel Mac or anything older than macOS 26 you can still install the command line tool from its Homebrew formula or Nix flake, but not the menu bar app or the Control Center toggle.

One kind of session

Indefinite, a timer, or while a command runs. No “until 7 AM,” no “while this app is open,” no schedules, and no triggers for Wi-Fi, power, displays, or devices.

Midnight Oil vs Awake

Midnight OilAwake
PriceFreeFree
Source code publicYes (FSL, MIT after 2 years)Yes, MIT
Closed-lid modeYes, opt-inYes
How it disables sleepSigned helper, only answers Midnight Oilsudoers rule for all admin users
Sleep restored if the app is killedYes, by a launchd helperOnly if its shell watcher survives
Locks the screen when the lid closesYes, unless docked to a displayYes
Pauses when the Mac gets hotYes, lets it sleep; resumes once it wakes coolYes, resumes when cool (not for awake --)
Low-battery cutoffYes, level you chooseYes, 10% by default
Control Center toggleYes (macOS 26)Yes (macOS 26)
Command linemidnightoil run, start, 45m, statusawake, awake 45m, awake --
Keep awake until a timeYesNo
While an app is runningYesNo
Triggers and weekly schedulesYesNo
Battery temperature in the menuNoYes
Intel MacsYesCommand line only
Minimum macOS14 Sonoma26 Tahoe for the app
InstallHomebrew cask or DMGScript, Homebrew, DMG, or Nix

What Awake does better

It's MIT today, it shows the battery temperature in its menu, it ships a Nix flake and nix-darwin module, and it can run your own script when the lid closes, handy for unmounting an encrypted volume. If you're on Apple Silicon with Tahoe and want the smallest thing that works, it's a fine pick.

What Midnight Oil does better

A signed helper instead of a sudoers rule, sleep restored even if the app is killed, the full app on Intel and macOS 14, sessions that end at a clock time or when an app quits, ten trigger types, weekly schedules, and midnightoil run that returns your command's exit status and shares one session across parallel runs.

Switching

  1. Restore sleep and remove Awake's sudo rule. Run asleep, then Awake's uninstall steps; check that /etc/sudoers.d/awake is gone and pmset -g no longer shows SleepDisabled 1.
  2. Install Midnight Oil. brew install --cask coreyhaines31/tap/midnightoil
  3. Set up closed-lid mode. Settings › Closed Lid › Install, then approve Midnight Oil once in System Settings › Login Items. Screen lock and the heat pause are on by default.
  4. Swap your commands. awake 45m becomes midnightoil 45m --lid-closed; awake -- codex exec … becomes midnightoil run --lid-closed -- codex exec ….

Close the lid. Keep the safeguards.

Free. No account, no subscription.

macOS 14 or later · Apple Silicon and Intel · brew install --cask coreyhaines31/tap/midnightoil