| name | caffeine |
| description | Prevents macOS sleep using caffeinate/pmset and Caffeine.app. |
Caffeine Skill
Prevent Mac from sleeping via CLI or GUI.
Quick Reference
CLI Commands (built-in caffeinate)
caffeinate -i &
caffeinate -s &
caffeinate -d &
caffeinate -dims &
caffeinate -t 3600
caffeinate -w <pid>
pkill caffeinate
Check Status
pmset -g assertions
pmset -g
pgrep -l caffeinate
GUI App
Caffeine.app installed at /Applications/Caffeine.app
- Click coffee cup in menubar to toggle
- Filled cup = active (preventing sleep)
- Empty cup = inactive
Permanent Settings (requires sudo)
sudo pmset -c sleep 0
sudo pmset -c displaysleep 0
sudo pmset -c sleep 10
sudo pmset -c displaysleep 10
Usage Examples
Keep awake indefinitely for voice server:
caffeinate -dims &
Keep awake for 8 hours:
caffeinate -dims -t 28800 &
Check if already caffeinated:
pgrep caffeinate && echo "Caffeinated ☕" || echo "Not caffeinated 😴"
Notes
caffeinate and Caffeine.app work independently
- System already configured with
sleep 0 (never sleeps)
- Display sleep was 180min, now set to 0 (never)
- For voice/server use: system sleep prevention is most important