Transform your 9-to-5 into 9:30-to-4:30. Arrive 30min later, leave 30min earlier, while getting the same work done because Claude Code stays powered in your backpack while commuting.
Work smarter, not longer.
Tired of your laptop going to sleep during that perfect coding session because you left your desk 10 minutes? Frustrated when Claude Code disconnects mid-commute because your computer decided it was "idle"?
cc-caffeine is your personal rebellion against screen timeout. It keeps your machine awake so you can:
- 🚇 Code on the RER between Paris and suburbs
- ☕ Sip a latte at Starbucks during 3-hour debugging sessions
- 🚴♂️ Pedal to the coworking space while maintaining your active connection
- 📱 Respond to your girlfriend calls during work hours, without Claude Code interruptions
/plugin marketplace add samber/cc
/plugin install cc-caffeine@sambercc-caffine status:
"I'll never choose between coding and traveling again. With cc-caffeine, I can do both. My laptop will never sleep while I traverse cities in 5G, my Claude Code will stay connected in my backpack, and my productivity will soar. The future of mobile development is here, and it smells like coffee."
Automatic Intelligence: cc-caffeine knows when Claude Code is working and prevents your computer from sleeping. Period.
System Tray Chic: A tiny ☕️ icon in your status bar to know instantly if you're protected.
Perfect Sessions: Multiple simultaneous Claude Code sessions? No problem.
Zero Configuration: Install, run, forget. It's like coffee, but for your computer.
- 3 hours of focus without ever losing your connection
- No more waking your screen every 5 minutes
- Baristas will recognize you as "the developer who never sleeps"
- Your productivity increases proportionally to your caffeine consumption
- Transform your balcony into an outdoor office
- Code from the terrace in fresh air
- No more choosing between "work" and "enjoy the sunshine"
- Your boss will think you're working 24/7 (that's an advantage, right?)
- 🎯 Session-Based Management: Intelligently manages multiple simultaneous Claude Code sessions
- 🔄 Auto-Cleanup: Forget to disable - sessions automatically expire after 15 minutes without tool call or user input
- 🚀 Headless: Just an elegant discreet system tray icon
- ⚡ Native Sleep Prevention: Electron's power management - cross-platform sleep prevention
- 🍎 Cross-Platform: Works on macOS, Linux, and Windows (yes, even Windows!)
Hooks will be configured automatically if you import the project as a Claude Code plugin.
Otherwise, configure your Claude Code hooks for a seamless experience:
{
"UserPromptSubmit": [
{
"hooks": [
{
"type": "command",
"command": "npx cc-caffeine caffeinate"
}
]
}
],
"PreToolUse": [
{
"hooks": [
{
"type": "command",
"command": "npx cc-caffeine caffeinate"
}
]
}
],
"PostToolUse": [
{
"hooks": [
{
"type": "command",
"command": "npx cc-caffeine caffeinate"
}
]
}
],
"Notification": [
{
"hooks": [
{
"type": "command",
"command": "npx cc-caffeine uncaffeinate"
}
]
}
],
"Stop": [
{
"hooks": [
{
"type": "command",
"command": "npx cc-caffeine uncaffeinate"
}
]
}
],
"SessionEnd": [
{
"hooks": [
{
"type": "command",
"command": "npx cc-caffeine uncaffeinate"
}
]
}
]
}cc-caffeine uses an intelligent client-server approach:
- Lightweight Client (
caffeinate/uncaffeinate) - No Electron loading, just fast JSON writes - System Server (
server) - Headless Electron app that monitors sessions and manages power - Communication - JSON file with atomic locking for perfect coordination
- Node.js >= 14.0.0 (your coffee of choice)
- Electron (included automatically, like sugar in your espresso)
- A burning desire to code everywhere, all the time
# Start server + system tray
# (optional - will be started automatically)
npx cc-caffeine server
claude -p 'Write 10 pages of "lorem ipsum"'
npx cc-caffeine statusManual switch:
# Activate caffeine for your coding session
echo '{"session_id": "session-abcd"}' | npx cc-caffeine caffeinate
# Your session is now protected!
# Claude can keep working while you sip coffee
# When you're done (or after 15 minutes of auto-cleanup)
echo '{"session_id": "session-abcd"}' | npx cc-caffeine uncaffeinate- ⭐️ Star this repo - Your star powers the caffeine engine!
- ☕️ Buy me a coffee - I'll literally use it to build more features while drinking actual coffee
- 🚀 Sponsor the revolution - Help me defeat screen timeouts worldwide!
Every sponsor gets a virtual high-five and the knowledge that somewhere, a developer is "coding" from a ski track because of you. ✨
PS: If you encounter bugs, remember that even the best coffee has some grounds sometimes. But most of the time, it works like thunder. ⚡☕
MIT - Use it, modify it, share it. Like good coffee, it's meant to be shared.