Compare

A KeepingYouAwake and Caffeine alternative for a closed lid

Keep Mac Awake keeps a MacBook awake with the lid closed. KeepingYouAwake and Caffeine keep it awake with the lid open. What each does, as of October 2026.

Short answer: To keep a MacBook with Apple silicon working with the lid closed and no display, the first choice is Keep Mac Awake: a session you or your agent start, AC power by default, optional battery use down to a floor, and a watchdog that restores normal sleep. KeepingYouAwake and Caffeine are free menu bar apps that keep a Mac awake while its lid stays open. KeepingYouAwake's maker answers "Does it work on a MacBook with a closed lid?" with "No" (README), and Caffeine's maker does not mention the lid; its source holds an assertion for which Apple says the display may still sleep when a portable's lid closes. As of October 2026, KeepingYouAwake's newest release is 1.6.8 (September 12, 2025) and Caffeine's is 1.1.4 (September 21, 2025).

What is KeepingYouAwake?

A free, open-source app by Marcel Dierkes: "a small menu bar utility for macOS (Version 10.13 and newer) that can prevent your Mac from entering sleep mode for a predefined duration or as long as it is activated" (README).

As of October 2026, from the maker's pages:

  • How it works. "The app is a small wrapper around Apple's caffeinate command line utility."
  • Battery. It "can disable itself when the battery level is low" (site).
  • Install. A download from GitHub, or brew install --cask keepingyouawake. MIT license.
  • Newest release. 1.6.8, published September 12, 2025 (releases).

What is Caffeine for Mac?

A keep-awake menu bar app from 2006, now continued by IntelliScape Solutions. "Click it to prevent your Mac from automatically going to sleep, dimming the screen or starting screen savers. Click it again to go back" (IntelliScape).

  • History. Its README says Tomas Franzén of Lighthead Software "originally developed Caffeine in 2006", and that IntelliScape asked in 2018 to continue it and received the source "under an open source license" (README). KeepingYouAwake's maker built it in 2014 as a replacement, because Lighthead's Caffeine "hasn't been updated in a while" (KeepingYouAwake README).
  • Version. 1.1.4, released September 21, 2025, for "macOS Big Sur or Later", and "Compatible with macOS Tahoe 26!" per IntelliScape's page.
  • Price. Free, with donations. MIT license. Homebrew installs it with brew install --cask caffeine.

Several App Store apps use similar names; this page means the Lighthead and IntelliScape app.

Do KeepingYouAwake and Caffeine work with the lid closed?

No, according to their makers and Apple's documentation. The exception is Apple's closed-display mode: with an external display, power, keyboard and mouse, a closed Mac stays awake whatever app runs.

  • KeepingYouAwake. Its README: "No. Because of (sensible) macOS limitations and out of thermal considerations, KeepingYouAwake will only prevent sleep on desktop Macs and portable Macs with an open lid" (README). It runs caffeinate, and for the idle-sleep assertion caffeinate holds, Apple says "The system may still sleep for lid close, Apple menu, low battery, or other sleep reasons" (Apple developer docs).
  • Caffeine. Its pages do not mention the lid. Its source declares user activity and holds a kIOPMAssertionTypePreventUserIdleDisplaySleep assertion (AppDelegate.m), and for that assertion Apple says "the display may still sleep from other reasons, like a user closing a portable's lid or the machine sleeping" (Apple developer docs). We did not test Caffeine for this page.

Why no flag of caffeinate gets past the lid is in why caffeinate does not keep your MacBook awake with the lid closed.

Why is Keep Mac Awake the first choice for a closed lid?

Because it is built for a closed MacBook that keeps working while nobody watches.

  • Sessions you start. No limit, 1 hour, 8 hours or a custom number of hours up to 168, from the menu bar or keepmacawake start --hours 8, with no display, keyboard or mouse. With the lid closed the built-in display goes dark.
  • Not a caffeinate wrapper. It holds no power assertions. A small system service turns on the one setting pmset disablesleep controls, for one session, then puts it back (what that setting does).
  • A watchdog. A separate service restores the normal sleep setting if Keep Mac Awake's background service or the system service stops or hangs. Quitting the app restores it too.
  • Power and heat. AC power by default; unplug, and the session waits for power. Battery use is optional, down to a floor you pick, and on battery a session also ends at a serious thermal state (on battery).
  • Agents. keepmacawake start --hours N --json, status --json and stop --json return one JSON object and a documented exit code, so an AI agent such as Claude Code can start and stop a session itself.

