Vibe Caffeine keeps your Mac awake while AI coding tools (Claude Code, Codex, OpenCode) are working. No more interrupted tasks due to system sleep.
The app runs in your menu bar with a simple icon:
| Icon | Meaning |
|---|---|
| 🍵 | idle — No AI tools are working, Mac can sleep |
| ☕️ | active — AI tool is working, sleep prevented |
| 🔒 | manual — Manually force Mac awake |
Left-click the icon to switch between Auto and Manual modes.
brew install jjyr/tap/vibe-caffeineDownload the latest release from GitHub Releases, unzip, and move Vibe Caffeine.app to /Applications.
- Left-click — Toggle between Auto and Manual modes
- Right-click — Open menu with status info, Launch at Login toggle, and Quit option
- macOS 13.0+
- Swift 5.9+
- Xcode Command Line Tools
# Debug build
make build
# Release build (creates .app bundle)
make release
# Run debug executable
make run
# Run the .app bundle
make run-app
# Install to /Applications
make install
# Clean build artifacts
make cleanSources/VibeCaffeine/
├── App/
│ └── AppDelegate.swift # Application lifecycle
├── Features/
│ ├── FileMonitoring/
│ │ ├── FileMonitor.swift # FSEvents directory watching
│ │ └── AIToolDetector.swift # Monitored paths configuration
│ ├── MenuBar/
│ │ └── MenuBarManager.swift # Menu bar UI and interactions
│ └── SleepPrevention/
│ └── SleepManager.swift # IOKit sleep assertion control
└── State/
└── AppState.swift # Central state machine
- Sleep Prevention: Uses IOKit's
IOPMAssertionCreateWithNamewithkIOPMAssertionTypeNoDisplaySleep - File Monitoring: CoreServices FSEventStream with 1-second latency
- Zero Dependencies: Pure Swift using only system frameworks (IOKit, AppKit)
- Background App: Runs as a menu bar-only app without a Dock icon