A tiny macOS menu-bar app that keeps your Mac awake — including running with the lid closed (no external display needed), which is what Amphetamine's "closed-display mode" does. No App Store, no Apple ID, no third-party apps.
🌐 Website: https://abhinav-ranish.github.io/KeepAwake/ · 📦 Download · 📝 Changelog
Why this exists: I wanted Amphetamine, but it's Mac App Store–only and I couldn't get it installed on my work laptop (no Apple ID sign-in allowed). So I built this — same core feature (keep awake + closed-display mode), installable without the App Store or an Apple ID. Full credit to Amphetamine for the idea.
- A menu-bar coffee-cup icon. Click it and pick: 15 min / 30 min / 1 hour / Indefinitely / Custom…
- A "Keep running with lid closed" checkbox (on by default). When on, it flips
the macOS
disablesleeppower setting so the machine keeps running with the lid shut. - While active, the menu shows time remaining and a Stop button.
- Stopping (or the timer expiring, or quitting) reverts everything to defaults — it never leaves your Mac unable to sleep.
Requires Xcode Command Line Tools (xcode-select --install — no Apple ID needed).
bash install.shThat builds the app into ~/Applications/KeepAwake.app and sets it to auto-start at login.
Lid-closed mode needs admin (pmset). By default macOS shows a Touch ID / password
dialog each time. To make it completely silent, install a tightly-scoped sudo rule
that allows only the two pmset disablesleep commands:
sudo bash grant-admin.shsudo bash enable-touchid-sudo.sh- 🔥 Running with the lid closed traps heat — fine for downloads/builds/keeping a connection alive; be cautious with sustained heavy CPU/GPU load.
- 🔋 On battery, a closed-lid session runs until the battery dies. Best plugged in.
- 🏢 On a Jamf/MDM-managed work Mac,
sudomay be restricted, and IT policy syncs can revert/etc/sudoers.d/and/etc/pam.d/changes. If silent mode ever starts prompting again, just re-rungrant-admin.sh. The app itself still works regardless — it falls back to the Touch ID / password dialog.
launchctl bootout "gui/$(id -u)/local.keepawake" 2>/dev/null
rm -f ~/Library/LaunchAgents/local.keepawake.plist
rm -rf ~/Applications/KeepAwake.app
sudo rm -f /etc/sudoers.d/keepawake # if you installed the sudo rulesrc/main.swift— the whole app (AppKit, ~200 lines)build.sh— compiles + bundles into~/Applicationsinstall.sh— build + auto-start setupgrant-admin.sh— scoped passwordless sudo rule forpmsetenable-touchid-sudo.sh— Touch ID for sudo