A native macOS menu bar app that keeps your Mac awake, restores normal sleep on a schedule, and safely falls back when your Mac switches to battery power.
Mac Coffee is a lightweight native utility for macOS that lets you switch between a "keep awake" mode and the system's normal sleep behavior without touching Terminal. It is built for the everyday cases where you want a simple menu bar toggle, but still want sensible guardrails like timed recovery, a battery safety switch, and login startup support.
- Native menu bar experience with a compact status area and clean context menu
- Toggle between keep-awake mode and normal sleep in one click
- Restore normal sleep after a preset duration or at a chosen date and time
- Optionally restore sleep immediately when the Mac starts running on battery
- Login-at-startup toggle
- One-time privileged helper installation so future toggles do not keep prompting for a password
- Download
MacCoffee.dmgfrom the latest GitHub release. - Open the DMG.
- Drag
Mac Coffee.appintoApplications. - Launch
Mac Coffee.appfromApplications.
If macOS says the app is "damaged" or cannot be opened, that is usually Gatekeeper blocking an unsigned build. You can remove the quarantine flag and try again:
sudo xattr -rd com.apple.quarantine /Applications/"Mac Coffee.app"You can also open System Settings > Privacy & Security, then allow the blocked app and relaunch it.
Requirements:
- macOS 13 or later
- Xcode Command Line Tools (
xcode-select --install) - Administrator approval on first use to install the helper
cd /Users/elliotwu/MacCoffee
chmod +x build.sh install.sh package_dmg.sh
./build.sh
./install.shTo build a DMG locally:
./package_dmg.sh
open dist/MacCoffee.dmgMac Coffee lives in the menu bar and is designed to stay out of the way:
- Turn keep-awake mode on when you need your Mac to stay active
- Choose a timer or a specific date and time to return to normal sleep
- Enable battery protection if you want Mac Coffee to immediately restore sleep when AC power is removed
- Enable launch at login if you want the utility available after every boot
On the first toggle, macOS will ask for administrator approval to install the helper. Once installed, later toggles should work without repeated password prompts unless the helper is removed.
This repository includes a GitHub Actions workflow that automatically builds the app and uploads MacCoffee.dmg whenever a tag like v1.0.1 is pushed.
Issues, ideas, and pull requests are all welcome. Please check docs/CONTRIBUTING.md if you want to contribute.
Mac Coffee is provided as is without warranty. If you discover a security issue, please follow the process described in docs/SECURITY.md.
This project is released under the MIT License.
- dec0dOS/amazing-github-template
- Apple's macOS developer tools and system frameworks
- Thanks to the Linux.do community for feedback, discussion, and early support
