macOS menu bar app that keeps your Mac awake for a set duration. Also available as Raycast script commands.
- macOS 13+
- Xcode Command Line Tools:
xcode-select --install - librsvg (for icon generation):
brew install librsvg - Raycast (optional)
make installBuilds and copies to /Applications/Caffeine.app. Click the cup icon in your menu bar to set a duration.
First install the app, then run:
make raycastThis copies the scripts to ~/Library/Application Support/Caffeine/raycast/, opens that folder in Finder, and launches Raycast. Then:
- In Raycast: Settings → Extensions → + → Add Script Directory
- Select the folder already open in Finder
Three commands will appear immediately:
- Start Caffeine — dropdown to pick duration (30m, 1h, 2h, 4h, indefinitely)
- Stop Caffeine — stop immediately
- Caffeine Status — show remaining time
The scripts share state with the menu bar app via /tmp/caffeine.pid and /tmp/caffeine.state.
make launch-agentRegisters a LaunchAgent so Caffeine starts automatically at login.
| Command | Description |
|---|---|
make install |
Build and install to /Applications |
make uninstall |
Remove app and LaunchAgent |
make raycast |
Open Raycast dialog to add script commands |
make launch-agent |
Register start-at-login LaunchAgent |
make remove-launch-agent |
Remove LaunchAgent |
make clean |
Remove build artifacts |