Crust is an extension for Visual Studio Code that acts as a true UI for the Pi Coding Agent.
The goal of Crust is to offer feature parity with existing similar extensions (like the Claude Code extension).
- Session browser — view and resume your past Pi agent sessions
- IDE file/selection context — optionally attach the current file or highlighted code as context to your prompt
- Command autocomplete with
/— discover and insert slash commands - File autocomplete with
@— reference workspace files in your prompt without leaving the chat - Rich markdown rendering — responses render with full markdown: headings, tables, code blocks, and more
- Rich diff snippets — code changes are shown as inline diffs so you can review edits at a glance
- Terminal view — opt in to opening Pi's native TUI in a VS Code terminal editor tab with Crust-provided IDE context injection
- Session forking — branch off from any point in a session to explore alternative directions
- Session tree browsing — visualize and navigate the full tree of forked sessions
- Login/logout — manage model provider credentials directly from the extension
- Change reversion — roll back file changes made during a session with a single click
- Settings UI — configure Pi through a dedicated settings panel
- Chat import/JSONL export — load sessions back into the extension or save them as JSONL
- Session sharing — generate a shareable link to a session for collaboration or review
Crust requires that Pi be installed and available in your PATH.
Follow Pi's documentation to get started: https://pi.dev/docs/latest/quickstart
Crust contributes VS Code settings under Extensions › Crust:
crust.pi.commandPath— command or absolute path used to start Pi. Defaults topi.crust.pi.defaultModel— preferred model key selected on startup. Leave empty to use Pi's current model.crust.chat.lockEditorGroupOnOpen— lock the chat editor group after opening Crust. Defaults totrue.crust.chat.includeIdeContextByDefault— enable current editor file/selection context for new prompts by default. Defaults tofalsefor security/privacy so Crust does not send IDE context unless you explicitly enable it in the chat UI or settings.crust.chat.useTerminalViewByDefault— Use Terminal View by Default. When enabled, the Crust editor toolbar button opens a VS Code terminal editor running Pi's native TUI instead of the Crust webview. Defaults tofalse.Crust: Open Chatalways opens the webview; useCrust: Open Chat (Terminal)for the terminal view from the command palette. In terminal mode,crust.chat.includeIdeContextByDefaultcontrols whether Crust IDE context starts enabled; toggle it in the TUI with/ide-context. Terminal sessions are restored after VS Code reloads whencrust.session.restoreOnReloadis enabled.crust.session.restoreOnReload— restore serialized Crust chat tabs to their previous Pi session after a VS Code window reload. Defaults totrue.crust.markdown.allowRawHtml— allow sanitized raw HTML in rendered chat Markdown. Defaults tofalse.
/exportsupports HTML only — Pi RPC exposes HTML session export, so Crust supports/exportand/export path.html. Pi's TUI also supports JSONL export with/export path.jsonl, but JSONL export is not exposed by Pi RPC yet./reloadis emulated — Pi's TUI has a built-in/reloadcommand for reloading keybindings, extensions, skills, prompts, and themes. Pi RPC mode does not currently expose that command directly, so Crust emulates it by restarting itspi --mode rpcchild process, restoring the active session, and refreshing models and slash commands. This reloads Pi-side resources without reloading the VS Code extension host; changes to Crust's own extension code or VS Code contributions still require the normal VS Code extension reload workflow.
Feel free to submit issues or open pull requests with features and bug fixes on GitHub!
S. D. G.
