Native macOS menu bar app that keeps your MacBook awake for AI coding agents - Claude Code, OpenAI Codex, Cursor - even with the lid closed. Open source (MIT), IOPMAssertion + scoped sudoers rule for password-free pmset, timed auto-off, login item, crash-safe self-heal. Built for overnight agent runs and clamshell mode without an external display.
StayAwake is a native macOS menu bar app that keeps your MacBook awake during long AI coding sessions, including allowing it to run with the lid closed for overnight agent tasks.
How It Works
You start a long AI coding task before bed, but wake up to find your Mac asleep and your agent stuck on task three.
You search for a solution and find this tiny menu bar app designed specifically for keeping your Mac awake during AI agent runs.
You drag the app to your Applications folder and approve it in System Settings when prompted (first-time security check).
With one click in the menu bar, your Mac stops falling asleep when idle. You pick how long: 30 minutes, a few hours, or forever.
macOS asks for your password once to allow the lid-close feature.
You enable one-time passwordless access, so future lid-close toggles are silent.
Your AI agent finishes all 40 tasks overnight. The timer auto-releases when done, or you wake up to a completed project.
No more half-finished overnight tasks. Your Mac stayed awake exactly as long as needed, then returned to normal.
Star Growth
Repurpose is a Pro feature
Generate ready-to-use prompts for X threads, LinkedIn posts, blog posts, YouTube scripts, and more -- with full repo context baked in.
Unlock RepurposeSimilar repos coming soon.