vastsa/PI-Desktop

Local-first AI coding agent desktop: Electron + Rust host core + pi Agent Harness + user-installable plugins

PI‑Desktop – a local‑first desktop for AI coding agents

What it is – PI‑Desktop is a cross‑platform (macOS, Windows, Linux) desktop application that gives large‑language‑model‑based coding agents a dedicated workspace. It is not a chat window or an editor plug‑in; it is a full‑featured UI that manages projects, sessions, file edits, command execution, and long‑running agent work while keeping everything on the user’s machine.

Key ideas

Concept What you get
Bring‑your‑own model Connect OpenAI, Anthropic, Ollama, LM Studio, or any OpenAI‑compatible endpoint. Configure per‑model settings (context window, temperature, reasoning level, etc.) and switch models on the fly.
Project‑centric Open any local repository. All sessions, diffs, reviews, and generated files live alongside the code. Import sessions from Claude Code, Codex, OpenCode, or Pi.
Control layer Agents can read/write files and run commands, but privileged actions are gated by a permission UI where you approve diffs, command output, or full autonomy.
Three workflow modes Agent – free‑form, fast edits; Plan – agent proposes an immutable implementation plan you must approve; Goal – you set outcome criteria and the agent decides the path.
Extensible via plugins & skills Install marketplace plugins (.piplug packages) or develop your own. Plugins can add new agent tools, workspace panels, MCP (Model Context Protocol) servers, sub‑agents, themes, and more.
Sub‑agents Background agents can be delegated independent tasks (exploration, multi‑file implementation, research, test analysis) and report back to the parent.
Local‑first & privacy‑first All conversations, settings, and logs are stored locally (JSONL + SQLite). API keys live in the OS keychain. No required PI‑Desktop account, no telemetry, and model requests go directly to the provider you configure.

How it works (high‑level architecture)

  • UI – React renderer (chat, project view, diff review, settings). No Node integration.
  • Electron main process – orchestrates the desktop lifecycle.
  • Rust host core – owns privileged operations: filesystem access, SQLite persistence, secret storage, permission enforcement.
  • pi Agent side‑car – runs the actual LLM‑driven agent loop, streams responses, and talks to the configured model provider.
  • Model provider – cloud or local endpoint.

Getting started

  1. Download the appropriate installer from the latest GitHub release (DMG/ZIP for macOS, NSIS or portable EXE for Windows, AppImage/DEB/RPM for Linux).
  2. Open Settings → Model configuration, add a provider/API key (stored in the OS keychain).
  3. Add a local project folder via the sidebar.
  4. Choose Agent, Plan, or Goal mode to start a session.
  5. Review diffs, command output, and previews in the built‑in panels before accepting changes.

Extending the product

  • Plugins – install from the built‑in marketplace or drop a .piplug file into the app. Plugins run in isolated processes but are trusted code; they can contribute new commands, UI panels, or background services.
  • Skills – reusable instruction bundles that agents can call.
  • MCP servers – expose external tools/services to the agent via the Model Context Protocol.
  • pi extensions – existing pi‑CLI extensions can be wrapped as plugins and run unchanged.

Current status – Early Preview (v0.14.x). Core features (workspace, streaming agent, permission layer, multi‑model support, plugins, sub‑agents, session import, checkpointing) are functional. Ongoing work includes macOS release qualification, installer upgrade/rollback, hardened session recovery, tighter plugin sandboxing, and broader UI test coverage.

Development – Build locally with Node ≥22.19, pnpm ≥10, and a stable Rust toolchain. Typical workflow:

git clone https://github.com/vastsa/PI-Desktop.git
cd PI-Desktop
pnpm install
cargo build -p host-core
pnpm build:js
pnpm dev

Run pnpm typecheck, pnpm lint, and pnpm test for validation.

License – GNU LGPL v3.


TL;DR: PI‑Desktop is a genuine, open‑source desktop environment that lets you run LLM‑powered coding agents on any local codebase, with full control over models, permissions, and extensions, while keeping all data on your machine.

Related

  • Project
  • Project
  • Project
  • Project