Macaffeine

Keep your Mac awake while you're away.

A tiny, native menu bar app for long builds, deploys, AI agents and downloads. One click and your Mac stays awake. Come back, click again, and it sleeps like it normally does.

Free and open source · macOS 13 or later · Apple silicon and Intel · about 1 MB

The whole app lives in this menu.

Small app, the right details

No Electron. No background service. No account. No bullshit.

One click or one shortcut

Toggle from the menu bar or press ⌃⌥⌘K from anywhere. The shortcut is yours to change.

Timers that don't lie

Indefinitely, for 5 minutes to 5 hours, your own presets or until a time of day. Always right, even after sleep.

Your display can still sleep

Only idle system sleep is blocked. Turn on Keep Display On when you need the screen too.

Safe to walk away from

Stops by itself on low battery, in Low Power Mode, when the Mac gets too hot or after you put it to sleep.

Knows what else is going on

See which other apps keep your Mac awake and for how long — like a caffeinate forgotten in a Terminal tab.

Native and private

Swift, AppKit and SwiftUI. Sandboxed, zero dependencies, no network access, nothing collected.

Made for long jobs

Wrap any command and your Mac stays awake exactly as long as it runs — even if it's interrupted or crashes.

  • A macaffeine command line tool
  • Ready-made hooks for Claude Code, and macaffeine run for Codex, Gemini or anything else
  • A macaffeine:// URL scheme for scripts, Raycast and Alfred
  • Shortcuts actions: keep awake, allow sleep, check status

Everything is described in the automation guide.

# awake while the build runs
macaffeine run -- make release

# or for a while
macaffeine on 2h
macaffeine on --until 18:30
macaffeine off

Settings that stay out of the way

Launch at login, your own durations, safety rules and the shortcut — all in one small window.

General settings: launch at login, keep display on, menu bar countdown, shortcut, notifications and command line tool
General
Duration presets from 5 minutes to 5 hours, with add and remove
Durations
Safety settings: battery level, Low Power Mode, overheating, sleep and screen lock
Safety

Speaks your language

Macaffeine follows your system language.

English Deutsch 한국어 简体中文 ไทย العربية Русский

Questions

Does it keep my Mac awake with the lid closed?

Only the way macOS allows it: with power and an external display connected, the Mac keeps running with the lid closed. On its own, closing the lid always puts a Mac to sleep. Forcing that needs admin rights and can overheat a Mac in a bag, so Macaffeine doesn't do it.

How is it different from caffeinate?

It uses the same power assertions macOS offers, but you get a menu, timers, safety rules and a clear status instead of a Terminal tab to remember. If Macaffeine quits or crashes, macOS releases its assertion right away.

Does it collect any data?

No. There's no network code at all, and the app runs in Apple's sandbox. Settings stay on your Mac.

Is it really free?

Yes. Macaffeine is open source under the MIT license. The builds are signed with a Developer ID and notarized by Apple.

Which Macs does it run on?

Any Mac with macOS 13 Ventura or later, natively on both Apple silicon and Intel.

Get Macaffeine

Download, drag the cup into Applications, and it's in your menu bar.