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

opencode-sleep-inhibit

v2.0.1

Published

Prevent Linux sleep while OpenCode agents are working.

Readme

opencode-sleep-inhibit

Prevent suspend and hibernation while OpenCode agents are working on Linux.

Long-running agents should not be interrupted because your laptop suspends. This plugin prevents sleep while OpenCode is busy, then restores normal power management when the work finishes.

It also covers subagents, retries, tool approvals, permissions, and questions waiting for your response.

Install

You need Linux with systemd and OpenCode 2.0.14 or newer. Add the package to your project or global OpenCode configuration:

{
  "$schema": "https://opencode.ai/config.json",
  "plugins": [
    {
      "package": "opencode-sleep-inhibit",
      "options": { "mode": "sleep", "cooldownMinutes": 0 }
    }
  ]
}

OpenCode installs and caches published packages automatically. Until the v2 release is published, use the path to a built checkout as package instead.

Choose a Mode

Allow locking (recommended)

"sleep" prevents suspend and hibernation while still allowing your screen to turn off and lock normally.

{ "mode": "sleep" }

Keep the screen awake

"sleep-and-idle" also asks your desktop to keep the screen on and unlocked. Only use this when leaving the computer unlocked is acceptable.

{ "mode": "sleep-and-idle" }

Support for idle inhibition depends on your desktop environment.

Keep It Awake After Work

By default, the inhibitor is released as soon as all agent work becomes idle. Set cooldownMinutes to keep the computer awake for a follow-up window:

{ "mode": "sleep", "cooldownMinutes": 60 }

New work during the cooldown cancels the pending release. The cooldown starts again when all work becomes idle. Keep the default value of 0 to release the inhibitor immediately.

Check It

While OpenCode is working, run:

systemd-inhibit --list

An OpenCode entry should appear while work is active and disappear after it finishes (or after the configured cooldown).

Development

bun install --frozen-lockfile
bun run check
bun run test
npm pack --dry-run

License

MIT