Close the lid. Keep the run alive. LidRun is a macOS menu-bar app that keeps your Mac awake — even with the lid shut — so Claude Code, Cursor, Codex, Docker and Ollama keep running while you step away. It releases the Mac automatically when the work is done or when battery/thermal limits are reached.
- Keeps your Mac awake with the lid closed — a guarded clamshell mode, no external display required.
- Detects your workloads — it only holds the Mac awake while real AI/dev work is running (Claude Code, Cursor, Docker, Ollama and 50+ tools), then lets the Mac sleep when the job ends.
- Safety-first — session timers, charging-only mode, a low-battery stop, and thermal monitoring. It reduces risk; it does not remove physics — keep the Mac ventilated.
- Why Awake / Why Stopped — always shows what it is protecting, why your Mac is awake, and why it stopped. No blind wake locks.
The problem it solves: you hand a long job to an AI agent, close the MacBook to go home — and macOS puts the Mac to sleep, killing the run halfway. The agent didn't crash. Your Mac slept. LidRun fixes that.
LidRun is a signed and Apple-notarized .dmg for macOS 13 (Ventura) and later. Three ways to get it:
| Method | How |
|---|---|
| Direct (recommended) | lidrun.com/download → open the .dmg, drag LidRun to Applications. |
| Homebrew | brew install --cask aibrickai/lidrun/lidrun First time on Homebrew 6+? Trust the tap once: brew trust aibrickai/lidrun |
| GitHub Releases | Grab LidRun.dmg from the latest release. |
First launch shows the standard "downloaded from the internet" prompt — click Open. LidRun is code-signed with an Apple Developer ID and notarized, so no Privacy & Security workaround is needed. → Install guide
| 🔒 Closed-Lid Mode | Shut the lid, keep the run going. Guarded, with safety limits. |
| 🤖 Auto Mode | Watches your workload — awake only while work is actually running. |
| ⏱️ Session timer | Cap any run from 30 minutes to 8 hours, then let the Mac rest. |
| 🔋 Battery & thermal guardrails | Charging-only mode, low-battery stop, thermal back-off. |
| 🧭 Why Awake / Why Stopped | Full transparency on every keep-awake decision. |
| ⌨️ CLI | lidrun -- <command> keeps the Mac awake for exactly one command. → CLI docs |
Works with: Claude Code · Cursor · Codex · Docker · Ollama · Python / PyTorch · Node / Vite / webpack · Xcode · long terminal jobs · SSH sessions — and more.
caffeinate is great for a simple terminal session. Amphetamine is great for general keep-awake automation. LidRun is built specifically for AI/dev runs you can leave behind — it watches the workload, guards a closed-lid session, shows why the Mac is awake, and auto-releases when the work finishes or a safety limit is reached. See LidRun vs. caffeinate and the buyer's guide for developers.
Guides in this repo:
Getting started — Install LidRun & open it the first time
Keep your AI/dev tools running (lid closed) — Claude Code · Cursor · Docker builds · Ollama / local LLMs
Keep your Mac awake — how-to — Keep your Mac from sleeping · Keep your Mac awake · Clamshell mode · From the Terminal (CLI)
Compare & safety — LidRun vs caffeinate vs Amphetamine · Running your Mac overnight, safely
Full, up-to-date guides live on lidrun.com (English):
- 📖 Keep Claude Code running when the MacBook is closed
- 📖 Keep a Cursor agent running on a Mac
- 📖 Prevent Mac sleep during a Docker build
- 📖 Clamshell mode on a MacBook
- 📖 The
caffeinatecommand, explained - 📖 Lid-closed developer workflow
- 🛡️ Safety & guardrails
Is LidRun free? Yes. LidRun is free forever for simple keep-awake sessions — Keep Awake, timers, charging-only mode and the low-battery stop. You can also try the closed-lid workflow before upgrading to Pro. Pro unlocks the full closed-lid AI workflow. No subscription — pay once.
How do I keep my Mac awake with the lid closed? Turn on keep-running, start your task, then close the lid. LidRun holds a power assertion so macOS won't sleep, while battery and thermal conditions stay within the limits you set. Keep the Mac on a hard, ventilated surface. → Install & first run
Does it work with Claude Code, Cursor and Docker? Yes — LidRun detects tools like Claude Code, Cursor, Codex, Docker and Ollama and holds the Mac awake while they're working, then lets it sleep when they stop. → Keep Claude Code running
Is it safe to run overnight with the lid closed? LidRun reduces risk with a low-battery floor, thermal monitoring, a timer, charging-only mode and auto-release. It does not remove physics: keep the Mac ventilated and don't run heavy workloads in a bag or an enclosed space. → Safety
Why does macOS warn me when I open LidRun? macOS shows a one-time prompt for any app downloaded from the internet. LidRun is signed with an Apple Developer ID and notarized, so a single click on Open is all it needs. → If the app won't open
Is there a subscription? No. LidRun is a one-time purchase with lifetime updates. The free tier is free forever, with no time limit.
LidRun is built for one thing: keeping AI/dev work running through a closed lid, with battery/thermal guardrails and automatic release when the job ends. The macOS keep-awake space is friendly and active — if you want something simpler, or fully open-source, these are all worth a look.
Established keep-awake apps
- KeepingYouAwake — long-running, open-source Caffeine alternative for the menu bar.
- Amphetamine — the popular free app for general keep-awake with flexible triggers.
Open-source projects for AI agents & the closed lid
- modafinil — let your agents run while the MacBook lid is closed.
- Lidless — menu-bar app to keep a Mac running with the lid closed, for coding agents.
- aquarium — keep agents running "in your bag".
- cc-caffeine — prevents your computer from sleeping while Claude Code works.
- Awayke — keep your Mac awake with the lid closed.
- StayAwake — native menu-bar app for AI coding agents (MIT).
- Macchiato — keep the Mac awake while your code agent works, even with the lid closed.
- Sleepless — MIT keep-awake with a battery-floor cutoff.
- eclam — keeps the Mac awake when it matters, and lets it sleep when it's safer.
Browse more in the keep-awake topic on GitHub.
- 🐞 Bugs / help: open an issue
- 💬 Questions / ideas: Discussions
- 🌐 Everything else: lidrun.com
Follow LidRun for release notes, closed-lid tips and behind-the-scenes builds.
Built by Henry AGI — the maker behind LidRun


