cc-caffeine โโก
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.
๐ The Modern Developer's Freedom
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
๐ฏ Installation
/plugin marketplace add samber/cc
/plugin install cc-caffeine@samber
cc-caffine status:
- Claude Code is idle
- Claude Code is working hard
๐ The Nomad Developer Manifesto
"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."
โจ Why It's Pure Magic
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.
๐ฏ Use Cases That Will Change Your Life
โ The Coffee Shop Marathon
- 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
๐ Flexible Remote Work
- 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?)
๐ ๏ธ Technical Features (With Style)
- ๐ฏ 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!)
๐ญ Claude Code Integration
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"
}
]
}
]
}
๐ก The Secret Sauce
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
๐ Requirements
- 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
๐ Run without Claude Code
# Start server + system tray
# (optional - will be started automatically)
npx cc-caffeine server
claude -p 'Write 10 pages of "lorem ipsum"'
npx cc-caffeine status