{"repo":"TY-teo/StayAwake","free":true,"listed":false,"github":"https://github.com/TY-teo/StayAwake","clone":"git clone https://github.com/TY-teo/StayAwake.git","description":"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.","language":"Swift","stars":56,"topics":["agentic-workflow","ai-agents","amphetamine-alternative","apple-silicon","caffeinate","clamshell-mode","claude-code","cursor","developer-tools","macos"],"license":"MIT","category":"ai-agents","readme_excerpt":"StayAwake 常驻 macOS 菜单栏的「保持唤醒 / 合盖继续运行」小工具 · Keep your Mac awake, even with the lid closed. &nbsp; StayAwake 用最少的点击控制两件事：让系统空闲时不休眠，以及合上盖子也能继续跑任务。界面完全采用原生 macOS 系统设置风格，跟随系统浅/深外观，常驻菜单栏、不占 Dock。 &nbsp;&nbsp; --- What is StayAwake StayAwake is a native macOS menu bar app that keeps your MacBook awake while Claude Code , OpenAI Codex , and Cursor finish long AI agent runs - including in clamshell mode with the lid closed and no external display. It is open source (MIT) and built for the AI-coding era, where a single caffeinate flag or the stock Energy Saver settings are no longer enough. Built for the AI-agent era The existing \"keep awake\" tools were designed before agents existed: - KeepingYouAwake's README explicitly opts out of lid-closed sleep. - Caffeine and the caffeinate CLI only stop idle sleep. - Amphetamine handles clamshell but is closed-source and sandboxed. - Claude Code itself has been observed silently spawning caffeinate -i -t 300 in a loop (anthropics/claude-code issue #21432) precisely because the problem is unsolved at the OS level. StayAwake makes the AI-agent case the default, not a workaround. How it works - A kIOPMAssertionTypePreventUserIdleSystemSleep assertion stops idle system sleep. - An optional kIOPMAssertionTypePreventUserIdleDisplaySleep assertion is added only when you choose \"Screen always on\". - For lid-closed sleep, StayAwake runs /usr/bin/pmset -a disablesleep 1 through a PrivilegedRunner protocol. You can either approve an admin prompt each tim","default_branch":null,"files":null,"tree":[],"storefront":"/r/TY-teo","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/TY-teo/StayAwake/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}