← back to work
side project · /caffeinate

CaffeinateBar.

A tiny macOS menu bar utility for keeping your Mac awake — only in the way you actually need. Solves the "AI agent is running autonomously but macOS still thinks the system is idle" problem.

open source swift macOS menu bar side project
↗ github ↗ medium ↗ linkedin

One small workflow annoyance.

If you've left a long-running task on your Mac — a regression suite, a build, an AI agent autonomously walking through a flow — you've watched macOS quietly decide the system is idle and put things to sleep. Same for downloads and demos. The built-in caffeinate command works, but it's terminal-only and one-shot.

CaffeinateBar is the menu bar shim. Click. Pick a mode. Done.

Four modes for four use cases.

display
Screen stays on
For demos and presentations where the screen must not dim.
system
Mac stays awake, screen can sleep
For long-running tasks, builds, downloads. Save power; keep working.
full
Stronger mode for long autonomous runs
For AI agents and long debugging sessions where macOS shouldn't interrupt.
timed
Timed sessions or "until stopped"
"Stay awake for 2 hours" or "stay awake until I tell you to stop." Self-disarming.

Small tool, opinionated UX

Small tools are fun because the scope is tiny but the UX details matter a lot. CaffeinateBar's whole shipment is: which mode am I in? at a glance, from the menu bar. That's it.

Especially relevant when AI agents are asked to run autonomously — macOS still recognizes it as an idle system. CaffeinateBar keeps the session alive through the whole run without manual intervention.

If you build a small utility and want to compare notes — say hi.

When it actually matters.

test runs & builds
Long regression suites or slow CI builds don't need the display on — system mode keeps things running, display sleeps.
demos & presentations
Display mode ensures the screen never dims mid-demo. No "sorry, let me wake that up."
AI agent runs
Agents running autonomously get interrupted when macOS thinks the system is idle. Full mode prevents that for unattended long runs.
downloads & debugging
Timed sessions let you set "stay awake for 2 hours" and forget it. Self-disarming.