Keepresso
Keepresso
Using Keepresso

Keep your Mac awake during long builds and compiles

Updated Jul 14, 2026 3 min

A long Xcode archive, a cargo build --release, a Gradle or npm install, or a local CI run is the classic moment macOS decides the machine is idle. The screen dims, the system sleeps, and the build stalls or dies. Keepresso keeps the Mac awake for the job, then lets it rest when the work is done.

Pick the approach that matches the job

1. Timed session (simplest)

If you know the build usually finishes within a window:

  1. Click the Keepresso cup in the menu bar.
  2. Pick a duration (1 hour, 4 hours, custom, or Until a Time).
  3. Start keep-awake and start the build.

When the timer ends, Keepresso stops holding the system awake. Details: timed sessions.

2. Process trigger (hands off)

Stay awake only while the build tool is actually running:

  1. Open Preferences → Triggers.
  2. Turn trigger gating on.
  3. Add a Process running condition and match the command, for example xcodebuild, swift, cargo, rustc, gradle, java, node, npm, pnpm, make, ninja, or cmake.
  4. Combine with any if you use more than one tool.

When the process exits, Keepresso drops the session (after any grace period you set) and the Mac can sleep again. See smart triggers.

3. CPU-load trigger (tool-agnostic)

If the tool name changes but the machine is clearly working:

  1. Add a CPU above a threshold condition (50% or 75% is a good starting point).
  2. Keep the smoothing: a brief spike will not open a session; sustained load will.

This is ideal for mixed toolchains or IDE builds that spawn different child processes under different names.

4. Media Render / AI Agent presets

Built-in presets cover common long jobs:

  • Media Render holds while ffmpeg runs.
  • AI Agent holds while claude, codex, or grok is running (overnight agent work on a laptop).

Apply a preset from the condition menu; it replaces the current rule set and turns triggers on.

Optional: screen off, lid closed

Builds do not need a lit panel.

  • Turn off prevent display sleep if you only care about the system staying up. Guide: Keep the Mac awake with the screen off.
  • On a MacBook, enable closed-display mode so the machine keeps compiling in a bag or on a shelf, with the internal panel put to sleep when the lid closes. Guide: Lid closed.

Battery safety

On a laptop, pair keep-awake with battery auto-pause so a forgotten session does not drain the pack. Set a floor (for example 20%) under Preferences; Keepresso pauses when charge drops below it. More: Keep awake while charging.

Scripts and CI machines

For headless build machines or scripted pipelines:

# Hold the Mac awake while a command runs (app not required for this mode)
keepresso -dims -- your-build-command

# Or drive the running app
keepresso start --duration 120
keepresso stop

Install and PATH notes: keepresso CLI. On a Mac mini used only for builds, also run the Headless Setup checklist so login and sleep policies match an always-on machine.

Get Keepresso

Free and open source, for macOS 14 and newer. Install it and keep your Mac awake on your terms.