agegr/pi-web
Web UI for the pi coding agent
Pi Web – a browser UI for the Pi coding‑agent
What it is – Pi Web is a local web‑based interface that lets you work with the Pi coding agent (a command‑line AI‑assistant for code). It reads the same configuration and session files that the Pi CLI uses, so you can browse, resume, and branch conversations, manage model credentials, and inspect project files – all from a browser window.
Key capabilities
- Session workspace – list sessions by project, see usage stats (tokens, cost, compaction), rename, export or delete them, and create new branches from any message.
- File explorer – browse the files a session knows about, upload new ones, view Git diffs, and preview many formats (Markdown, source code, images, audio, PDFs, DOCX) with live refresh.
- Git worktree support – switch between different worktree checkouts while keeping sessions grouped per repository.
- Configuration panel – add or edit model providers, API keys, plugins and skills without leaving the UI.
- Multilingual UI – English, Simplified and Traditional Chinese, auto‑selected from the browser language.
How to run it
- Install Node 22.19+.
- Start with the one‑liner
npx @agegr/pi-web@latest(or install globally withnpm i -g @agegr/pi-web). - A local server starts on
127.0.0.1:30141and opens your default browser. - If you haven’t configured a model provider yet, open the Models panel and add your API key.
Configuration & security
- Port, hostname, idle timeout, and password protection are controllable via CLI flags or environment variables (
PI_WEB_PASSWORD,PI_WEB_IDLE_TIMEOUT_MS, etc.). - By default it binds only to localhost; exposing it on a network requires a strong password and a reverse‑proxy for TLS.
- The UI only accesses files inside the working directories known to the Pi agent, not the whole filesystem.
Development – The repo is a Next.js + React app written in TypeScript. Run npm install && npm run dev for a hot‑reloading dev server. Tests, type‑checking, and linting are provided.
Who it’s for – Anyone who uses the Pi coding agent and wants a richer, visual way to manage sessions, files, and model settings without leaving the command line.
License – MIT.
Related
- Project
- Project
- Project
- Project
- Project