{"id":17787378,"url":"https://github.com/simon-he95/pi","last_synced_at":"2026-03-01T10:02:30.963Z","repository":{"id":62980209,"uuid":"563959585","full_name":"Simon-He95/pi","owner":"Simon-He95","description":"smart terminal tool","archived":false,"fork":false,"pushed_at":"2025-03-03T15:33:41.000Z","size":44749,"stargazers_count":8,"open_issues_count":12,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-10T15:53:26.908Z","etag":null,"topics":["ccommand","fuzzy-search-scripts","ni","ora","pi"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Simon-He95.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"license","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"Simon-He95","custom":["https://github.com/Simon-He95/sponsor"]}},"created_at":"2022-11-09T17:37:29.000Z","updated_at":"2025-03-03T15:33:42.000Z","dependencies_parsed_at":"2022-11-10T08:01:42.879Z","dependency_job_id":"a27ef63d-6964-41dc-9392-94926ea97de1","html_url":"https://github.com/Simon-He95/pi","commit_stats":{"total_commits":119,"total_committers":3,"mean_commits":"39.666666666666664","dds":0.2100840336134454,"last_synced_commit":"cc0415527f3660699f3a645d0872fdbde7a63438"},"previous_names":[],"tags_count":93,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Simon-He95%2Fpi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Simon-He95%2Fpi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Simon-He95%2Fpi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Simon-He95%2Fpi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Simon-He95","download_url":"https://codeload.github.com/Simon-He95/pi/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243806045,"owners_count":20350775,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ccommand","fuzzy-search-scripts","ni","ora","pi"],"created_at":"2024-10-27T10:10:25.873Z","updated_at":"2026-03-01T10:02:30.888Z","avatar_url":"https://github.com/Simon-He95.png","language":"TypeScript","funding_links":["https://github.com/sponsors/Simon-He95","https://github.com/Simon-He95/sponsor"],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"/assets/kv.png\" alt=\"PI - Smart Package Manager\"\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://www.npmjs.com/package/@simon_he/pi\"\u003e\u003cimg src=\"https://img.shields.io/npm/v/@simon_he/pi?color=3fb883\u0026amp;label=\" alt=\"NPM version\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://www.npmjs.com/package/@simon_he/pi\"\u003e\u003cimg src=\"https://img.shields.io/npm/dm/@simon_he/pi.svg?color=3fb883\u0026label=\" alt=\"NPM Downloads\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/Simon-He95/pi/blob/main/LICENSE\"\u003e\u003cimg src=\"https://img.shields.io/github/license/Simon-He95/pi?color=3fb883\" alt=\"License\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003eEnglish | \u003ca href=\"./README_zh.md\"\u003e简体中文\u003c/a\u003e\u003c/p\u003e\n\n## 📖 Table of Contents\n\n- [Introduction](#-pi)\n- [Features](#-smart-package-manager)\n- [Examples](#-examples)\n- [Language Settings](#-language)\n- [Installation](#-installation)\n- [Usage](#-usage)\n- [Supported Features](#-features)\n- [Special Features](#-feature)\n- [Custom Configuration](#-custom-configuration)\n- [Dependencies](#-dependencies)\n- [License](#license)\n\n## 🍭 PI\n\nPI 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.\n\n## 🚀 Smart Package Manager\n\nPI supports package management for multiple environments:\n\n- ✅ **Go**: Supports dependency installation, uninstallation, execution, and packaging with go mod\n- ✅ **Rust**: Supports dependency installation, uninstallation, execution, and packaging with Cargo\n- ✅ **Node.js**: Supports dependency installation, uninstallation, and execution with npm, pnpm, and yarn\n- ✅ **Python**: Supports Python file execution\n- ✅ **Monorepo**: Automatically identifies and handles differences between yarn and pnpm workspaces, fixing monorepo installation issues\n\n## 📷 Examples\n\n### pi - Install Dependencies\n\n![Install Dependencies Example](/assets/pi.png)\n\n![Install Dependencies Animation](/assets/pi.gif)\n\n### pil - Install the latest dependencies\n\n![Example of running a command](/assets/prun.png)\n\n### pui - Uninstall Dependencies\n\n![Uninstall Dependencies Example](/assets/pui.png)\n\n### pci - Clear Cache\n\n![Clear Cache Example](/assets/pci.png)\n\n### prun - Run Commands\n\n![Run Commands Example](/assets/prun.png)\n\n![Run Commands Animation](/assets/prun.gif)\n\n### pfind - Find Commands\n\n![Find Commands Animation](/assets/pfind.gif)\n\n### Other Features\n\n![Other Features Animation](/assets/others.gif)\n\n## 📱 Language\n\n```bash\n# Set environment variables in your bash or zsh configuration file\n\n# Chinese\nexport PI_Lang=zh\n\n# English\nexport PI_Lang=en\n```\n\n## :gear: Install\n\n```\n  npm i -g @simon_he/pi\n```\n\n## :open_hands: Usage\n\n```\n  # According to the environment of the current directory to analyze which package manager to use，go、rust、pnpm、yarn、npm\n  # Install dependencies\n  pi xxx\n  # Uninstall dependencies\n  pui xxx\n  # Execute command\n  prun\n  # Execute scripts in workspace\n  # Execute index.js | index.ts in js | ts files or directories\n  # Execute main.go in go files or directories\n  # Execute main.rs in rust files or directories\n  # Execute main.py in python files or directories\n  pfind\n  # Initialization\n  pinit\n  # build - for cargo, go\n  pbuild\n  # pci\n\n```\n\n## Shell Integration (prun)\n\n```\n# zsh\neval \"$(prun --init zsh)\"\n\n# bash\neval \"$(prun --init bash)\"\n\n# fish\neval (prun --init fish)\n```\n\n\u003e Note: This lets the command selected by prun be available immediately in your shell history (press ↑ to recall).\n\nAuto integration (built-in):\n\n- 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`).\n- Disable with `PI_NO_AUTO_INIT=1` (or set `PI_AUTO_INIT=0`).\n- Open a new terminal (or source the rc file) after the first run.\n\nMake it persistent:\n\n```\n# zsh\necho 'eval \"$(prun --init zsh)\"' \u003e\u003e ~/.zshrc\n\n# bash\necho 'eval \"$(prun --init bash)\"' \u003e\u003e ~/.bashrc\n\n# fish\necho 'prun --init fish | source' \u003e\u003e ~/.config/fish/config.fish\n```\n\nReload your shell config (or open a new terminal) after adding the line.\n\n## Power\n\nThe current environment is npm | yarn | pnpm, and it supports passing some args --silent\n\n- prun dev The dev command in the current package.json\n- prun If no command is specified, provide all scripts command options under the current package\n- prun playground, provide all scripts command options under the current package\n\nThe current environment is go\n\n- prun message, it will find message.go first, if not found, it will find message/main.go to execute\n\nThe current environment is rust\n\n- prun executable cargo run\n\nworkspace of pnpm ｜ yarn\n\n- pfind Select the package under the current workspace, and then select the corresponding command\n\n## :monocle_face: Feature\n\n```\n\u003c-- Go --\u003e\n ## input folder and executor command\n prun  # default executor main.go\n 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\n\u003c-- Go --\u003e\n```\n\n## :bulb: Custom configuration\n\nYou can configure the loading style in .zshrc, as follows：\n\n```\nexport PI_COLOR=red # loadingstyle color\nexport PI_SPINNER=star # loadingstyle\nexport PI_DEFAULT=pnpm # If the current project does not set the installed package manager, you can set the default installation here\n```\n\n- 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.\n- Color options: 'black' | 'red' | 'green' | 'yellow' | 'blue' | 'magenta' | 'cyan' | 'white' | 'gray', Fill in PI_COLOR.\n\n## :battery: Dependency\n\n- [ora](https://github.com/sindresorhus/ora)\n- [ccommand](https://github.com/Simon-He95/ccommand)\n- [cargo](https://github.com/rust-lang/cargo)\n\n## License\n\n[MIT](./LICENSE) License © 2022 [Simon He](https://github.com/Simon-He95)\n\n\u003ca href=\"https://github.com/Simon-He95/sponsor\" target=\"_blank\"\u003e\u003cimg src=\"https://cdn.buymeacoffee.com/buttons/default-orange.png\" alt=\"Buy Me A Coffee\" style=\"height: 51px !important;width: 217px !important;\" \u003e\u003c/a\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimon-he95%2Fpi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsimon-he95%2Fpi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimon-he95%2Fpi/lists"}