Our pick is Clamshell for Mac. It keeps an Apple Silicon MacBook awake with the lid closed and no monitor, without an admin password, sudo rule, or privileged helper, and a restart restores normal lid sleep. Thermal safety is always on, and it keeps working on battery and through plugging in and unplugging. For every keep-awake app ranked, see the best apps to keep a MacBook awake.
Clamshell for Mac keeps the Mac awake with the lid closed while armed. No sudo, no monitor. Free for 7 days, then $9.99 once.
Apple Silicon, macOS 14+. Notarized by Apple. 3.6 MB. Or install with Homebrew: brew install --cask clamshell. On your phone? Send the Mac download link to yourself.
caffeinate stops helping once the lid closes. pmset disablesleep stays on until you undo it. A one-time Clamshell arm, from the menu bar menu or by holding Option while closing the lid, keeps the Mac awake while the lid is shut and ends by itself when the lid opens. Right-click arming covers the next close only; Shortcuts arming stays on until you disarm.For a MacBook that actually closes with no monitor attached, Clamshell for Mac is the tool we recommend. It is a small menu bar app built for that one job, with no administrator setup and nothing left switched on after you are done. Below is how it compares with Amphetamine, LidRun, the newer Insomnia, Capsomnia, Lidless and StillOn, pmset, caffeinate, and Apple's external-display setup on Apple Silicon MacBooks.
Side by side
Best overall for lid-closed use: Clamshell. It keeps a closed MacBook awake with no monitor, no admin password, no add-on install, and nothing left on after you disarm. The other lid-closed options follow it; caffeinate comes last because it does not keep the Mac awake once the lid closes.
| Method | Extra setup | Lid closed | Scope | Price |
|---|---|---|---|---|
| Clamshell Our pick |
None beyond the app: no sudo, admin password, or privileged helper | Yes, built-in display stays black | Only while armed; normal lid sleep returns on disarm, quit or restart | 7-day free trial, then $9.99 once |
| LidRun | Admin prompt possible. Its FAQ says closed-lid mode uses pmset disablesleep and may ask for an admin password |
Yes, Pro only | Keep-awake sessions, agent and tool auto-detection, watchdog rules | Free lid-open tier; Pro $9.90 once for one Mac (launch price) |
| Amphetamine | Separate add-on. Power Protect, offered for Apple Silicon power transitions: a script plus a configuration file in /private/etc/sudoers.d/, Touch ID or admin password once |
Yes, with Closed-Display Mode | General keep-awake sessions and triggers | Free |
| Insomnia | Password and sudoers rule for pmset, set up by the installer; not notarized; macOS 26 |
Yes | Timed sessions that switch pmset disablesleep; can freeze apps and mute audio on lid close |
Free, open source |
| Capsomnia | Needs admin at install, for a privileged helper and a sudoers rule | Yes, while Caps Lock is on | Switches pmset disablesleep with the Caps Lock key |
Free, open source |
| Lidless | Root helper, approved once | Yes | System-wide SleepDisabled flag; a watchdog restores sleep after a crash |
Free, open source |
| StillOn | Install with a Terminal one-liner; its site says no password or sudo | Yes, hold Fn while closing | Beta. Closed-lid sessions through an undocumented macOS interface, per its FAQ | 7-day free trial, then $14.99 once |
pmset disablesleep |
Needs admin to run, and manual restoration | Yes | System-wide. Undocumented, persistent setting | Free |
| Apple's setup | Extra hardware. External display, keyboard, and mouse | Yes | Supported closed-display workflow | Free if you own the hardware |
caffeinate |
Terminal command | No | Idle sleep assertion tied to a process or timer | Free |
An animated MacBook with a coding agent deploying a website from its terminal. The Option key is held and the lid closes: the display goes black, but the Mac stays awake, so a dimmed copy of the terminal keeps working above the closed laptop while its front edge fills with light. When the deploy is done, a pointer shows how to lift the lid. Opening it wakes the Mac to its lock screen, which unlocks to the finished run: deployed, with the live address. The lid can then be opened and closed freely.
Why Clamshell is the better pick
- No admin password, sudo rule, or root helper.
sudo pmset -a disablesleep 1needs administrator access, and LidRun's FAQ says its closed-lid mode callspmset disablesleepand can prompt for an administrator password if its privileged helper is not yet approved. Clamshell keeps the Mac awake with the lid closed only while armed, with no sudo, driver, kernel extension, or privileged helper. - Nothing left switched on.
pmset disablesleepis an undocumented, system-wide setting that stays on until you run the inverse command. Clamshell restores normal lid sleep when you disarm or quit, and a restart does the same. - Plugging in and unplugging handled in the app. Amphetamine's App Store listing describes Power Protect as a separate download of a script and a configuration file for Apple Silicon laptops; its install page puts the file in
/private/etc/sudoers.d/and asks for Touch ID or an administrator password once. Clamshell works on AC and battery and stays armed through every plug and unplug, with nothing extra to install. - Thermal safety is always on. At serious or critical thermal pressure, Clamshell disarms toward normal lid sleep and blocks arming until the Mac cools.
- A black display that agents can still use. The built-in display stays black while the lid is closed, and agents can use the screen during an armed closed-lid session with the Agent Screen module, which is off by default. SSH and screen sharing keep working, and the Mac locks when the lid opens.
The download is notarized by Apple, the price is one payment of $9.99 for one Mac after a 7-day free trial, and there is a 14-day money-back guarantee.
pmset disablesleep stays on through every open and close until you undo it with sudo. A one-time Clamshell arm, from the menu or by Option-close, switches off by itself when the lid opens, so nothing is left behind. Right-click arming covers the next close only, Shortcuts arming stays on until you disarm, and quitting or a restart always restores normal lid sleep.Get the lid-closed pick. Clamshell is free for 7 days with no payment details, then $9.99 once for one Mac, with a 14-day money-back guarantee.
Apple Silicon, macOS 14+. Notarized by Apple. 3.6 MB. Or install with Homebrew: brew install --cask clamshell.
How the other options compare
LidRun
LidRun's free tier covers lid-open sessions with timers and battery guardrails. Closed-lid mode is part of Pro, which also detects tools such as Claude Code, Cursor, Docker, and Ollama and adds watchdog rules. Its site advertises Pro at a $9.90 launch price for one Mac. LidRun's FAQ says turning on closed-lid mode calls pmset disablesleep and can prompt for an administrator password if its privileged helper is not yet approved. LidRun also has a free command-line tool. Clamshell's core has no agent auto-detection (its optional Agent Status, Agent Notifications and Finish Work, Then Sleep modules show what Claude Code and Codex agents are doing, notify you, and can let them finish before the Mac sleeps): you arm it yourself from the menu bar, the Option-close gesture, its URL scheme, or Shortcuts.
Amphetamine
Amphetamine is a mature, free utility with timers, triggers, and a Closed-Display Mode. Its App Store notes describe Power Protect, a separate download for Apple Silicon Macs that handles charger connections and disconnections reliably and is not included in Amphetamine itself. On October 5, 2026 its App Store listing showed version 5.3.2, released November 10, 2023, as the latest. If you only need the lid-closed part, see the Amphetamine alternative guide.
pmset disablesleep
sudo pmset -a disablesleep 1 can keep a Mac awake after lid close, but the setting is undocumented, system-wide, and not tied to one task. It needs administrator access and stays active until you run the inverse command. If you use it, check SleepDisabled and restore it to 0 before putting the Mac in a bag. The pmset guide has the exact checks.
Apple's external-display setup
Apple's documented path works at a desk: connect and allow an external display, keyboard, and mouse, then close the MacBook. It does not cover travel, headless work, or an unattended Mac with no display attached. Clamshell covers that desk case too, even on battery, as well as the cases with no display attached.
caffeinate: idle sleep only
caffeinate is fine for a build, download, or script on a Mac whose lid stays open, and it can follow a process or expire after a fixed time. It does not keep the Mac awake once the lid closes, because it does not change the policy triggered by the physical lid. The caffeinate guide explains why.
If you need a free tool or agent auto-detection, Amphetamine or LidRun Pro covers that.
More comparisons
For a three-way look at the apps people ask about most, read LidRun vs Amphetamine vs Clamshell. If you already use Amphetamine and only need the lid to work, see the Amphetamine alternative guide. Comparing agent-aware tools? Read Hold My Lid vs Clamshell, Adrafinil vs Clamshell, Keepresso vs Clamshell, Sleepless vs Clamshell, and Helmlet vs Clamshell. Amphetamine user whose Mac still sleeps? See Amphetamine not working with the lid closed. For every keep-awake app in one list, see the best keep-awake apps for Mac. For agent workflows, see keeping Claude Code running with the lid closed and running AI agents overnight. For battery-only runs, see using a MacBook lid-closed on battery.
Frequently asked questions
Which is better with the lid closed: Clamshell, Amphetamine, or pmset?
Clamshell for Mac, for a closed lid with no monitor. It needs no admin password, sudo rule, or privileged helper, a restart restores normal lid sleep, and its thermal safety is always on. Amphetamine and LidRun Pro can also keep a closed MacBook awake: Amphetamine offers a separate Power Protect install for Apple Silicon power changes, and LidRun's closed-lid mode calls pmset disablesleep.
Do I need an admin password to keep a MacBook awake with the lid closed?
Not with Clamshell. It keeps the Mac awake with the lid closed while armed, with no sudo, admin password, kernel extension, or privileged helper. sudo pmset -a disablesleep 1 needs an administrator, and LidRun's FAQ says its closed-lid mode can prompt for an administrator password if its privileged helper is not yet approved.
Does Clamshell leave anything behind?
No. Clamshell restores normal lid sleep when you disarm or quit, and a restart does the same. By contrast, pmset disablesleep stays on until you run sudo pmset -a disablesleep 0.
Is there a free trial?
Yes. Clamshell is free for 7 days with no payment details, then $9.99 once for one Mac or $19.99 for up to 3 Macs, with a 14-day money-back guarantee. It is also on Setapp. Amphetamine is free, and LidRun's free tier is lid-open only, with Pro advertised at $9.90 once for one Mac.
Does Clamshell detect Claude Code or other agents automatically?
Not by default. Clamshell's core has no agent auto-detection; its optional Agent Status, Agent Notifications and Finish Work, Then Sleep modules show what Claude Code and Codex agents are doing, notify you, and can let them finish before the Mac sleeps. You arm it from the menu bar, with the Option-close gesture, with clamshell://arm, or with its Shortcuts actions. LidRun Pro advertises detection of Claude Code, Cursor, Docker, and Ollama.
Is Clamshell the same as Apple's clamshell mode or the App Store app named Clamshell?
No to both. Apple's clamshell mode needs an external display. Clamshell for Mac is a separate menu bar app from clamshell.dev, and an App Store app with the same name is unrelated.
Close the lid, keep working. Try Clamshell free for 7 days. No admin password, nothing left behind, $9.99 once if you keep it.
Apple Silicon, macOS 14+. Notarized by Apple. 3.6 MB. Or install with Homebrew: brew install --cask clamshell.
Sources checked September 29, 2026, with the Amphetamine listing and LidRun FAQ rechecked October 5, 2026: LidRun's pricing page and FAQ, Apple's closed-lid accessory guidance, the Amphetamine App Store listing and version notes, and the macOS caffeinate(8) and pmset(1) manuals. Clamshell is the publisher of this comparison. Product names belong to their respective owners. Insomnia, Capsomnia, Lidless and StillOn rows were checked October 12, 2026 against the Insomnia, Capsomnia and Lidless repositories and StillOn's homepage and FAQ. Rechecked October 15, 2026: the Amphetamine Power Protect page and App Store listing.