Runs Pi non-interactively and parses its JSON event stream for repository tasks. Use when the user asks to delegate a bounded analysis or implementation task to
复制下面这句话,粘贴给 Claude Code、Codex、Cursor 等 AI 编程工具,它会读取安装说明并在你确认后完成安装。
请阅读 https://ai.atlankj.com/install/asset/gh-code-mate-pi-f8c013d4e542 ,按照其中的说明把「code-mate-pi」安装到你(当前 AI 工具)中。执行前先告诉我将运行的命令和写入的位置,等我确认。
查看 AI 将读取的安装说明正在读取 GitHub 原文…
内容来自 GitHub 原始文件,由原作者维护。在 GitHub 查看
command -v pi. If it is missing, stop and ask the user to install Pi in Code Mate.pi --mode json --no-session "<prompt>"
Pass the prompt as one quoted argument. Parse stdout as JSONL and inspect error events; Pi can report model or tool failure in the event stream, so process exit alone is insufficient. Never start interactive Pi or /login.
If Pi reports missing login, model, provider, or API configuration, stop and ask the user to configure Pi in Code Mate. Never request, read, print, or copy credentials.
Pi has no tool-approval prompt and normally exposes read, write, edit, and Bash tools. For analysis, append --tools read,grep,find,ls. Include write, edit, or Bash only when the user explicitly requested workspace changes, and keep the tool list and working directory as narrow as possible.
Example: run a read-only diagnosis with --tools read,grep,find,ls, then use the final JSONL message only if no error event occurred.