@aarsh21/open-pi
v0.2.2
Published
Pi-style agent and tool plugin for OpenCode.
Maintainers
Readme
open-pi
Pi-style agent and tool plugin for OpenCode.
It installs:
- OpenCode plugin
open-pi - Primary OpenCode agent
pi(a separate agent — your other agents are untouched; the installer asks whether to make it the default) - Pi's system prompt and Pi-style tools that override OpenCode built-ins:
readbash(always real bash, SIGKILL process-tree cleanup)edit(Pi's exact-then-fuzzy matching: smart quotes, trailing whitespace, BOM, CRLF)write
web_search— OpenAI web search, available when OpenAI credentials exist (ChatGPT-subscription OAuth from/connectorOPENAI_API_KEY). Credentials are checked at plugin load, so restart OpenCode after running/connect.- Optional ask-user questions: the installer asks whether to enable OpenCode's native
questiontool for the pi agent (multiple-choice questions with custom answers, rendered in the TUI). Off by default to keep pi interruption-free.
Tool output truncation is left to OpenCode's built-in cap, keeping tool results token-lean.
Install
bunx @aarsh21/open-pi installor:
npx @aarsh21/open-pi installThe installer updates your OpenCode config and writes the agent prompt to:
~/.config/opencode/agents/pi.mdThen restart OpenCode and switch to the pi agent.
Manual config
If you do not want to use the installer, add the plugin to opencode.json:
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["@aarsh21/open-pi"],
"agent": {
"pi": {
"description": "Pi-style coding agent with read, bash, edit, and write tools",
"mode": "primary",
"prompt": "{file:./agents/pi.md}",
"permission": {
"read": "allow",
"bash": "allow",
"edit": "allow",
"glob": "deny",
"grep": "deny",
"list": "deny",
"task": "deny",
"todowrite": "deny",
"webfetch": "deny",
"websearch": "deny",
"lsp": "deny",
"skill": "deny",
"question": "deny"
}
}
}
}And copy agents/pi.md into your OpenCode config agents directory.
Development
npm install
npm run buildFor local install while developing:
node dist/cli.js installThe installer detects local development and adds the local package path to OpenCode's plugin array.
