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.
npm install @simon_he/pi

English | 简体中文
- Introduction
- Features
- Examples
- Language Settings
- Installation
- Usage
- Supported Features
- Special Features
- Custom Configuration
- Dependencies
- License
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.
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
!Install Dependencies Animation
!Uninstall Dependencies Example
``bashSet environment variables in your bash or zsh configuration file
: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
# 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`Shell Integration (prun)
`
zsh
eval "$(prun --init zsh)"bash
eval "$(prun --init bash)"fish
eval (prun --init fish)
`> Note: This lets the command selected by prun 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 (zsh: ~/.zshrc, bash: ~/.bashrc, fish: ~/.config/fish/config.fish).
- Disable with PI_NO_AUTO_INIT=1 (or set PI_AUTO_INIT=0).
- Open a new terminal (or source the rc file) after the first run.Make it persistent:
`
zsh
echo 'eval "$(prun --init zsh)"' >> ~/.zshrcbash
echo 'eval "$(prun --init bash)"' >> ~/.bashrcfish
echo 'prun --init fish | source' >> ~/.config/fish/config.fish
`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 # If the current project does not set the installed package manager, you can set the default installation here
``- 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.