Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/simon-he95/pi

smart terminal tool
https://github.com/simon-he95/pi

ccommand fuzzy-search-scripts ni ora pi

Last synced: 10 days ago
JSON representation

smart terminal tool

Awesome Lists containing this project

README

        

![kv](/assets/kv.png)

English | 简体中文


NPM version

## :lollipop: PI

A smart package manager with a custom loading style, which makes you install dependencies more beautifully :), and can fuzzy match and find deep-level instructions

## :rocket: Smart package manager

- Supports dependency installation, uninstallation, execution and packaging of go mod
- Supports Cargo's dependency installation, uninstallation, execution and packaging
- Support npm dependency installation, uninstallation and execution
- Support pnpm dependency installation, uninstallation and execution
- Support yarn dependency installation, uninstallation and execution
- Automatically handle the difference between yarn and pnpm w and W according to the current directory and environment and will repair the monorepo installation

## Demo

- pi
![img](/assets/pi.png)

![gif](/assets/pi.gif)

- pui
![img](/assets/pui.png)

- pci
![img](/assets/pci.png)

- prun
![img](/assets/prun.png)

![gif](/assets/prun.gif)

- pfind
![gif](/assets/pfind.gif)

- others
![gif](/assets/others.gif)

## :phone: Language

```
# Export environment variables in your bash or zsh

# 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
# Uninstall dependencies
pui xxx
# Execute command
prun
# Execute scripts in workspace
pfind
# Initialization
pinit
# build - for cargo, go
pbuild
# pci

```

## 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](https://jsfiddle.net/sindresorhus/2eLtsbey/embedded/result/),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

- [@antfu/ni](https://github.com/antfu/ni)
- [ora](https://github.com/sindresorhus/ora)
- [ccommand](https://github.com/Simon-He95/ccommand)
- [cargo](https://github.com/rust-lang/cargo)

## License

[MIT](./LICENSE) License © 2022 [Simon He](https://github.com/Simon-He95)

Buy Me A Coffee