@averyyy/pi-coding-agent

中文文档
1.5.0-piclient.4发布于 2026/11/05MITTypeScriptES Module构建来源已验证近 30 天下载 6337

Coding agent CLI with read, bash, edit, write tools and session management

原始使用文档
文档目录4 节
  1. Getting started
  2. Share your OSS coding agent sessions
  3. Development
  4. License

Pi logo

Discord npm

New issues and PRs from new contributors are closed automatically. Maintainers review closed submissions daily. See CONTRIBUTING.md.

Pi

Pi is a minimal, extensible agent harness that you can make your own.

Adapt Pi to your workflows, not the other way around. Customize Pi with extensions, skills, prompt templates, and themes. Bundle them as Pi packages and share via npm or git.

Pi ships with powerful defaults but skips features like sub-agents and plan mode. Ask Pi to build what you want, or install a package that does it your way.

Use Pi interactively, automate it in print or JSON mode, control it over RPC, or build apps with the Pi TypeScript SDK. See OpenClaw for a real-world integration.

Getting started

Install the command-line interface:

curl -fsSL https://pi.dev/install.sh | sh

On Windows:

powershell -c "irm https://pi.dev/install.ps1 | iex"

The installer pins all dependencies and updates Pi with pi update. Alternatively, install directly with npm, which does not pin transitive dependencies:

npm install -g --ignore-scripts @earendil-works/pi-coding-agent

Pi requires Node.js 22.19 or newer. The macOS, Linux, and Windows installers can install it if needed. Pi does not require dependency lifecycle scripts for a normal npm installation.

On macOS and Linux, Nix users can install the latest release with nix profile add github:earendil-works/pi/stable. See the quickstart for updating and pinning releases.

Start Pi in the directory where you want it to work:

cd /path/to/project
pi

For a built-in AI provider, run /login inside Pi to connect a subscription or API key. Then give Pi a task.

See the documentation for full setup and usage instructions.

Share your OSS coding agent sessions

If you use Pi for open source work, please share your coding agent sessions.

Public OSS session data helps improve models, prompts, tools, and evaluations using real development workflows.

For the full explanation, see this post on X.

To publish sessions, use badlogic/pi-share-hf using a Hugging Face account and the Hugging Face CLI.

Development

Clone the repository, install its dependencies, and run Pi from source:

git clone https://github.com/earendil-works/pi
cd pi
npm install --ignore-scripts
./pi-test.sh

pi-test.sh can be called from any directory and preserves the caller's working directory.

Before submitting changes, run:

npm run check
./test.sh

Read CONTRIBUTING.md before opening an issue or pull request. It defines the contribution gate, issue quality bar, and required checks. Read AGENTS.md for repository-specific implementation, testing, dependency, and release rules.

License

MIT

版本与发布记录

@averyyy/pi-coding-agent 共发布 94 个版本,首次发布于 2026/07/02;过去 12 个月发布了 94 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
1.5.0-piclient.4latest2026/11/052 天前
1.5.0-piclient.32026/11/043 天前
1.5.0-piclient.22026/11/043 天前
1.5.0-piclient.12026/11/035 天前
1.4.0-piclient.192026/11/025 天前
1.4.0-piclient.182026/10/308 天前

关于 @averyyy/pi-coding-agent 的常见问题

@averyyy/pi-coding-agent 是什么?

Coding agent CLI with read, bash, edit, write tools and session management

如何安装 @averyyy/pi-coding-agent?

在项目目录运行 npm install @averyyy/pi-coding-agent,或使用 pnpm add / yarn add / bun add。它还提供命令行工具 pi,可以用 npx pi 直接运行。

@averyyy/pi-coding-agent 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@averyyy/pi-coding-agent 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@averyyy/pi-coding-agent 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=22.19.0。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@averyyy/pi-coding-agent 可以商用吗?

@averyyy/pi-coding-agent 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@averyyy/pi-coding-agent 的下载量有多少?

根据 npm 官方下载统计,@averyyy/pi-coding-agent 在 2026/10/07 – 2026/11/05 这 30 天内被下载 6,337 次,日均约 211 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@averyyy/pi-coding-agent 还在维护吗?

最新版本 1.5.0-piclient.4 发布于 2026/11/05(2 天前);至今共发布 94 个版本,其中过去 12 个月发布了 94 个;首次发布于 2026/07/02。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。