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

pi-insomnia

v0.1.1

Published

Prevent macOS idle sleep while Pi agents are working.

Readme

pi-insomnia

A source-distributed Pi package that prevents macOS idle sleep while the Pi agent is working.

[!WARNING] Pi packages can execute arbitrary code through extensions. Review package source before installing any third-party Pi package.

Features

  • Automatically starts a macOS sleep assertion when a Pi agent run starts.
  • Automatically releases the assertion when the agent run ends.
  • Cleans up on Pi session shutdown, reloads, and quits.
  • Uses the macOS built-in /usr/bin/caffeinate command; no third-party runtime dependency is required.
  • Shows a small ☕ sleep inhibited footer status while active in UI modes.
  • No slash commands, tools, or manual activation needed.

Platform support

pi-insomnia currently targets macOS. On non-macOS platforms it silently no-ops.

On macOS, the extension launches:

/usr/bin/caffeinate -i -w <pi-pid>

-i prevents idle system sleep while the process is running. -w <pi-pid> also ties the assertion to the Pi process so the helper exits if Pi exits unexpectedly. The extension still explicitly terminates the helper when the agent becomes idle.

Installation

Install from npm:

pi install npm:pi-insomnia

Install project-locally with Pi's -l flag:

pi install -l npm:pi-insomnia

During local development from this monorepo:

pi install /path/to/pi-mono/packages/pi-insomnia

For a one-off test run without installing:

pi -e /path/to/pi-mono/packages/pi-insomnia --print "explain what this package does"

This is an npm-compatible TypeScript Pi package. There is no runtime build step.

Configuration

| Variable | Purpose | |---|---| | PI_OFFLINE=1 | Disables install/update telemetry. | | PI_TELEMETRY=0 | Disables install/update telemetry. |

pi-insomnia has no behavior configuration. If the package is installed and Pi is running on macOS, sleep inhibition is automatic while the agent is working.

Notes

  • The extension inhibits idle system sleep, not display sleep. It does not use caffeinate -d.
  • The extension does not request elevated privileges.
  • On startup, Pi Insomnia sends a best-effort install/update telemetry ping once per package version unless Pi telemetry is disabled, offline mode is enabled, or Pi runs in CI.

Development

npm install
npm run check
npm run pack:dry-run