tea
Keep a Mac awake. Restore it when you're done.
brew install soundadam/tap/tea
tea
That's the client. It stays open. Keep the Mac awake — including with the lid
closed — then restore the exact sleep setting it owned.
Need a script instead?
tea on
tea shutdown after 2h
tea off
Why not caffeinate
caffeinate keeps a Mac awake only while its own process runs: close the
terminal or lose the SSH session and the Mac can sleep, and closing a
MacBook's lid still sleeps it. tea sets the system disablesleep value
instead, so the Mac stays up with the lid closed, on battery or AC, with
nothing left running. It records the previous value first, and tea off
restores that value and nothing else. It can also schedule one delayed
shutdown and cancel exactly that one.
The name: tea, as opposed to caffeinate's caffeine. It was called teaway
up to 0.4.2. homebrew-core's tea is the unrelated Gitea CLI, so always install
with the full name soundadam/tap/tea.
macOS 13+. Don't close a MacBook in a bag.
Product · Docs · Changelog · Contributing · Security