KeepingYouAwake stops at the lid.
Midnight Oil doesn't.
KeepingYouAwake is the app most people recommend after Amphetamine: free, MIT-licensed, actively maintained, a Homebrew cask, one click. It also draws a line at closed-lid mode, on purpose, and its most-requested feature in 2026 is exactly that. Midnight Oil is the free, source-available alternative that crosses the line carefully.
The short version
Lid open and just need on/off with a timer? KeepingYouAwake is excellent; keep it. Running agents overnight with the lid closed, or want sessions tied to an app? Midnight Oil adds those, and it's free too.
What KeepingYouAwake gets right
Plenty. It's been shipping since 2014, the maintainer still pushes releases (1.6.8 in September 2025, with 1.6.9 in progress), it has nearly 7,000 GitHub stars and around 230,000 downloads of the current version. It's sandboxed, notarized, translated into twenty languages, and it wraps Apple's own caffeinate so the mechanism is beyond reproach. If you want a thin, trustworthy on/off switch with a timer, this is the one.
Where it stops
No closed-lid mode, on purpose
The README is explicit: it “will only prevent sleep on desktop Macs and portable Macs with an open lid,” out of thermal considerations. That's a reasonable position. It's also the project's most-requested feature. An August 2026 issue asks for an optional lid-closed mode because it “would help many users who run autonomous agents or even just long build tasks on their MacBooks.” A commenter adds: “I faced the same issue with Claude Code running out overnight.” A pull request offering the feature followed in late September.
One trigger
It can activate when an external display connects, and several issues report even that as unreliable. There's no “while this app is running,” no schedule, no Wi-Fi or power trigger.
No “until”
Durations only. You can't say “until 7 AM,” and there's no live countdown in the menu (issue #241 asks for one).
Midnight Oil vs KeepingYouAwake
| Midnight Oil | KeepingYouAwake | |
|---|---|---|
| Price | Free | Free |
| Source code public | Yes (FSL, MIT after 2 years) | Yes, MIT |
| Actively maintained | Yes | Yes |
| Install | Homebrew cask or DMG | Homebrew cask or zip |
| One-click on and off | Yes | Yes |
| Timed sessions | Yes, with a live countdown | Yes, no countdown |
| Keep awake until a time | Yes | No |
| While an app is running | Yes | No |
| Closed-lid mode | Yes, opt-in, with safeguards | No, by design |
| Triggers | 10 kinds | External display only |
| Weekly schedules, like work hours | Yes | No |
| End on low battery / Low Power Mode | Yes | Yes |
| Lid-close alarm on battery | Yes | No |
| Sandboxed | No (helper needs root for lid mode) | Yes |
| Languages | English | About 20 |
| Minimum macOS | 14 Sonoma | 10.13 (12 from 1.6.9) |
What KeepingYouAwake does better
It's smaller, it runs on macOS 10.13 through Tahoe, it's translated into twenty languages, it's sandboxed, and it has a decade of track record. If those matter more to you than lid support, stay.
What Midnight Oil does better
Closed-lid mode with real safeguards, sessions tied to an app or a clock time, a live countdown, ten trigger types, battery rules, hot keys, and statistics. Same license, same price.
Switching
- Install Midnight Oil.
brew install --cask coreyhaines31/tap/midnightoil - Set your defaults. Settings › Sessions has the same allow-display-sleep and low-battery options you're used to. Settings › General has launch at login.
- Add the trigger you wanted. Settings › Triggers › Add Trigger › App Running › Terminal. For work hours, Settings › Schedules › Add “Work hours”.
- Turn on closed-lid mode when you need it. It's a checkbox in a running session. Approve the helper once.
- Quit KeepingYouAwake.
brew uninstall --cask keepingyouawakeif you're done with it.
Other ways people keep a Mac awake
Same values. More coverage.
Free. No account, no subscription.
macOS 14 or later · Apple Silicon and Intel · brew install --cask coreyhaines31/tap/midnightoil