Skip to content

All projects

macOS / CLI

tea

Keep a Mac awake — lid closed, on battery or AC, with no terminal left open — then restore exactly the sleep setting it changed.

tea 0.6.0 is an MIT 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

Why the name: tea, as opposed to caffeinate’s caffeine. It was 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 · MIT

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.