npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

cc-caffeine

v0.3.0

Published

Prevents your computer from sleeping while Claude Code works hard

Downloads

236

Readme

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:

  1. Lightweight Client (caffeinate/uncaffeinate) - No Electron loading, just fast JSON writes
  2. System Server (server) - Headless Electron app that monitors sessions and manages power
  3. 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

Manual 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

💫 Fuel the Revolution

  • ⭐️ 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!

💖 GitHub Sponsors

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. ⚡☕

📄 License

MIT - Use it, modify it, share it. Like good coffee, it's meant to be shared.