Amphetamine
Keep your Mac awake
Install with Homebrew
brew install --cask amphetamine
Amphetamine — Official Website
Quick Take: Amphetamine
Amphetamine remains the best general-purpose keep-awake utility for macOS in August 2026, and it is still free. Triggers, display-sleep control, Power Protect, and Drive Alive cover real workflows from clamshell desks to overnight AI agents. Newer specialist tools exist, but none displace Amphetamine for most Mac users. The only friction is learning multi-condition triggers; once configured, it disappears into the background.
Best For
- •Anyone who needs their Mac awake during long tasks
- •Clamshell desk setups and media servers
- •Developers running overnight builds or AI coding agents
What is Amphetamine?
Amphetamine is a free keep-awake utility for macOS made by William Gustafson. It prevents your Mac from sleeping, dimming the screen, or starting the screen saver when you need it to stay on. Download a large file overnight? Start an Amphetamine session. Running a presentation? Start a session. Monitoring a long build, or an AI coding agent that must keep working with the lid closed? Start a session.
As of August 2026 the Mac App Store still lists Amphetamine as completely free (no in-app purchases, ads, or tracking). Softonic and third-party catalogs show the current line as version 5.3.2 with updates into early 2026; the developer continues to maintain it as a passion project. The pill-shaped menu bar icon (filled when active, empty when inactive) remains the primary UI. On Apple Silicon and macOS Tahoe 26.x it behaves as a lightweight native utility, no Electron shell, no subscription, no telemetry.
What still separates Amphetamine from the built-in caffeinate command and simpler toggles like KeepingYouAwake is its trigger system. Instead of only flipping sleep on or off, Amphetamine can automatically keep your Mac awake based on conditions: when a specific app is running, when connected to a particular Wi-Fi network, when an external display is connected, when battery is above a threshold, when a file is being downloaded, when CPU load is high, or based on time schedules. You set up triggers once and forget about them.
In mid-2026 Amphetamine got a second life among AI-agent users. Developers running Claude Code, Cursor agents, or Codex overnight commonly recommend pairing those tools with Amphetamine so lid-closed MacBooks do not sleep mid-task. Community posts on X still call out that caffeinate covers the power assertion, while Amphetamine's value is deciding when to hold that assertion without writing scripts. Newer niche tools such as Adrafinil target agent-only keep-awake; Amphetamine remains the general-purpose default.
Amphetamine also handles edge cases simpler tools miss. It can keep your Mac awake while the display sleeps (useful for media servers and downloads), prevent sleep when the lid is closed with an external display (closed-display / clamshell mode), and protect against accidental sleep during critical operations. Power Protect automatically ends sessions if battery drops below a safe level. Drive Alive periodically touches selected volumes so external drives do not spin down mid-backup. AppleScript support and custom menu bar icons remain available for power users.
Mac Sleep Prevention in the Agent Era
Why keep-awake tools matter more on modern MacBooks and how Amphetamine fits.
History & Background
Classic Caffeine (Lighthead Software) popularized one-click sleep prevention around 2006. After it stalled, KeepingYouAwake became the open-source toggle. Amphetamine launched in 2014 with triggers, display-sleep control, and Power Protect, and by the mid-2020s it was the community default. Apple's 2021 naming scare briefly threatened App Store availability; community support kept the brand.
How It Works
macOS prevents idle sleep via IOPM power assertions (for example kIOPMAssertionTypeNoIdleSleep and NoDisplaySleep). Tools must hold assertions continuously; if the process dies, sleep returns. Amphetamine manages those assertions while polling battery, displays, networks, and running apps to decide when to hold or release them. Drive Alive uses periodic writes so disks do not spindown mid-job.
Ecosystem & Integrations
In 2026 the category includes caffeinate (scripts), KeepingYouAwake (simple GUI), Lungo (paid mid-tier), Amphetamine (free full-featured), and agent-aware newcomers such as Adrafinil. For always-on Mac minis, launchd remains the most "sysadmin" approach; Amphetamine is the accessible GUI equivalent for laptops and hybrid desks.
Future Development
The app's feature surface is mature. Continuity focuses on macOS compatibility (including Tahoe), Shortcuts/AppleScript integration, and optional Enhancer helpers for sandbox limits. Expect maintenance releases rather than a monetized rewrite.
Key Features
Session Types
Amphetamine supports timed sessions (keep awake for 30 minutes, 2 hours, or a custom duration), indefinite sessions (stay awake until you end them), and triggered sessions (activate automatically from conditions). You can also end a session when a specific app quits, start a session while Handbrake encodes or while an agent CLI runs, and it ends when that process finishes. During a session you choose whether to prevent system sleep, display sleep, screen saver activation, lid-closed sleep, automatic cursor movement, or screen locking. The menu bar pill shows active vs inactive state at a glance.
Custom Triggers
Triggers are conditions that start or end sessions without manual clicks. Available conditions include: a specific app is running (or frontmost), external display connected or mirrored, USB or Bluetooth device connected, battery charging and/or above a threshold, power adapter connected or disconnected, specific Wi-Fi network, IP address or DNS configuration, Cisco AnyConnect VPN, headphones/audio output in use, specific drive mounted, CPU utilization above a threshold, and idle-time schedules. Triggers can combine conditions with AND/OR logic, for example keep awake on Office Wi-Fi with an external display only on weekdays 9-18.
Allow Display Sleep
Most keep-awake tools prevent both system sleep and display sleep. Amphetamine lets the display sleep while the system keeps running. That matters for overnight downloads, Time Machine backups, torrent seeding, Plex/Jellyfin hosts, and long AI agent jobs: the panel turns off to save energy and reduce OLED burn-in risk, while the Mac stays fully operational on network and disk.
Closed-Display Mode
MacBooks normally sleep when you close the lid. Amphetamine can keep the system running with the lid closed when an external display, keyboard, and mouse/trackpad meet Apple's closed-clamshell requirements. Desk setups that park a MacBook in a vertical dock rely on this. In 2026 many remote workers also use it so coding agents keep running while the laptop is closed in a bag next to a power bank, still pair with Power Protect on battery.
Power Protect
An indefinite session on battery can drain a MacBook to zero. Power Protect monitors battery during sessions and automatically ends the session (allowing sleep) when charge drops below a configurable threshold (commonly around 10%). You can warn before ending so you have time to plug in or save work. For agent-driven overnight jobs on battery, timed sessions plus Power Protect are the safe default.
Drive Alive and Automation Hooks
Drive Alive periodically writes a tiny file to selected volumes so external drives do not spin down or eject during long transfers and backups. AppleScript support lets Shortcuts and shell workflows start, end, or query sessions. Hot keys toggle sessions and display-sleep policy without opening the menu. Optional Amphetamine Enhancer (separate GitHub helper) expands process monitoring beyond App Store sandbox limits for daemon-style tools.
Who Should Use Amphetamine?
1Developer Running Long Builds or Agents
A developer kicks off a 45-minute test suite or leaves Claude Code / Cursor / Codex working for hours. They set a timed Amphetamine session, or a trigger that activates while Terminal, iTerm, or the agent app is running, so the Mac never sleeps mid-compile. Power Protect ends the session before battery death if they leave on battery. On X in 2026 this is one of the most common Amphetamine recommendations for AI agent workflows.
2Home Office With Desk Setup
An employee uses a MacBook Pro with a Thunderbolt dock, ultrawide monitor, and mechanical keyboard. The MacBook sits lid-closed in a vertical stand. Amphetamine's external-display trigger keeps the system awake in clamshell mode while allowing display sleep after idle. Launch at Login ensures the trigger is active after reboot.
3Media Server Operator
Someone runs Plex or Jellyfin on a Mac mini as a home media server. An Amphetamine trigger keeps the system awake 24/7 while allowing any attached display to sleep. Drive Alive keeps external media drives mounted. After a power blip, Launch at Login plus auto-triggers resume the keep-awake policy without manual clicks.
How to Install Amphetamine on Mac
Amphetamine is available from the Mac App Store or via Homebrew. It requires macOS 10.11 or later; modern Apple Silicon and Intel Macs on Sequoia through Tahoe are supported.
Install via Homebrew or Mac App Store
Run brew install --cask amphetamine, or search for Amphetamine in the Mac App Store and install the free app from William Gustafson.
Launch and Configure
Open Amphetamine. The pill icon appears in the menu bar. Click to start a quick session, or use the full menu for timed, indefinite, or triggered sessions.
Set Up Triggers
Open Preferences → Triggers. Start with common scenarios: external display connected for desk mode, or specific app running for long builds and AI agents.
Enable Launch at Login
Preferences → General → Launch at Login. Triggers only fire while Amphetamine is running, so login launch is essential for desk and server use.
Pro Tips
- • Configure a keyboard shortcut for session toggle so you never need the mouse mid-presentation.
- • Right-click the menu bar icon for the full session menu; left-click usually toggles the default session type.
- • Amphetamine coexists with the built-in
caffeinatecommand, use caffeinate in scripts and Amphetamine for interactive desktop control.
Configuration Tips
Create a Desk Mode Trigger
New Trigger → Condition: External Display Connected (optionally AND Power Adapter Connected). Allow Display Sleep after 15 minutes. This keeps clamshell desks awake without leaving the panel on all day.
Agent and Build Triggers
New Trigger → App Running for Terminal, iTerm, Cursor, or your agent CLI wrapper. Session starts when the app launches and ends when it quits, so overnight agent runs do not require remembering to toggle keep-awake.
Alternatives to Amphetamine
Several utilities prevent Mac sleep, from one-click toggles to agent-aware helpers.
KeepingYouAwake
Open-source spiritual successor to classic Caffeine. Simple menu bar toggle with optional duration, no rich triggers or Power Protect. Prefer it when you only need manual on/off; prefer Amphetamine when you want automation.
caffeinate (built-in)
macOS ships caffeinate for scripts and CI. Example: caffeinate -dims -t 3600. Perfect for shell automation; Amphetamine wraps the same power assertions with a GUI, persistence, and conditional triggers.
Lungo
Paid keep-awake utility with a polished UI and lighter trigger set. Amphetamine is free and more feature-complete for most people; Lungo mainly wins on aesthetics for users who prefer a paid indie feel.
Adrafinil
Newer 2026 native helper aimed at AI agents, keeps the Mac awake only while tools like Claude, Cursor, or Cline are working. Narrower scope than Amphetamine's general triggers, but a useful specialist if agents are your only use case.
Pricing
Amphetamine is completely free on the Mac App Store as of August 2026. No in-app purchases, premium tier, subscription, ads, or tracking. The developer accepts optional donations via the project site, but the full feature set, including triggers, Power Protect, Drive Alive, and closed-display mode, is available to everyone at no cost.
Pros
- ✓Completely free with no ads, IAPs, or telemetry
- ✓Trigger system automates keep-awake based on apps, displays, networks, battery, and schedules
- ✓Allow Display Sleep saves energy during overnight and agent tasks
- ✓Power Protect prevents battery drain to unsafe levels
- ✓Drive Alive keeps external volumes mounted during long operations
- ✓Native menu bar utility that remains reliable on Apple Silicon and macOS Tahoe
- ✓Community default for lid-closed AI agent and long-build workflows in 2026
Cons
- ✗macOS only, no Windows or Linux version
- ✗Complex multi-condition triggers have a learning curve
- ✗The name still confuses newcomers and once drew App Store policy scrutiny (resolved years ago)
- ✗Menu bar pill is subtle, easy to forget a session is active unless you enable time-remaining display
- ✗Requires Launch at Login for unattended triggers after reboot
Community & Support
Amphetamine has a long-running presence on the Mac App Store with strong user ratings and a dedicated site maintained by William Gustafson (documentation, FAQs, support). Reddit's r/macapps and r/mac still treat it as the default keep-awake recommendation. In 2026 X threads about Claude Code, Codex, and lid-closed MacBooks routinely name Amphetamine as the free fix. The developer is known for responsive support and continued free updates rather than monetization pivots.
Video Tutorials
Getting Started with Amphetamine
More Tutorials
How to keep your Mac awake 🚀 #shorts
9to5Mac • 22.0K views
How to keep your Mac awake all the time ? #short #mactips
Minimal Nerd • 5.7K views
Stay Awake, Stay Productive: Unlock the Power of Amphetamine for macOS!
How To Make • 826 views
Frequently Asked Questions about Amphetamine
About the Author
Productivity & Workflow Analyst
Expert Tips for Amphetamine
On X, Amphetamine is repeatedly recommended alongside Claude Code, Cursor, and Codex so overnight agent jobs survive lid close, use case that barely existed when classic Caffeine was popular.
Technical users note that caffeinate already creates the IOPM assertion; Amphetamine's real product is conditional triggers and session policy, not a novel kernel trick.
For unattended desk docks, combine External Display + Power Adapter triggers with Power Protect so clamshell mode never drains a battery laptop overnight.
Related Technologies & Concepts
Related Topics
Sources & References
Fact-CheckedLast verified: Aug 9, 2026
Key Verified Facts
- Amphetamine is free on the Mac App Store with no IAPs, ads, or tracking.[cite-1]
- Third-party catalogs list Amphetamine around version 5.3.2 with updates into 2026.[cite-2]
- Mac users in 2026 still recommend Amphetamine to keep machines awake during AI agent and long-running tasks, including lid-closed use.[cite-6, cite-7]
- 1Amphetamine on the Mac App Store
Accessed Aug 9, 2026
- 2Amphetamine for Mac, Softonic listing (version notes)
Accessed Aug 9, 2026
- 3Save Amphetamine, developer context and history
Accessed Aug 9, 2026
- 4Business Insider, Apple keeps Amphetamine in the App Store
Accessed Aug 9, 2026
- 5William Gustafson developer page on the App Store
Accessed Aug 9, 2026
- 6X, Amphetamine free keep-awake recommendation (Aug 2026)
Accessed Aug 9, 2026
- 7X, Amphetamine with Codex for lid-closed Mac
Accessed Aug 9, 2026
Research queries: Amphetamine Mac keep awake 2026; Amphetamine App Store free; Amphetamine Claude Code Codex