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.2.12

Published

An intelligent cross-platform package manager and CLI tool that autodetects project environments (Node.mjs, Go, Rust, Python) with beautiful loading animations and smart command execution.

Readme

📖 Table of Contents

🍭 PI

PI is an intelligent package manager with beautiful custom loading styles, providing a better visual experience when installing dependencies. It can intelligently identify project environments, fuzzy match commands, and find deep-nested instructions, greatly improving development efficiency.

🚀 Smart Package Manager

PI supports package management for multiple environments:

  • Go: Supports dependency installation, uninstallation, execution, and packaging with go mod
  • Rust: Supports dependency installation, uninstallation, execution, and packaging with Cargo
  • Node.js: Supports dependency installation, uninstallation, and execution with npm, pnpm, and yarn
  • Python: Supports Python file execution
  • Monorepo: Automatically identifies and handles differences between yarn and pnpm workspaces, fixing monorepo installation issues

📷 Examples

pi - Install Dependencies

Install Dependencies Example

Install Dependencies Animation

pil - Install the latest dependencies

Example of running a command

pui - Uninstall Dependencies

Uninstall Dependencies Example

pci - Clear Cache

Clear Cache Example

prun - Run Commands

Run Commands Example

Run Commands Animation

pfind - Find Commands

Find Commands Animation

Other Features

Other Features Animation

📱 Language

# Set environment variables in your bash or zsh configuration file

# Chinese
export PI_Lang=zh

# English
export PI_Lang=en

:gear: Install

  npm i -g @simon_he/pi

:open_hands: Usage

  # According to the environment of the current directory to analyze which package manager to use,go、rust、pnpm、yarn、npm
  # Install dependencies
  pi xxx
  # Re-pick the package manager used by the current workspace
  pi --choose-tool
  # Pick the tool directly without opening the selector
  pi --choose-tool bun
  # Clear the saved package manager choice for the current workspace
  pi --forget-tool
  # Show which package manager the current workspace will use
  pi --show-tool
  # Show the current workspace tool as JSON
  pi --show-tool --json
  # List all detected package-manager candidates
  pi --list-tools
  # List candidates as JSON
  pi --list-tools --json
  # Uninstall dependencies
  pui xxx
  # Execute command
  prun
  # Execute scripts in workspace
  # Execute index.js | index.ts in js | ts files or directories
  # Execute main.go in go files or directories
  # Execute main.rs in rust files or directories
  # Execute main.py in python files or directories
  pfind
  # Initialization
  pinit
  # build - for cargo, go
  pbuild
  # pci

:triangular_ruler: Workspace Tool Selection

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

  • The saved choice is stored locally in your config directory, for example ~/.config/pi/workspace-tools.json.
  • The record is local to your machine and should not be committed into the repository.
  • If the remembered tool no longer exists in that workspace, PI ignores the old value and removes the stale record automatically.
  • Use pi --choose-tool or pil --choose-tool to switch the remembered tool.
  • You can also choose directly with pi --choose-tool bun or pil --choose-tool pnpm.
  • Use pi --forget-tool or pil --forget-tool to clear the remembered tool.
  • Use pi --show-tool or pil --show-tool to inspect the current tool and where that decision came from.
  • Add --json to --show-tool when you want script-friendly output.
  • Use pi --list-tools or pil --list-tools to inspect all detected candidates, roots, and lockfile indicators.
  • pci --choose-tool and pci --forget-tool follow the same behavior.
  • pci --show-tool follows the same behavior too.
  • pci --list-tools follows the same behavior too.
  • pui and pio will also reuse the same remembered tool when they resolve the package manager.

Examples:

pi react --choose-tool
pi --choose-tool bun
pil --choose-tool
pil --choose-tool pnpm
pi --forget-tool
pil --forget-tool
pi --show-tool
pil --show-tool
pi --show-tool --json
pi --list-tools
pi --list-tools --json
pci --choose-tool
pci --forget-tool
pci --show-tool
pci --show-tool --json
pci --list-tools

Shell Integration (prun)

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

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

# fish
eval (prun --init fish)

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

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

Note: This lets the command selected by prun or pfind be available immediately in your shell history (press ↑ to recall).

Auto integration (built-in):

  • In interactive shells, the first prun run will append the right line to your shell rc/profile (zsh: ~/.zshrc, bash: ~/.bashrc, fish: ~/.config/fish/config.fish, PowerShell: $PROFILE).
  • Disable with PI_NO_AUTO_INIT=1 (or set PI_AUTO_INIT=0).
  • Open a new terminal (or source the rc/profile) after the first run.

Make it persistent:

# zsh
echo 'eval "$(prun --init zsh)"' >> ~/.zshrc

# bash
echo 'eval "$(prun --init bash)"' >> ~/.bashrc

# fish
echo 'prun --init fish | source' >> ~/.config/fish/config.fish

# Windows PowerShell
Add-Content -Path $PROFILE -Value 'prun --init powershell | Out-String | Invoke-Expression'

# PowerShell 7+
Add-Content -Path $PROFILE -Value 'prun --init pwsh | Out-String | Invoke-Expression'

Reload your shell config (or open a new terminal) after adding the line.

Power

The current environment is npm | yarn | pnpm, and it supports passing some args --silent

  • prun dev The dev command in the current package.json
  • prun If no command is specified, provide all scripts command options under the current package
  • prun playground, provide all scripts command options under the current package

The current environment is go

  • prun message, it will find message.go first, if not found, it will find message/main.go to execute

The current environment is rust

  • prun executable cargo run

workspace of pnpm | yarn

  • pfind Select the package under the current workspace, and then select the corresponding command

:monocle_face: Feature

<-- Go -->
 ## input folder and executor command
 prun  # default executor main.go
 prun table # if table.go exists, executor table.go else executor table/main.go. and table can under any folder. For example, examples/table/main.go will also be found and executed
<-- Go -->

:bulb: Custom configuration

You can configure the loading style in .zshrc, as follows:

export PI_COLOR=red # loadingstyle color
export PI_SPINNER=star # loadingstyle
export PI_DEFAULT=pnpm # Used as the fallback tool when PI cannot infer a better choice for the current workspace
  • 70+ types of styles, from cli-spinners,You can choose to fill in the name in PI_SPINNER.
  • Color options: 'black' | 'red' | 'green' | 'yellow' | 'blue' | 'magenta' | 'cyan' | 'white' | 'gray', Fill in PI_COLOR.

:battery: Dependency

License

MIT License © 2022 Simon He