v1.0.3 display-sleep on lock Halfcaf

Walk away.
Keep working.

Halfcaf goes dark, mutes, and stays awake while your Mac runs the build, the render, or the agent loop you started.

  • Free
  • MIT
  • No account
  • No telemetry
  • Apple Silicon ¡ macOS 14+

02 Terminal

From the terminal

Wrap a build. Halfcaf engages while it runs and disengages when it exits.

dexter — zsh — 80×24
dexter@mac ~/proj $

03 Install

One command. Two binaries.

brew tap rasterandstate/tap
brew install --cask halfcaf

Drops Halfcaf.app into /Applications and the companion halfcaf CLI onto your PATH in one step.

Direct download: halfcaf-1.0.3.dmg (signed, notarized, stapled).

04 CLI

Wrap a long-running command

Halfcaf is a real CLI, not a button. Wrap your overnight Claude Code session, your Cursor agent run, your cargo build --release, your Final Cut export. Halfcaf engages on launch, disengages when the command exits.

# run a build, dim everything, restore on exit
halfcaf -- ./bin/run-overnight-job

# wrap an agent loop you started in another tab
halfcaf -w $(pgrep -f 'claude code')

# scheduled disengage
halfcaf -t 4h

# blind disengage from anywhere: ⌘⇧⎋

05 Inside

How it works

Four small Mac APIs, one declarative command.

  • Stays awake.

    Holds an IOPMAssertion so background work keeps running whether the lid is open or shut.

  • Goes dark.

    Every active display drops to 0 via DisplayServices. Auto-brightness can't fight you.

  • Goes silent.

    Audio output muted; prior volume + mute state captured for restore.

  • Optional Do Not Disturb.

    Toggle a Mac-only Focus mode so notifications don't light up the room.

On exit (Ctrl+C, timeout, watched process or command finished, signal, hotkey) every value is restored. Crash-safe via an atomic state file; SIGKILL or a hard reboot can't leave your display stuck at 0.

  • Apple Siliconarm64 native, M-series
  • macOS 14+Sonoma, Sequoia, Tahoe
  • One binary~270 KB CLI, no runtime

06 Privacy

Local by default.

Halfcaf doesn't phone home. No telemetry, no analytics, no crash reporter. State is captured to a JSON file under ~/Library/Application Support/halfcaf/ at engage time and reversed at disengage. 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 BetterDisplay and MonitorControl take.