VS Code Extensions
Pi – this one is (y)ours

Pi – this one is (y)ours

by mr-narender

An unofficial, personal VS Code chat UI for the Pi coding agent (pi.dev). Not affiliated with pi.dev — shared for anyone who wants it.

Downloads

33

Rating

— (0)

Version

0.0.128

Last updated

Aug 12, 2026

An unofficial, personal VS Code chat UI for the Pi coding agent.

Disclaimer. I have no affiliation with pi.dev. I genuinely appreciate their work — this extension simply builds a GUI on top of Pi’s public RPC protocol. I made it for myself and I’m sharing it for anyone who wants to use it. It is provided as-is, with no warranty, and “Pi” belongs to its respective owners.

The Pi coding agent, natively in VS Code — the same power as the pi terminal, in a clean chat UI with editor-tab conversations and a session launcher.


What it is

Pi RPC embeds the Pi coding agent inside VS Code. It runs the real pi process in the background (pi --mode rpc) and gives you a native GUI on top of it:

  • A sidebar launcher with a big New Chat button and your saved chats (search, rename, delete).
  • Chats open as editor tabs in the center — one tab per session, reopenable and reload-safe.
  • Watch & drive from your phone — a Connect a phone button mirrors the live chat to a phone browser so you can follow (and optionally steer) Pi while away from your desk.
  • Everything the Pi TUI can do, surfaced through the UI: models, thinking levels, slash commands, attachments/context, compaction, retry, usage, and diagnostics.

It talks to Pi over Pi’s documented RPC protocol, so your existing Pi setup, models, sessions, skills, prompts, and extensions all work unchanged.

Prerequisites

You need Pi installed and authenticated before using this extension:

  1. Install the Pi CLI (Node.js 18+):
    npm install -g @earendil-works/pi-coding-agent
    
    Verify it’s on your PATH:
    pi --version
    
  2. Authenticate Pi once (either is fine):
    • Subscription / OAuth: run pi in a terminal and use /login, or
    • API key: export your provider key, e.g. export ANTHROPIC_API_KEY=…
  3. Open a folder in VS Code (Pi runs per workspace folder).

If pi isn’t on your PATH, set Settings → Pi RPC → Pi Executable Path to the full path.

How it works

VS Code
├─ Sidebar (Pi)            New Chat · search · your saved chats (open / rename / delete)
└─ Editor tab "Pi Chat"    transcript · composer · attachments · model · More menu
        │
        ▼
pi --mode rpc              one background Pi process per workspace folder
  • Pi warm-starts when the extension activates, so your first chat is ready fast.
  • While Pi connects, the chat shows a Connecting… state and the composer is disabled.
  • Sessions are named Session N by default and can be renamed; the real session id stays internal. Closing a tab never deletes the session.

Getting started

  1. Install the Pi CLI and log in (see Prerequisites).
  2. Install this extension (VSIX or Marketplace) and open a project folder.
  3. Click the Pi icon in the Activity Bar → New Chat.
  4. Type your message and press Enter to send (Shift+Enter for a newline).

Features (TUI parity, in a GUI)

Area What you get
Chats Editor-tab conversations, live streaming, one tab per session, reopen/resume, branch & duplicate
Sessions Sidebar launcher, search, pin, rename, delete, warm-start
Models Choose/cycle model, thinking level, retry last message (optionally with a different model)
Compose / slash commands, @file mentions, drag-drop & pasted images, attach file/selection/diagnostics
Ask Pi Right-click a selection or use the inline CodeLens above functions to Explain / Fix / Refactor
Navigate Command palette (Cmd/Ctrl+K), find-in-chat (Cmd/Ctrl+F), jump-to-latest, conversation map
Flow Queue/steer follow-ups, Continue, abort/stop, auto-retry, auto-compaction, usage & cost chip
Feel Enter-to-send, typewriter streaming, working animation, chat-font controls, completion notifications, a11y
Remote (phone) Connect a phone to watch the live chat in a browser and take control to drive it

