$ cat ~/map/pi-acp-jetbrain.md
pi-acp-jetbrain
Agent Client Protocol adapter that runs pi inside JetBrains IntelliJ's agent panel over stdio, with one pi --mode rpc subprocess per session.
extensions✓ Oct 16
Facts
- repository
- github.com/ryan-brosas/pi-acp-jetbrain ↗
- GitHub Stars
- ★ 3
- Forks
- 2
- license
- MIT
- npm / mo
- —
- last push
- Aug 16, 2026
install
pi install npm:pi-acp-jetbrain## TL;DR
Agent Client Protocol adapter that runs pi inside JetBrains IntelliJ: an ACP server over stdio that starts one pi --mode rpc subprocess per session and exposes IntelliJ's built-in MCP tools to pi as ide_<server>_<tool> extension tools.
## Key points
- $Runs as an ACP server over stdio; each ACP session starts one pi --mode rpc subprocess and the adapter translates messages between client and pi. IntelliJ is the primary host — other ACP clients work with partial coverage.
- $Session surface covers session/new, session/prompt, session/cancel, session/list, session/load, session/fork, session/resume, session/close, and session/delete; pi keeps its own session files while a small map at ~/.pi/pi-acp/session-map.json lets loads reattach. Assistant text streams as agent_message_chunk, reasoning as agent_thought_chunk, tool runs as tool_call / tool_call_update, and token use and cost are reported after each settled turn on the unstable usage field.
- $JetBrains IDE bridge: IntelliJ sends its built-in MCP server descriptor with each chat, and those IDE tools are exposed to pi as ide_<server>_<tool> extension tools; the bridge opens a direct MCP-over-SSE client to http://127.0.0.1:<IJ_MCP_SERVER_PORT>/sse. Two allowlists guard the tools, and execute_tool plus every xdebug_* name is deny-listed (PI_ACP_IDE_EXTRA_TOOLS can re-allow reviewed tools).
- $IntelliJ-first coding mode via PI_ACP_IDE_MODE=off|prefer|required: prefer and required remove the native read, edit, write, grep, find, and ls tools when the required IDE capabilities register, mutations run through IntelliJ and open the affected files, and patch targets and path arguments are confined to the ACP project root.
- $Install as a pi package with pi install npm:pi-acp-jetbrain to activate the bundled bridge extension (recorded in ~/.pi/agent/settings.json); npm install -g pi-acp-jetbrain only provides the pi-acp executable. Register the adapter in ~/.jetbrains/acp.json. Requires Node.js 20+ and the pi executable on PATH.
- $pi-acp --terminal-login runs interactive provider login; env vars such as PI_ACP_PI_COMMAND (path to pi) and PI_ACP_SESSION_MAP (session map path) tune the adapter.
## FAQ
Q Why install it as a pi package?
pi install npm:pi-acp-jetbrain records the package in ~/.pi/agent/settings.json and enables its declared extension automatically; installing only with npm install -g provides the executable but does not activate Pi package resources.
Q Is IntelliJ-first mode a sandbox?
No — PI_ACP_IDE_MODE=prefer|required is policy enforcement for normal coding tools, not a filesystem sandbox: unrestricted bash stays available in prefer for Git, tests, and builds, and the post-turn gates report violations without rolling back changes.
## References
- README (coverage, IDE bridge, install, env vars) ↗
- Releases (npm publishing with signed provenance) ↗
## Related entries
$ dsh-pi-agent
DeepSeek Harness (DSH) AgentFactory that swaps DSH's native agent loop for a headless pi --mode rpc child, so DSH's web UI, sessions, hooks, and presets keep working with pi's minimal prompt and four tools.
$ pi-acp
Community ACP (Agent Client Protocol) adapter that bridges JSON-RPC 2.0 between ACP clients such as the Zed editor and Pi running in RPC mode over stdio.
$ aft
Sensorimotor-cortex layer that ships thin adapters for Pi and OpenCode, replacing raw read/write/edit/bash with semantic operations.
Last updated: Aug 31, 2026