If LidKeep dies, your Mac sleeps again.
The app renews a 30-second lease with the helper every few seconds. No renewal, no lease: the helper restores normal sleep by itself.
helper: lease active · ttl 30s
macOS 14+ · Apple Silicon · Native Swift 6
LidKeep keeps Claude Code, Codex CLI, Antigravity, OpenCode, Aider and T3 Code — plus headless browser automation — running on your MacBook with the lid closed. No VPS to rent. No cooked laptop in your backpack.
L closes the lid. Go on, try to kill the agents.
Sleep is disabled only while an agent or CLI lease is running. The moment they finish, normal macOS sleep is back.
pmset -a disablesleep 1A 30-second dead-man's switch restores sleep on its own if LidKeep quits, crashes, or is force-killed.
pmset -a disablesleep 0Power rules and a sustained thermal watchdog put the Mac to sleep before a closed, running laptop cooks in a bag.
Cool → Warm → Hot01Anti-backpack safety
A closed Mac that never sleeps is a hazard, so LidKeep watches power and heat the whole time. It also locks the screen when the lid closes, so reopening it takes Touch ID or your password. Drag the controls and try to make it do something unsafe.
02Phone companion
Your Mac serves a small web app straight to your phone — no cloud account, no server of ours in the middle. Pair with a QR scan or a 6-digit code, then tap around below: both sides stay in sync.
Scan with your phone camera
The link changes when LidKeep restarts. Just scan again.
Connected Phones (1)
On the Mac, instantly
Direct to your Mac over the local network or your tailnet. Nothing leaves your devices.
One click starts a Cloudflare Quick Tunnel via cloudflared — HTTPS from any network, no account and no server to run.
It's a PWA: add it to your home screen and it opens full-screen like a native app.
03The real thing
Everything above is a simulation. These are unedited renders from the compiled SwiftUI binary.




04Local vs. rented
The usual fix for "my laptop sleeps" is a cloud VM. That means paying monthly to move your work away from everything that makes it work.
Apple Silicon you've already paid for.
For a box comparable to the laptop on your desk.
05Architecture you can audit
Changing system sleep needs privileges. LidKeep keeps that part tiny, single-purpose and unable to stay stuck on.
The app renews a 30-second lease with the helper every few seconds. No renewal, no lease: the helper restores normal sleep by itself.
helper: lease active · ttl 30s
# everything lidkeep-helper can run
pmset -a disablesleep 1
pmset -a disablesleep 0
No shell, no arbitrary commands, no file access. Everything else — agent detection, the lid-close screen lock, the browser, the phone server — runs unprivileged as you.
lidkeep run -- claudeA dedicated anti-throttling Chromium for CDP, Playwright and MCP tools runs --headless=new, even with the Mac locked. Need a real window? Flip on a virtual display backed by CGVirtualDisplay.
LidKeep builds from source in one command. A signed DMG and Homebrew cask are on the roadmap.
./scripts/build-app.sh && cp -R dist/LidKeep.app /Applications/ && open /Applications/LidKeep.app