Keep your Mac awake only while AI coding agents are working
rx no. 006 ・ a·draf·i·nil /əˈdræfɪnɪl/ ・ a eugeroic for machines
A signed, notarized disk image · free and open source (MIT)
awake ・ an agent is working idle ・ no agents, normal sleep hold ・ keep it awake yourself — 15m to ∞
服用注意 ・ for machines that keep watch after you've gone to sleep.
It's 3 a.m. You're asleep. The agent isn't — it's still mid-thought in a session you started hours ago, and you've closed the lid over it like an eyelid that won't quite shut. caffeinate and Amphetamine are stimulants: they keep the machine wired forever, whether or not anyone's home. Adrafinil is the eugeroic. It does nothing until an agent acquires it, keeps your Mac awake through a closed lid only for as long as that work lives, and clears the moment the last session releases. It only ever wakes for the work — then you both sleep.
Keep your Mac awake only while AI agents are working.
Adrafinil is a macOS menu bar app that prevents the system from sleeping — including clamshell (lid-closed) sleep — exclusively while an AI coding agent has an active session. When no agent is working, sleep behavior is untouched: close the lid and the Mac sleeps normally.
It's the opposite of always-on wake utilities like caffeinate or Amphetamine. Adrafinil only intervenes when an agent (Claude Code, Codex, Cursor, …) is mid-task, and gets out of the way the moment that work finishes.
Three ways it stays awake:
adrafinil hold CLI.Privileged sleep control. Overriding clamshell sleep requires root. Adrafinil isolates that in a tiny, audited helper that only exposes setSleepBlocked(Bool) — all policy lives in an unprivileged daemon. It holds a standard IOPMAssertion for idle sleep and uses pmset disablesleep for clamshell (lid-closed) sleep, after verifying on-device that the cleaner private paths don't keep a displayless lid-closed Mac awake. See [Docs/ARCHITECTURE.md](Docs/ARCHITECTURE.md) §2.
IOPMrootDomainDescription adapted from the project README.
Community project. Help and bug reports go to the maintainers on GitHub; AppsXi does not provide support for this app.
MIT License
Use, change and share it freely, including in closed source apps, as long as the copyright notice stays.
Read the full licenseAppsXi checks every version before it is listed.
Signed by Elysia Muñoz (52K336H235)
Apple Developer ID team 52K336H235
Notarized by Apple
Hardened Runtime on
File matches the hash GitHub published
SHA-256 49c009763fd44440b696869d2aa57ff20fd2ddaf4bde6c9e6e444cf42b56caa7
No malware found
ClamAV 1.5.4 on Oct 14, 2026
Install and behavior test in a virtual machine: not run yet
Coming soon for all listings.
Checked Oct 14, 2026 · Mac
DMG · 4.5 MB
Yes. adrafinil is free and open source under the MIT License. AppsXi lists the maintainers' official release and does not charge for it.
AppsXi downloads every version of adrafinil from the maintainers' official GitHub release and checks it before it is listed. For version 1.12.0 (checked Oct 14, 2026), the Mac download is signed by its developer and notarized by Apple, each file matches the checksum GitHub publishes for the release, byte for byte and a malware scan found nothing.
Yes. adrafinil has a native Apple silicon build.
adrafinil needs macOS Tahoe (26.4) or later.
adrafinil is an open source project by Mado Kagerou · 陽炎窓 on GitHub (kageroumado/adrafinil). Help and bug reports go to its maintainers there.
Something wrong with this app? Report a problem. Maintainer? Claim this listing or ask us to remove it.
No reviews yet. Anyone who downloads it from AppsXi while signed in can review it a day later.
Used this app? Sign in and download it here to review it a day later.
Share files and messages with nearby devices over your local network, no internet connection needed
Utility for formatting USB drives and creating bootable USB media from ISO images
Flash OS images to SD cards and USB drives, safely and easily
Control the brightness and volume of external displays on your Mac with keys or menu bar sliders
Upload images to S3, GitHub, Cloudflare R2, Imgur and 60+ other hosts and copy the link
App for managing and quickly switching hosts file entries, with remote hosts and a system tray menu