IDE integration for the pi coding agent.
Connects pi to a running editor so the LLM knows which file and line range you're
looking at. Pi does not read file contents automatically — it only learns the
file path and optional selection range, then decides whether to call read based
on your prompt.
It also lets you review pi's changes in the editor and send your inline comments back as feedback.
This is vibe coded. It was written by an LLM, with light steering, because I wanted the feature to exist — not because I wanted to maintain a project. It works for me; that is the entire quality bar.
pi install git:https://github.com/nunojsa/pi-idepi install /path/to/pi-idepi -e /path/to/pi-ideSee vscode/README.md for build, package, and install
instructions.
| Command | Description |
|---|---|
/ide |
Scan for running IDEs and connect (or disconnect) |
/ide-review |
Open a review of the current changes in the connected IDE |
/ide-review turns the editor into the review surface for pi's work:
- Pi lists the files changed against HEAD (
git diff --name-only HEAD, so both staged and unstaged changes) and asks the IDE to open a review over them. - The IDE shows a Pi Review panel with those files and opens the first as a working-tree-vs-HEAD diff. Comment on any line, on either side of the diff.
- Submit sends your comments back to pi, which turns them into a feedback message and starts a turn. Cancel returns nothing and pi carries on.
Each comment travels with the few lines of diff around it, captured at review time, so the model sees what you saw even if the file changes later. Pi is instructed to present a plan before acting on the feedback, and to push back on comments it disagrees with.
┌──────────────────────┐ Unix socket ┌──────────────────────┐
│ VS Code / IDE │ .pi/ide/<ide>.sock │ pi │
│ (socket server) │◄─────────────────────────────►│ (socket client) │
└──────────────────────┘ └──────────────────────┘
- The IDE creates
<workspace>/.pi/ide/<ide>.sock. - pi discovers it via
/ideand connects. The IDE name comes from the socket filename, so there is no in-band handshake. Pi then receives:- debounced
contextmessages with active file and selection, - a
reviewResultmessage when a review is submitted or cancelled.
- debounced
- pi injects an
[IDE Context]message before each agent turn so the model sees the active file and can callreadif relevant. /ide-reviewsends areviewrequest the other way, listing the files to open.
The wire format is newline-delimited JSON; see protocol.ts.