Description
Adrafinil is a macOS app that keeps a Mac awake while AI coding agents are working, including with the lid closed. It watches for agent activity through hooks and holds the Mac awake for the duration of each agent turn, then releases the hold when the turn ends, so the Mac can sleep again. It tracks overlapping agents separately, so sleep resumes only after the last hold ends. Supported agents named in the README include Claude Code, Codex, Cursor, Gemini CLI, Devin, Aider, Hermes, OpenCode, Cline and Pi. Holds can be per session or timed, and a manual Let it sleep control is available. Closed-lid sleep control runs through a privileged helper that asks for administrator approval. To limit unattended runs, Adrafinil has a thermal cutout and releases holds from sessions that were abandoned. It also offers a CLI and MCP access, and it can detect running agent processes and confirm lid-close with audio. The app counts users only if they opt in, and the README describes exactly what is sent. It requires macOS 26.4 or later, with a macOS 15 backport, and it installs with Homebrew as a cask. The source is public on GitHub.…
Highlights
- Keeps a closed-lid Mac awake while agents work
- Hooks for Claude Code, Codex, Cursor and more
- Tracks overlapping agents and releases the last hold
- Thermal cutout and abandoned-hold cleanup
- CLI and MCP access
Ratings & Reviews
No ratings yet
Be the first to rate Adrafinil.
People also visit
Adrafinil FAQ
What does Adrafinil do?
It stops your Mac from sleeping while a coding agent is working, then lets it sleep again when the work ends.
Which agents does it support?
The README lists hooks for Claude Code, Codex, Cursor, Gemini CLI, Devin, Aider, Hermes, OpenCode, Cline and Pi, plus custom integrations.
Does it send data about me?
Nothing is sent unless you opt in. The app asks once, and the README says what a check-in contains and that it never includes which agents you run or what you work on.
What macOS version is needed?
macOS 26.4 or later, with a backport for macOS 15.
How do I install it?
Use Homebrew with brew install --cask adrafinil, or follow the install steps in the README.
What are the best Adrafinil alternatives?
Popular alternatives to Adrafinil include Vigil, Belay and Capsomnia. See all Adrafinil alternatives


