# pi-webui **Repository Path**: abeir/pi-webui ## Basic Information - **Project Name**: pi-webui - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-06-01 - **Last Updated**: 2026-06-11 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Pi Web Web UI for [Pi](https://github.com/earendil-works/pi-mono) — an AI coding agent — running in WSL. Mirrors the OpenAI Codex desktop experience in the browser. ## Features (v0.1) - Multi-workspace management with WSL ↔ Windows path translation - Streaming chat with tool-call visualization - Risk-tiered approval (low auto, medium/high ask) - Project-level approval policy (`.pi/settings.json` → `approval` section) - Pi extension loading (user-level + workspace-level) - File tree + Monaco read-only viewer - Persists sessions in Pi's native JSONL format (compatible with TUI) > ⚠️ **Security:** v0.1 has no authentication — intended for local development only. Do not expose to the network. Bearer Token auth is planned for v0.2. ## Architecture See [`docs/superpowers/specs/2026-06-01-pi-web-ui-design.md`](docs/superpowers/specs/2026-06-01-pi-web-ui-design.md). Three packages in a pnpm monorepo: - `@pi-web/shared` — event types, models, path utilities - `@pi-web/server` — Fastify + socket.io + SQLite, embeds Pi as a library - `@pi-web/web` — React + Vite + Tailwind SPA ## Prerequisites - **Windows 11 22H2+** with WSL2 - **Node 20+** inside WSL - **pnpm 9+** (`npm i -g pnpm`) - **WSL2 Mirrored networking mode** (recommended — see below) ## WSL Configuration Edit `%UserProfile%\.wslconfig` on Windows (a template is available at [`docs/wslconfig.example`](docs/wslconfig.example)): ```ini [wsl2] networkingMode=mirrored ``` Then restart WSL: `wsl --shutdown` from PowerShell, then reopen your terminal. Verify inside WSL that `cat /etc/resolv.conf` shows Windows DNS (confirms Mirrored mode is active). ## Quick Start (WSL) ```bash # Clone the repo (or use your own fork) git clone https://gitee.com/abeir/pi-webui.git cd pi-webui pnpm install pnpm dev:wsl ``` Then open in your Windows browser. If localhost forwarding is disabled, use `http://:5173` — the WSL IP is printed by `pnpm dev:wsl` on startup. ## Development ```bash # Run both server and web in dev mode pnpm dev # Run only one pnpm --filter @pi-web/server dev pnpm --filter @pi-web/web dev # Type-check everything pnpm check # Run all tests ./test.sh # Build for production pnpm build ``` ## Project Structure ``` pi-webui/ ├── packages/ │ ├── shared/ types + pure functions │ ├── server/ Fastify + socket.io + SQLite + Pi integration │ └── web/ React + Vite + Tailwind ├── scripts/ │ ├── dev.sh parallel dev (server + web) │ └── start-wsl.sh WSL bootstrap with URL printout ├── docs/superpowers/ │ ├── specs/ design documents │ └── plans/ implementation plans └── test.sh runs all unit + integration tests ``` ## Approval Policy Edit `/.pi/settings.json` (workspace-level — overrides any user-level `~/.pi/agent/settings.json`): ```json { "approval": { "mode": "balanced", "remember": "session", "bash": { "allowlist": ["git status", "npm test"], "denylist": ["rm -rf *"] } } } ``` Modes: `strict` (ask for medium and high), `balanced` (ask for high only), `yolo` (never ask). > ⚠️ **v0.1 known limitation:** the built-in `DEFAULT_BASH_DENYLIST` baseline (server-side blocklist for `rm -rf *`, `sudo`, `curl | sh`, fork bomb, etc.) is bypassed when `mode: "yolo"` is used together with no `approval.bash` section in settings. v0.2 will make the baseline apply unconditionally. Until then, configure `mode: "balanced"` (default) or add a `bash` section to keep the denylist active. `remember`: `session` (forget when session ends), `workspace` (persist in SQLite), `never`. ## Roadmap See spec § 16 — v0.2 adds Monaco bi-directional editing, terminal panel, Git integration. v1.0 adds remote access, sandbox execution, multi-agent orchestration. ## License Same as upstream Pi.