Skip to content

All projects

macOS / CLI

tea

Keeps a Mac awake with the lid closed, on battery or AC, with no terminal open. When you stop, it restores the one sleep setting it changed.

tea 0.6.0 is an Apache-2.0 command-line client for macOS 13 or later, released as ad-hoc signed executables for Apple silicon and Intel.

Why not caffeinate

macOS ships caffeinate, and it is the right tool while you sit at the Mac. It holds a sleep assertion only as long as its own process lives: close the terminal or drop the SSH session and the Mac may sleep. And closing a MacBook’s lid still sleeps it. tea switches the system’s disablesleep setting instead, so the Mac stays up with the lid closed and nothing needs to keep running. Before changing it, tea records the old value; off restores that value and nothing else.

Project snapshot

Called teaway up to 0.4.2.

Lid closed

Stays awake, battery or AC


Restore

off puts back the value it saved


1

Scheduled shutdown, cancellable exactly


0.6.0

Current release · Apache-2.0

Use a spare Mac as a server

1/2


A spare MacBook as a build box, a Mac mini at home, or a long render, backup or transfer that should outlive your session. Run tea for the client, or script it with tea on, tea shutdown after 2h and tea off.

What it does not do

2/2


tea owns power state only. It does not set up Remote Login, a VPN, launchd services or the workload itself. A closed MacBook cools worse: keep it on a hard, open surface, never in a bag.