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

@simon_he/pi

v0.3.1

Published

Project-aware CLI that detects npm, pnpm, yarn, bun, Go, Rust and Python projects, then routes installs, scripts, builds and workspace commands automatically.

Readme

PI

Project-aware command router for package managers, monorepos, and multi-language dev tasks.

PI detects your current project context and runs the right command for npm, pnpm, yarn, bun, Go, Rust, and Python workflows.

Requires Node.js >= 18. Node.js 22+ is recommended for supported LTS runtimes.

npm i -g @simon_he/pi

pi react          # install with the detected package manager
prun dev          # run or fuzzy-select package scripts
pfind build       # find and run scripts inside a workspace

Why

Different projects use different package managers, lockfiles, workspaces, and script layouts. PI gives you one command layer that understands the current project before running commands.

  • Auto-detect npm, pnpm, yarn, and bun
  • Remember package-manager choices per workspace
  • Fuzzy run package scripts
  • Find scripts deeply in monorepos
  • Run Go, Rust, and Python entry files
  • Integrate selected prun / pfind commands with shell history

Core Commands

pi react
pi --choose-tool bun
pi --show-tool

prun dev
prun

pfind build
pfind

| Command | Purpose | | --- | --- | | pi | Install or update dependencies with the package manager for the current project. | | prun | Run package scripts, fuzzy-select scripts, or run language entry files. | | pfind | Find and run scripts across a workspace or monorepo. |

Naming

The package is still published as @simon_he/pi, and pi remains the primary short command. The product positioning is now broader than dependency installation: PI is a project-aware command router.

Compared With ni

ni focuses on using the right JavaScript package manager.

PI goes further as a project command router:

  • remembers ambiguous workspace choices
  • supports fuzzy script selection via prun
  • searches scripts in monorepos via pfind
  • supports Go and Rust build/run workflows
  • supports Python file execution
  • provides optional shell history integration

Supported Projects

| Environment | Support | | --- | --- | | Node.js | npm, pnpm, yarn, bun install/remove/run workflows | | Monorepo | pnpm and yarn workspace script discovery and package-manager selection | | Go | go get, go mod tidy, go run, go mod init, go build, plus go clean for clean tasks. | | Rust | cargo run, cargo init, cargo build, plus cargo install / cargo uninstall for binary crates. | | Python | Python entry file execution through prun / pfind |

Command Reference

| Command | Description | | --- | --- | | pi [pkg] | Install a package, or update dependencies when no package is passed. | | pil [pkg] | Install selected packages at @latest. | | pui [pkg] | Remove dependencies. | | pio [pkg] | Install with the detected package manager and --prefer-offline. | | pix [cmd] | Run npx or bunx depending on the project. | | prun [script] | Run a package script, fuzzy-select one, or run a language entry file. | | pfind [script] | Search workspace packages and run matching scripts. | | pinit | Initialize the current project with the detected tool. | | pbuild | Run go build or cargo build in Go/Rust projects. | | pci [pkg] | Compatibility alias of pi; kept for older workflows. Prefer pi. |

Deprecated Aliases

| Command | Status | | --- | --- | | pa | Deprecated. Delegates to na when installed. Use na directly if you still need that workflow. | | pu | Deprecated. Delegates to nu when installed. Use nu directly, or pil only for @latest upgrades. |

Workspace Tool Selection

When a workspace contains multiple package-manager indicators, for example bun.lock and pnpm-lock.yaml, pi, pil, and pci ask which tool to use and remember that choice for the current workspace.

  • Saved choices are stored locally, for example ~/.config/pi/workspace-tools.json.
  • The file is local machine configuration and should not be committed.
  • If the remembered tool no longer matches the workspace, PI removes the stale record.
pi --choose-tool
pi --choose-tool bun
pi --forget-tool
pi --show-tool
pi --show-tool --json
pi --list-tools
pi --list-tools --json

pil and pci support the same package-manager selection flags. pui and pio reuse the remembered workspace choice when they resolve a package manager.

Shell Integration

prun and pfind can make the command selected by the fuzzy UI available immediately in your shell history.

Manual setup:

# zsh
eval "$(prun --init zsh)"

# bash
eval "$(prun --init bash)"

# fish
prun --init fish | source

# Windows PowerShell
prun --init powershell | Out-String | Invoke-Expression

# PowerShell 7+
prun --init pwsh | Out-String | Invoke-Expression

Shell integration notice:

By default, PI does not modify your shell rc/profile.

  • Automatic setup is opt-in with PI_AUTO_INIT=1 prun.
  • Run prun --doctor to inspect shell/history integration state.
  • Open a new terminal, or reload your shell config, after adding the hook.

Configuration

export PI_Lang=en        # en or zh
export PI_DEFAULT=pnpm   # fallback package manager
export PI_COLOR=yellow   # ora color
export PI_SPINNER=star   # cli-spinners name

PI_COLOR accepts black, red, green, yellow, blue, magenta, cyan, white, and gray.

Examples

pi

Install dependencies example

Install dependencies animation

prun

Run commands example

Run commands animation

pfind

Find commands animation

pui

Uninstall dependencies example

Other Features

Other features animation

Development Checks

pnpm build
pnpm test
pnpm pack:check
pnpm smoke
pnpm smoke:packed

Runtime Integrations

Optional external tools are used when the current project needs them:

  • Cargo for Rust workflows
  • Go toolchain for Go workflows
  • Python for Python file execution

License

MIT License © 2022 Simon He