Sleep prevention for humans and AI agents.
tap a command to begin
what is it
A friendlier caffeinate.
latte is a tiny macOS CLI that wraps caffeinate with a clean interface and a live TUI. Use it to keep your machine awake for long builds, agent runs, and lunch breaks. No flags to remember.
how it works
Stateless by design.
Under the hood, latte spawns caffeinate -imsu and lets the system handle everything else. There’s no daemon, no config file, and no PID file. Every command inspects the running process directly.
- -d
- Display sleep
- -i
- Idle sleep
- -m
- Disk sleep
- -s
- System sleep (on AC power)
- -u
- Declares user activity
No config files. No PID files. Just a small wrapper that does one thing well.
That stateless design also makes it perfect for AI agents: every command is idempotent, scriptable, and exits with a clean status code. Built with Bun, Effect, and Ink.
your order
Make it a double.
By default, latte prevents idle and system sleep but leaves your display alone. If you want the screen to stay on too, add the -d flag.
latte on -d # keep the display awake
latte 30m -d # timed, display on
latte on -d --no-system # display on, skip system sleepIn interactive mode, press f to open the flag picker. Toggle any flag with its letter key and confirm with Enter.
to make a flag permanent, add export LATTE_FLAGS="-d" to your shell profile.
install
One line.
curl -fsSL https://raw.githubusercontent.com/Junnyyy/latte/main/install.sh | bashpiping a script into bash is a leap of faith. read it first →
from source →
git clone https://github.com/Junnyyy/latte.git
cd latte
bun install
bun run install:global