Watch & drive from your phone

You can mirror a live chat to your phone — handy for kicking off a long task and keeping an eye on it (or nudging it) from the couch.

One-time setup (Settings → Pi RPC → Remote):

  • Broker URL — the address of your Pi relay (e.g. https://pi.fromlab.work).
  • Host Secret — the shared secret your relay expects.

Each session:

  1. Open a chat, then click 📱 Connect a phone in the Pi sidebar (or run Pi: Start Remote Session from the Command Palette).
  2. A pairing panel opens with a QR code and a 6-digit PIN. It stays open until you stop.
  3. On your phone, scan the QR (or open the link) and enter the PIN.
  4. The phone shows the conversation live. Tap Take control to send prompts; VS Code pops a confirmation when a device connects.
  5. Click Stop session in the panel (or Pi: Stop Remote Session) when you’re done.

Security. The relay never sees your code or Pi — it only forwards messages. Pairing is QR + PIN, a per-session token is minted server-side and held only on the phone (never in a URL), sessions expire, and only one device can drive at a time.

Keyboard

Shortcut Action
Enter Send the current message
Shift+Enter Insert a newline
Cmd+Enter / Ctrl+Enter Also sends (works while composing)
Cmd+K / Ctrl+K Command palette of in-chat actions
Cmd+F / Ctrl+F Find in the current chat

The More menu

The More ▾ menu in a chat groups actions with color tags for quick scanning:

  • 🔵 Session — Rename chat, Retry last message, Copy as Markdown, Export as HTML
  • 🟠 Model — Choose model, Thinking level
  • 🟣 Context — Compact conversation
  • 🟢 / 🔴 System — Restart Pi, Connection health, Show logs, Help

Model, usage/cost, Continue and the ⚙️ settings gear live in the composer toolbar at the bottom-right of the chat.

Settings worth knowing (Settings → Pi RPC)

  • Working Animation — spinner style shown while Pi is working.
  • Typewriter Speed — how smoothly streamed answers type out (off / slow / normal / fast).
  • Chat Font Family / Size — the transcript font.
  • Notify On Complete — ping when a long response finishes and the chat isn’t focused.
  • Auto Compact Threshold — auto-compact the conversation when context usage hits this %.
  • CodeLens Enabled — the inline “Ask Pi” action above functions/methods.
  • Remote → Broker URL / Host Secret — required for Connect a phone.
  • Pi Executable Path — set this if pi isn’t on your PATH.

Troubleshooting

  • Stuck on “Connecting…” → run More → Connection health, or Restart Pi. Make sure pi --version works in a terminal and that you’ve logged in.
  • “Pi is still connecting…” when using / → wait a moment; slash commands need a live session.
  • Wrong/old Pi → set the Pi Executable Path setting to the exact binary.
  • Phone won’t pair → make sure Remote → Broker URL and Host Secret are set, and pair before the code expires. If it says the code expired, just run Start Remote Session again.
  • Phone connected but blank → open (or click into) a chat in VS Code so there’s an active conversation to mirror.

Privacy & security

  • Runs entirely locally against your own pi process — this extension adds no telemetry.
  • Respects VS Code Workspace Trust: in a restricted workspace, chat is read-only and mutating actions stay disabled until you trust the folder.
  • Diagnostics exports are redacted and never include transcript text, drafts, or secrets.

Notes

  • One Pi process per workspace folder; multi-root workspaces are isolated.
  • The Activity Bar icon and gallery logo are an original Pi × VS Code fusion mark.

Credits & affiliation

This is an independent, unofficial project. I am not affiliated with pi.dev and claim no endorsement by them. All credit for the Pi coding agent goes to its authors at pi.dev; this extension only talks to Pi over its documented RPC protocol. Built for personal use and shared freely for anyone who finds it useful.

License

MIT

Related extensions