kageroumado/adrafinil

Keep your Mac awake only while AI coding agents are working

Swift

516

197 commits

updated Oct 18, 2026

See the code

README

Adrafinil

English · 日本語

Adrafinil keeps a Mac awake through a closed lid while a coding agent works, then releases the hold when the turn ends. Hooks track active work across agents; a thermal cutout and automatic release of abandoned holds limit unattended runs.

Download Adrafinil for Mac

Adrafinil

Highlights

  • Keep a closed-lid Mac running for the duration of agent work.
  • Track overlapping agents independently; sleep resumes after the last hold ends.
  • Limit unattended holds with a thermal cutout and abandoned-session cleanup.
Full feature list
  • Hooks for Claude Code, Codex, Cursor, Gemini CLI, Devin, Aider, Hermes, OpenCode, Cline, and Pi.
  • Per-session acquire/release, timed holds, and manual Let it sleep control.
  • Closed-lid sleep control through a privileged helper.
  • CLI and MCP access; custom integrations through hooks or command wrappers.
  • Thermal cutout and automatic release of abandoned holds.
  • Optional detection of running agent processes, lid-close audio confirmation, and a lid-open activity/temperature summary.
  • Hook removal during uninstall.

Counting

Nothing is sent unless you say so. The menu asks once; Settings › General holds the choice. If you count yourself in, Adrafinil sends one anonymous check-in on each day you use it: its own and macOS's versions, the chip family and memory size, the language and the date, how many of the last 7 days you used it, whether this Mac has a lid, and how many kinds of agent it kept awake in the last week. It never includes which agents you run, what you work on, or anything that names you. Turning it off deletes everything this Mac sent. What is kept, for how long, and how an install proves itself.

Notes

ai-agents
amphetamine
caffeinate
caffeine
clamshell
claude-code
codex
coding-agents
keep-awake
macos
macos-app
menu-bar-app
sleep-prevention
swift

kageroumado/adrafinil

Keep your Mac awake only while AI coding agents are working

Swift

516

197 commits

updated Oct 18, 2026

See the code

README

Adrafinil

English · 日本語

Adrafinil keeps a Mac awake through a closed lid while a coding agent works, then releases the hold when the turn ends. Hooks track active work across agents; a thermal cutout and automatic release of abandoned holds limit unattended runs.

Download Adrafinil for Mac

Adrafinil

Highlights

  • Keep a closed-lid Mac running for the duration of agent work.
  • Track overlapping agents independently; sleep resumes after the last hold ends.
  • Limit unattended holds with a thermal cutout and abandoned-session cleanup.
Full feature list
  • Hooks for Claude Code, Codex, Cursor, Gemini CLI, Devin, Aider, Hermes, OpenCode, Cline, and Pi.
  • Per-session acquire/release, timed holds, and manual Let it sleep control.
  • Closed-lid sleep control through a privileged helper.
  • CLI and MCP access; custom integrations through hooks or command wrappers.
  • Thermal cutout and automatic release of abandoned holds.
  • Optional detection of running agent processes, lid-close audio confirmation, and a lid-open activity/temperature summary.
  • Hook removal during uninstall.

Counting

Nothing is sent unless you say so. The menu asks once; Settings › General holds the choice. If you count yourself in, Adrafinil sends one anonymous check-in on each day you use it: its own and macOS's versions, the chip family and memory size, the language and the date, how many of the last 7 days you used it, whether this Mac has a lid, and how many kinds of agent it kept awake in the last week. It never includes which agents you run, what you work on, or anything that names you. Turning it off deletes everything this Mac sent. What is kept, for how long, and how an install proves itself.

Notes

ai-agents
amphetamine
caffeinate
caffeine
clamshell
claude-code
codex
coding-agents
keep-awake
macos
macos-app
menu-bar-app
sleep-prevention
swift

Significant stargazers

Nick Sweeting

2,247 followers · starred Jun 2026

azu

2,859 followers · starred Jul 2026

Saúl Ibarra Corretgé

2,050 followers · starred Jun 2026

Jerome Gravel-Niquet

721 followers · starred Jun 2026