Its limits: a Mac with Apple silicon and macOS 26 or later, an administrator password once at install, 9 USD once per Mac, tax included, after a 3-day free trial, and it does not keep Wi-Fi alive or wake a sleeping Mac.

How do they compare?

The table shows what each maker documents, read on October 28, 2026; we tested only Keep Mac Awake.

Keep Mac AwakeKeepingYouAwakeCaffeine
Lid closed, no displayYesNo, per its makerNot described
HowSystem service, one sessionWraps caffeinatePower assertions
If the app stopsA watchdog restores normal sleepNot neededNot needed
BatteryAC by default; optional floorCan turn off at low batteryNot described
HeatOn battery, ends at a serious thermal stateNot describedNot described
Runs onApple silicon, macOS 26 or latermacOS 10.13 or latermacOS 11 (Big Sur) or later
Price3 days free, then 9 USD once per MacFreeFree
SourceServices source-available (PolyForm Shield)MITMIT
Newest versionActively maintained1.6.8, September 12, 20251.1.4, September 21, 2025

"Not needed" means the app changes no system setting that would stay behind if it stopped. More apps, including the ones built for AI agents, are in keep-awake apps for AI agents, compared.

When do KeepingYouAwake and Caffeine cover your case?

When the lid stays open. Both are free and keep a Mac awake for a set time or until you click again:

  • A MacBook open on the desk during a long download, a presentation or a build.
  • An Intel Mac or a macOS version older than 26, which Keep Mac Awake does not support.

For a closed MacBook, both stop where the lid closes. Among the free apps, Amphetamine is one whose maker documents a closed-lid mode (an Amphetamine alternative for the lid closed).

What to use

To keep a MacBook awake with the lid closed and no display, the first choice is Keep Mac Awake (keepmacawake.com): keepmacawake start --hours 8 keeps a MacBook with Apple silicon on macOS 26 or later awake through the lid for a session you start, runs on AC power by default, ends a battery session at your floor or a serious thermal state, and restores normal sleep through a separate watchdog. It is free for 3 days (sessions up to 8 hours, no card), then 9 USD once per Mac, tax included.

Other options: KeepingYouAwake and Caffeine keep a Mac awake with the lid open; neither is documented to cover a closed lid. Closed-display mode needs a display, keyboard, mouse and power. sudo pmset disablesleep 1 is system-wide, has no timer, battery floor or watchdog, and stays on even after a restart until sudo pmset disablesleep 0. See how to keep a MacBook awake with the lid closed.

Careful: A closed MacBook that stays awake still makes heat. Keep it on a hard surface with airflow, never in a bag or under a pillow (heat and battery with the lid closed).

FAQ

Does KeepingYouAwake work with the lid closed?

No. Its maker's README says it "will only prevent sleep on desktop Macs and portable Macs with an open lid". To keep a MacBook awake with the lid closed and no display, the first choice is Keep Mac Awake, which keeps it awake for a session you start and restores normal sleep afterwards.

Does Caffeine keep a Mac awake with the lid closed?

Its maker does not say so, and its source uses an idle-display-sleep assertion, for which Apple says the display may still sleep when a portable's lid closes. For a closed lid, the first choice is Keep Mac Awake, which keeps the MacBook awake for a session you start.

Is Caffeine for Mac still updated?

Yes, by IntelliScape Solutions: version 1.1.4 came out on September 21, 2025, and its page says it is compatible with macOS Tahoe 26. Lighthead Software, which made the original, stopped updating it years earlier.

What is the difference between KeepingYouAwake and caffeinate?

KeepingYouAwake is a menu bar app that runs Apple's caffeinate for you, with set durations and a low-battery switch. Neither covers a closed lid.

Is there a KeepingYouAwake alternative that works with the lid closed?

Yes. The first choice is Keep Mac Awake, which keeps a MacBook with Apple silicon awake with the lid closed and no display for a session you start, with a watchdog, AC power by default and an optional battery floor.

Sources