Comparison
AwakeTab vs caffeinate
If the job runs in Terminal, such as a build, a script or an AI agent, use caffeinate: it is built into macOS, holds the Mac awake whatever window is in front, and lets go when the command exits. If you want a button, a session that ends at a set time, or a status you can read at a glance, AwakeTab does that from a visible browser tab.
On this page
Side by side
Both hold a power assertion, a note to macOS that says “don’t sleep yet”. caffeinate creates one from Terminal; Chrome creates the same kind while a visible page keeps the screen on. The difference is what ends it: a command or Control-C for caffeinate, the tab’s visibility and your chosen time for AwakeTab. Rows marked Same are real ties.
-i stops idle sleep, -di also keeps the display on caffeinate -i When caffeinate is the better choice
It is the operating system’s own tool, and for these jobs it is the simplest fix.
- The job is a command in Terminal Put it in front of the command:
caffeinate -i npm run buildorcaffeinate -i claude. The Mac stays awake until the command exits, then lets go by itself. - You want the Mac awake with the screen off
caffeinate -iholds off idle sleep and lets the display turn off. A wake lock always keeps the display lit. - You work full screen in other apps caffeinate works whatever window is in front. A browser tab loses its lock the moment you switch away.
When AwakeTab is the better choice
These are the jobs AwakeTab was built for.
- You'd rather press a button No Terminal and no flags. Open the page, pick a length and press Start.
- You want it to end at a time Pick 30 min, 1 h or a clock time such as 11:30 AM. Hidden time doesn't count toward a timed session.
- You want to see that it's working The pill turns to "Screen awake" once your browser has granted the lock, not when you press the button.
- You are not on a Mac AwakeTab works in Chrome and Edge on Windows, in Chrome on Android, and in Safari 16.4 or later on iPhone and iPad.
- You want a hidden tab to count On desktop Chrome or Edge, AwakeTab for Chrome uses Chrome's own power setting, so it keeps working with the tab hidden.
Neither one keeps a closed MacBook awake
Closing the lid is a direct request to sleep, not idle time, so caffeinate with its usual options, the browser and AwakeTab for Chrome all stop there. The exception is clamshell mode, with power and an external display: see keeping a Mac awake with the lid closed.
Check which one is holding your Mac awake
Run pmset -g assertions in Terminal. It lists every process asking macOS not to sleep. caffeinate -i shows up as PreventUserIdleSystemSleep. With AwakeTab showing “Screen awake” in Chrome, the browser holds a PreventUserIdleDisplaySleep or NoDisplaySleep entry. Hide the tab, run it again, and the browser’s line is gone.
Try it
Start a session, switch tabs, then come back and watch the pill.
Questions
What is the difference between caffeinate -i and caffeinate -di?
caffeinate -i keeps the Mac awake and lets the screen turn off. caffeinate -di also stops display sleep, so the screen stays lit until you press Control-C. Either one can wrap a command, such as caffeinate -di codex.
Does caffeinate keep a MacBook awake with the lid closed?
Not with its usual options. Closing the lid is not idle time, so the Mac sleeps anyway unless it is in clamshell mode with power and an external display.
Can I run caffeinate and AwakeTab at the same time?
Yes. Each one makes its own request, and the Mac stays awake while either stands. If the Mac still won't sleep after AwakeTab stops, check for a Terminal window still running caffeinate.