Headless work mode for macOS. One menu bar click, and your Mac goes dark while your work keeps going. Reverses cleanly when you return.
brew tap rasterandstate/tap
brew install --cask halfcafThat installs the menu bar app into /Applications and the
companion CLI onto your PATH.
CLI only:
brew install rasterandstate/tap/halfcafOr grab the latest signed and notarized DMG directly from downloads.halfcaf.app/halfcaf-1.0.0.dmg.
Requires macOS 14 (Sonoma) or later on Apple Silicon.
When you walk away from your Mac:
- Holds a system power assertion so background work keeps running.
- Dims every active display to 0 (the panel goes black; backlight off; auto-brightness can't fight you).
- Mutes audio.
- Optionally enables a Mac-only Focus mode so notifications don't light up the room.
When you come back, every captured value is restored. SIGKILL,
crash, hard reboot, the auto-restore on next launch reverses the
state. The CLI uses IOPMAssertion so the kernel handles the
caffeination side under any termination.
caffeinate, Amphetamine, and Raycast Coffee answer "how long
should I prevent sleep?" None of them answer "the user is absent
but the work is not."
The old workaround was hand-assembled state: caffeinate, plus manually dim brightness to zero, plus DND on, plus mute. Then remember to undo all of it.
Halfcaf collapses that into one declarative command (or one menu bar click) with a clean reverse on exit.
The name is a barista term, half-caffeinated: full system caffeination, but display, audio, and notification stimulation dialed back.
From the menu bar:
- Click the moon icon
- Click Engage
- Walk away
- When you return, hit ⌘⇧⎋ anywhere (works while the screen is dark) or click Disengage
From the terminal:
halfcaf # engage; Ctrl+C to disengage
halfcaf -t 4h # disengage automatically after 4 hours
halfcaf -- ./long-render.sh # disengage when the command exits
halfcaf -w 12345 # disengage when pid 12345 exits
halfcaf --status # show the active sessionHalfcaf does not phone home. It has no telemetry, no analytics,
no crash reporter. It reads your display brightness, audio mute
state, and the name of your current Focus mode at engage time,
writes those values to
~/Library/Application Support/halfcaf/state.json, and uses them
to restore at disengage time. That file never leaves your Mac.
The CLI uses Apple's private DisplayServices framework via
dlopen to read and set brightness on Apple Silicon, since no
public API exists. This is the same path used by BetterDisplay
and MonitorControl.
MIT. Copyright © 2026 Stephen Way / Raster & State.
