开发指南
设置
git clone https://github.com/badlogic/pi-mono
cd pi-mono
npm install
npm run build
从源码运行:
./pi-test.sh
调试
/debug(隐藏命令)写入 ~/.pi/agent/pi-debug.log:
- 带 ANSI 码的渲染 TUI 行
- 最后发送给 LLM 的消息
测试
./test.sh # 运行非 LLM 测试(不需要 API Key)
npm test # 运行所有测试
npm test -- test/specific.test.ts # 运行特定测试
Fork/重命名
在 package.json 中配置:
{
"piConfig": {
"name": "pi",
"configDir": ".pi"
}
}