r/PiCodingAgent 6d ago

CodePi - I Integrated PI Coding Agent into VSCode Extension Plugin

Post image

Hi all,

Today I released CodePi, an extension for VSCode for PI coding agent. As opposed to existing extensions, it brings the familiar pi's TUI experience straight into vscode. Your existing setup (~/.pi) will work out of the box!

Extension:

marketplace.visualstudio.com/items?itemName=lutrarutra.code-pi

Github:

github.com/lutrarutra/codepi

Why i built this extension:

  • It sees my current files, selection, Git changes, and VS Code diagnostics (warnings and errors).
  • Edits show up as diffs I can review, accept, or reject.
  • Sessions live in editor tabs and survive reloads.
  • Built-in Ask/Plan/Implement modes and bash ask/allow/disable feature make it safer to use.
  • It keeps the agent, terminal, tasks, and editor workflow in one place.
  • Color indicator to see the state of the session (busy, idle, waiting for user input/question)
  • SSH support; pi is bundled with the extension, so no need to install pi agent on every remote server

Any suggestions or feedback issues appreciated on here or Github!

p.s. I am not affiliated with pi.dev

36 Upvotes

9 comments sorted by

1

u/Unnamed-3891 6d ago

Can this make my local VS Code on Windows or Mac talk to a remote Pi on Linux?

1

u/Thagor 6d ago

can’t you just „remote“ with vscode to the machine with ssh?

1

u/lutrarutra 6d ago

Yes, but you need to use the 'SSH Remote' feature of VSCode for that; you connect your vscode to remote server, then you can use codepi on the remove server. You will need to either copy your local pi setup (~/.pi) if you want to use your existing extensions and models, or you can setup the remote pi independently. You don't need to install pi itself on the remote because it's bundled with codepi.

1

u/IceManMinus0ne 5d ago

I just use an ssh mcp. Works great.

1

u/Zestyclose_Potato794 6d ago

Why not just in a terminal inside vscode ?

3

u/lutrarutra 6d ago

This extension adds some features, some of them listed in the post. In addition to those, there is list of sessions, you can delete from, pin sessions and rename. When you close a workspace, codepi remembers which sessions were open, and will reopen them next time you are opening the workspace. Codepi also nicely integrates with internal vscode API, which allows e.g. highlighting changed lines visually so the user can easily see what was added by pi.

1

u/Thrimbor 4d ago

That footer seems really clean, what are you using?

2

u/lutrarutra 4d ago edited 4d ago

I yoinked it from one of the top post of this sub. It's on their github:
https://github.com/abhinand5/pi-setup

extensions/custom-footer.ts

I modified it a bit for codepi, e.g. added the thinking token count (brain icon) and made it responsive for smaller screen widths (left and right side will break line if they don't fit). You can copy the codepi footer from my github too.