cd /news/developer-tools/show-hn-macsomnia-close-your-macbook… · home topics developer-tools article
[ARTICLE · art-97458] src=github.com ↗ pub= topic=developer-tools verified=true sentiment=· neutral

Show HN: Macsomnia – close your MacBook lid while keeping long jobs alive

Macsomnia, a new macOS menu-bar app by developer iamdadzilla, lets users close their MacBook lid while keeping long-running light jobs such as AI agents, builds, and downloads alive by disabling clamshell sleep. The app, available via Homebrew or GitHub, requires macOS 13 Ventura or later and includes an auto-off timer, a red screen strip indicator, and a live countdown, with a warning that heavy sustained load with the lid closed may cause heat damage.

read2 min views1 publishedAug 14, 2026
Show HN: Macsomnia – close your MacBook lid while keeping long jobs alive
Image: Michielbdejong (auto-discovered)

A macOS menu-bar app that stops your Mac from sleeping — including clamshell (lid closed) with no external display — to keep long-running light jobs (AI agents, builds, downloads) alive.

When active, a red strip spans the top of every screen and the menu-bar label shows a live countdown, so you can never miss that it's on. An auto-off timer turns it off after a duration you pick.

Requires macOS 13 (Ventura) or later.

Disabling clamshell sleep defeats a thermal-protective behavior. Macsomnia is intended for light workloads. Running heavy, sustained CPU/GPU load with the lid closed and no external cooling can cause dangerous heat buildup and may damage your hardware. Use the auto-off timer. Macsomnia is provided as-is, with no warranty; you use it at your own risk.

brew tap iamdadzilla/macsomnia
brew install --cask macsomnia

Recent Homebrew asks you to trust a third-party cask tap the first time. If the install stops with an "untrusted tap" message, run the command it suggests (brew trust iamdadzilla/macsomnia

) and re-run the install.

Upgrade later with brew upgrade --cask macsomnia

.

Grab the Macsomnia-<version>.zip

from the latest release, unzip it, and move Macsomnia.app

to /Applications

. Builds are signed and notarized, so they open without Gatekeeper warnings.

git clone https://github.com/iamdadzilla/Macsomnia.git
cd Macsomnia
./make-app.sh          # builds Macsomnia.app

Then move Macsomnia.app

to /Applications

. (Requires the Xcode command-line tools.)

  • Open Macsomnia. It shows a one-time danger/liability warning you must accept. A zzz

icon then appears in the menu bar. - The first time you enable it, Macsomnia registers a small privileged helper (an SMAppService

background daemon) that runspmset

as root. macOS asks you to allow Macsomnia's background item inSystem Settings → General → Login Items & Extensions(under "Allow in the Background"). Approve it, then enable again — after that it works with no further prompts.

  • Click the icon → choose a duration: 30 min · 2 h · 4 h · 8 h · until I turn it off. - While ON: a red strip appears across the top of every display, the label shows a live countdown, and the auto-off timer will disable it. Disable now turns it off. Quitting the app also restores normal sleep.- If sleep gets disabled by anything else, Macsomnia detects it within ~5s, shows the red strip, and notifies you.

A signed helper daemon runs these as root, reached over XPC — only Macsomnia's own signed app is allowed to talk to it:

  • Enable: pmset -b sleep 0 ; pmset -b disablesleep 1

  • Disable: pmset -b sleep 5 ; pmset -b disablesleep 0

disablesleep 1

is what keeps the Mac awake with the lid closed — stronger than the idle-sleep prevention that caffeinate

and similar tools use.

brew uninstall --cask macsomnia          # or delete Macsomnia.app

Upgrading from 1.0 (which used a sudoers rule instead of the helper)? Remove the now-unused rule:

sudo rm -f /etc/sudoers.d/macsomnia

MIT — see LICENSE.

Promotion plan— launch and outreach notes

── more in #developer-tools 4 stories · sorted by recency
── more on @macsomnia 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/show-hn-macsomnia-cl…] indexed:0 read:2min 2026-08-14 ·