Clamshell for Mac is a menu bar app that keeps an Apple Silicon MacBook awake with the lid closed, with no external display, no sudo, and no admin rights. It is available only from clamshell.dev, on Setapp and through Homebrew. It is not on the Mac App Store; App Store apps named Clamshell are from other developers.
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.
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.
Close the lid and the built-in display stays black while coding agents, builds, downloads, and SSH sessions keep running. It is sold at clamshell.dev for $9.99 once after a free 7-day trial, and it is also available on Setapp.
What Clamshell is not
The word "clamshell" means several different things on a Mac, and search results mix them up. This is the app at clamshell.dev. It is not any of the following.
Not Apple's clamshell mode
Apple's clamshell mode keeps a closed MacBook running only while an external display is attached. Without that display, macOS sleeps the Mac as soon as the lid shuts. Clamshell for Mac removes the display requirement. How the two differ.
Not an App Store app of the same name
Clamshell for Mac is available only from clamshell.dev, on Setapp and through Homebrew. It is not on the Mac App Store; App Store apps named Clamshell are from other developers. Store listings, reviews and directory entries for an App Store app called Clamshell describe one of those other apps, not Clamshell for Mac.
Nothing to undo later
Clamshell needs no sudo, and normal lid sleep returns when you disarm, quit or restart. Used sudo pmset -a disablesleep 1 before? The pmset guide shows how to check and undo it.
Not an open-source GitHub project
Clamshell for Mac is closed source and notarized by Apple. Its public GitHub repository, clamshell-for-mac, holds the issue tracker, changelog and URL command docs, not source code. Open-source scripts and repositories on GitHub that also use the name "clamshell" are unrelated projects.
Not a general keep-awake toolkit
Clamshell does one job: the lid. For timers, triggers, and open-lid sessions, caffeinate or Amphetamine are built for that. The comparison of lid-closed apps says where each fits.
How it works
macOS treats closing the lid as its own sleep trigger, separate from idle sleep. That is why caffeinate does not help once the lid closes. While Clamshell is armed, closing the lid does not sleep the Mac.
- You close the lidmacOS starts its lid-close sleep path, separate from idle sleep.
- Clamshell is armedClosing the lid will not sleep the Mac for this session.
- The Mac keeps workingScreen dark, network up, agents and builds still running.
- While armed, Clamshell keeps the Mac awake when you close the lid, and idle sleep does not interrupt work either.
- No privileged surface to stay awake. Keeping the Mac awake needs no kernel extension, driver, privileged helper, daemon, or sudo prompt. The optional modules Low Power While Closed, Fan Boost, Agent Light, Sleep Until Reset, Sleep Means Sleep, Stay Off When Opened and Password After Close use a helper you approve once in Login Items; they are off until you turn them on.
- The screen stays dark. The built-in display stays black while the lid is closed. With the Agent Screen module on (it is off by default), agents can still use the screen for screenshots and desktop interaction during an armed closed-lid session; with it off, the display sleeps instead, which uses less battery. The Mac locks when you open the lid.
- The network stays up. Because the Mac is awake, SSH, screen sharing, and syncs keep working.
- External displays do not pause it. Clamshell arms with or without one. If a TV, projector or AirPlay mirrors your screen, the picture stays there when the lid closes, and opening the lid locks the Mac. Sidecar is the exception: macOS ends Sidecar when the lid closes, so Clamshell locks the Mac and turns its displays off.
Ways to arm it
- Option-close: hold ⌥ Option while closing the lid. This session ends when the lid opens. It needs a lid angle sensor, found in the 14-inch and 16-inch MacBook Pro (2021 and later) and some newer MacBook Air models, not the M1 MacBook Air or the 13-inch MacBook Pro.
- Menu bar: arm from the menu on any supported Apple Silicon MacBook. This arms for the next close only.
- Right-click: right-click the menu bar icon to arm until you turn it off; opening the lid does not end it.
- URL or Shortcuts: see automation below. Shortcuts arming also stays active across lid reopenings until you disarm.
Safety
Thermal safety is always on
Clamshell monitors macOS thermal pressure. At serious or critical pressure it disarms toward normal lid sleep and blocks arming until the Mac has cooled.
Normal sleep comes back
Disarming or quitting restores normal lid-close sleep and warns you if that does not complete. Restarting always returns normal lid-close sleep.
Crash recovery
The direct edition can relaunch after an unexpected exit when its crash-recovery agent is permitted.
Battery aware
It works on AC and battery and stays armed through every plug or unplug. A Disarm on low battery setting, on by default, lets the Mac sleep when the battery reaches 20%. See the battery guide.
Keep it ventilated. Leave the closed Mac on a desk, not in a bag or on a bed. Software protection does not replace airflow.
Requirements
Apple Silicon Mac laptops on macOS 14 or later. Intel Macs are not supported. The Option-close gesture needs the lid angle sensor listed above; other Apple Silicon MacBooks arm from the menu bar.
Pricing and channels
- Direct from clamshell.dev: free for 7 days, then $9.99 once for one Mac or $19.99 once for up to 3 Macs. No subscription.
- Refunds: every direct purchase has a 14-day money-back guarantee. See the refund policy.
- Setapp: Clamshell is also available on Setapp. Setapp is optional: the direct license needs no Setapp subscription.
- Mac App Store: not available there. The App Store app named Clamshell is a different product.
Try Clamshell for Mac. Free for 7 days, then $9.99 once for one Mac.
Apple Silicon, macOS 14+. Notarized by Apple. 3.6 MB. Or install with Homebrew: brew install --cask clamshell. Also on Setapp.
Automation
Clamshell's core does not detect running agents; 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 decide when it is armed. Scripts and automations can drive it through two supported routes.
- URL scheme:
clamshell://arm,clamshell://disarm, andclamshell://toggle. From a terminal,open "clamshell://arm"sends the request. It is asynchronous, so check the menu bar state before closing the lid. - Shortcuts: Arm Clamshell, Disarm Clamshell, Toggle Clamshell, and Clamshell Status actions.
open "clamshell://arm"
trap 'open "clamshell://disarm" || true' EXIT
# your long-running task
claude -p "run the test suite and fix the failures"
The full agent workflow, including a phone Remote Control setup and a test that proves work continues with the lid closed, is in how to keep Claude Code running with the lid closed. For Codex specifically, see keeping Codex running with the lid closed, and for unattended runs, running AI agents overnight on a MacBook.
Who it is for
Clamshell is for people who want a MacBook to keep working after the lid closes and do not want to carry a monitor or type sudo commands in Terminal: developers running Claude Code, Codex, or Cursor, long builds and test suites, large downloads, and Macs reached over SSH or screen sharing. If the lid stays open, a free command like caffeinate is enough. If you want a broad keep-awake toolkit or automatic agent detection, compare the options in LidRun vs Amphetamine vs Clamshell and the Amphetamine alternative guide. For the general question, start with how to keep a MacBook awake with the lid closed.
Frequently asked questions
Is Clamshell the same as Apple's clamshell mode?
No. Apple's clamshell mode is built into macOS and keeps a MacBook running with the lid closed only while an external display is attached. Clamshell for Mac is a separate menu bar app that keeps the MacBook awake with the lid closed and no display attached.
Is Clamshell on the Mac App Store?
No. Clamshell for Mac is available only from clamshell.dev, on Setapp and through Homebrew. It is not on the Mac App Store; App Store apps named Clamshell are from other developers.
Does Clamshell need sudo or leave anything to undo?
No. Keeping the Mac awake needs no sudo or administrator password, and it leaves nothing to undo: normal lid sleep returns when you disarm or quit, and a restart does the same.
Is it safe to run a MacBook with the lid closed using Clamshell?
Clamshell's thermal safety is always on: serious or critical thermal pressure disarms it toward normal lid sleep and blocks arming until the Mac cools. A restart always brings back normal lid sleep, and a low-battery cutoff, on by default, lets the Mac sleep at 20% before the battery runs flat. Keep the Mac ventilated; software protection does not replace airflow.
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 the clamshell://arm URL, or with its Shortcuts actions.
How much does Clamshell cost?
The direct version is free for 7 days, then $9.99 once for one Mac or $19.99 once for up to 3 Macs. There is no subscription, and every direct purchase has a 14-day money-back guarantee. It is also available on Setapp.
Sources: this page describes Clamshell's own behavior as documented on the homepage FAQ and in the existing guides. Clamshell is the publisher of this page. Apple, Mac, MacBook, and other product names are trademarks of their respective owners.