[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-81375":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":18,"stars30d":19,"stars90d":16,"forks30d":16,"starsTrendScore":20,"compositeScore":21,"rankGlobal":10,"rankLanguage":10,"license":22,"archived":23,"fork":23,"defaultBranch":24,"hasWiki":23,"hasPages":25,"topics":26,"createdAt":10,"pushedAt":10,"updatedAt":27,"readmeContent":28,"aiSummary":29,"trendingCount":16,"starSnapshotCount":16,"syncStatus":30,"lastSyncTime":31,"discoverSource":32},81375,"pi-web","jmfederico\u002Fpi-web","jmfederico","Web control plane for remote, agentic software development with Pi Coding Agent","https:\u002F\u002Fpi-web.dev\u002F",null,"TypeScript",84,18,38,4,0,15,22,46,45,3.84,"MIT License",false,"main",true,[],"2026-06-12 02:04:14","# PI WEB\n\n[![CI](https:\u002F\u002Fgithub.com\u002Fjmfederico\u002Fpi-web\u002Factions\u002Fworkflows\u002Fci.yml\u002Fbadge.svg?branch=main)](https:\u002F\u002Fgithub.com\u002Fjmfederico\u002Fpi-web\u002Factions\u002Fworkflows\u002Fci.yml)\n[![npm version](https:\u002F\u002Fimg.shields.io\u002Fnpm\u002Fv\u002F@jmfederico\u002Fpi-web)](https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002F@jmfederico\u002Fpi-web)\n[![Node.js](https:\u002F\u002Fimg.shields.io\u002Fnode\u002Fv\u002F@jmfederico\u002Fpi-web)](package.json)\n[![License: MIT](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Flicense-MIT-blue.svg)](LICENSE)\n[![Pi Coding Agent](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FPi-Coding%20Agent-6f42c1)](https:\u002F\u002Fgithub.com\u002Fearendil-works\u002Fpi\u002Ftree\u002Fmain\u002Fpackages\u002Fcoding-agent)\n\nWebsite: \u003Chttps:\u002F\u002Fpi-web.dev\u002F>\n\n![PI WEB](docs\u002Fassets\u002Fpi-web-banner.png)\n\n**Run AI coding agents on your own machine or server, keep them alive in real workspaces, and control everything from a browser.**\n\nPI WEB is a web control plane for [Pi Coding Agent](https:\u002F\u002Fgithub.com\u002Fearendil-works\u002Fpi\u002Ftree\u002Fmain\u002Fpackages\u002Fcoding-agent). Add your repositories once, open project workspaces and git worktrees, start agent sessions inside them, and come back later without losing the work. Your browser becomes the cockpit; your server becomes the persistent development environment. Start on your laptop, check in from your phone, and continue from an iPad or another machine whenever that is the device you have at hand.\n\n![PI WEB demo](docs\u002Fassets\u002Fpi-web-demo.gif)\n\nWith PI WEB you can:\n\n- launch and supervise multiple coding-agent sessions in parallel;\n- keep sessions running when your browser disconnects or the UI restarts;\n- organize agent work by project, workspace, branch, experiment, or review;\n- use git worktrees to isolate concurrent features and fixes;\n- chat with Pi Coding Agent through a realtime web UI;\n- move fluidly between laptop, phone, tablet, and desktop without moving the development environment;\n- turn any server, desktop, or remote dev box into an agent-first development hub.\n\n## Why use PI WEB?\n\nAgentic development works best when agents are not trapped inside a single local terminal. They need stable environments, access to real repositories, and room to work across branches and tasks. Humans need the opposite: a clear place to supervise, redirect, review, and decide.\n\nPI WEB connects those two worlds. The work stays in the server-side environment while you move between devices: laptop for deep focus, phone for a quick check-in, tablet for review, desktop when you are back at a desk. It is not trying to recreate the old desktop IDE in a browser; it is a control surface for persistent, parallel, human-in-the-loop agent work.\n\n## Core model\n\nPI WEB organizes work into three levels:\n\n```text\nProject     a folder on the server\nWorkspace   a git worktree, or the project folder for non-git projects\nSession     a chat with Pi Coding Agent running inside a workspace\n```\n\nThis maps naturally to real development work:\n\n- add a project once;\n- use worktrees to separate branches, features, experiments, and reviews;\n- start one or more agent sessions inside each workspace;\n- leave sessions running even when the browser disconnects or the UI restarts.\n\n## Features\n\n- Add and list server-side projects.\n- Discover git worktrees automatically with `git worktree list --porcelain`.\n- Support non-git folders as single-workspace projects.\n- Start, resume, archive, and restore Pi sessions per workspace.\n- Chat with Pi Coding Agent through realtime WebSocket events.\n- Keep active agent runtimes alive across browser disconnects and web\u002FAPI restarts.\n- Explicitly stop or abort active session work.\n- View live session status: streaming, compaction, bash activity, token usage, cost, model, and context usage.\n- Send prompts, shell input, and supported commands through the Pi SDK path.\n- Reuse your existing Pi auth and model configuration from `~\u002F.pi\u002Fagent`.\n- Extend the UI with trusted plugins that add actions, workspace panels, and workspace-label metadata. See [Plugin API](docs\u002Fplugins.md) for LLM-friendly plugin-building docs.\n\n## Architecture\n\nPI WEB uses a split-process architecture so agent runtimes are not owned by the browser-facing dev server.\n\n```text\nBrowser UI\n   │\n   ▼\nFastify Web\u002FAPI process\n   │ HTTP + WebSocket proxy\n   ▼\nSession daemon\n   │\n   ▼\nPi Coding Agent SDK\n```\n\n### Session daemon\n\nThe session daemon owns active Pi session runtimes. It is intended to be long-lived so sessions can survive browser disconnects and web\u002FAPI restarts.\n\n### Web\u002FAPI\u002FUI server\n\nThe web process serves the API and browser UI. In development it can autoreload freely while active sessions continue running in the daemon.\n\n## State model\n\nPI WEB keeps its own state intentionally small:\n\n- Projects: `~\u002F.pi-web\u002Fprojects.json`\n- Workspaces: discovered from git worktrees, not stored\n- Sessions and chat history: Pi's default JSONL session storage\n- Active session runtimes and WebSockets: memory in the session daemon\n\n## Plugins\n\nPI WEB production installs can load trusted local UI plugins without rebuilding PI WEB. Plugins are browser-side ES modules that can add action-palette actions, workspace panels, and workspace-label metadata. They do not run in the session daemon and are not sandboxed.\n\nThe supported package shape is intentionally singular: `piWeb.plugins` entries with explicit `id` and `module`, plus a browser module that exports `{ apiVersion: 1, name, activate }`. The bundled `pi-web-plugins\u002Finfo` TypeScript source is the canonical minimal real example, and `pi-web-plugins\u002Fpi-web` demonstrates a dynamic status panel.\n\nA useful prompt for AI agents:\n\n```text\nBuild a PI WEB plugin for this project. Goal: \u003Cdescribe the UI behavior>.\nBefore coding, read https:\u002F\u002Fpi-web.dev\u002Fplugins.html and https:\u002F\u002Fpi-web.dev\u002Fplugins.md.\nCreate it under ~\u002F.pi-web\u002Fplugins\u002F\u003Cplugin-id> using the documented PI WEB v1 plugin API.\nValidate with \u002Fpi-web-plugins\u002Fmanifest.json and explain reload\u002Fdebug steps.\nDo not modify PI WEB itself.\n```\n\nReload the browser tab after adding or editing a plugin. If `PI_WEB_DATA_DIR` is set, use `$PI_WEB_DATA_DIR\u002Fplugins` instead of `~\u002F.pi-web\u002Fplugins`. Check discovery with:\n\n```bash\ncurl http:\u002F\u002F127.0.0.1:8504\u002Fpi-web-plugins\u002Fmanifest.json\n```\n\nSee the full [Plugin API](docs\u002Fplugins.md) for contribution types, package metadata, and troubleshooting.\n\n## Install\n\nRecommended install uses npm plus native per-user services.\n\n```bash\nnpm install -g @jmfederico\u002Fpi-web\npi-web install\n```\n\nOn Linux servers, `loginctl enable-linger` is optional but recommended so the user systemd manager starts at boot and continues running after logout:\n\n```bash\nsudo loginctl enable-linger \"$USER\"\nloginctl show-user \"$USER\" -p Linger\n```\n\nThis writes and starts PI WEB's session daemon and web\u002FAPI user services. The native user-service backend is selected automatically.\n\nThe generated services run through your detected login shell (`bash`, `zsh`, or `fish` with `-lc`) so they see a shell environment similar to running `pi` from your terminal.\n\nOpen \u003Chttp:\u002F\u002F127.0.0.1:8504>.\n\nUseful commands:\n\n```bash\npi-web status\npi-web logs\npi-web restart\npi-web doctor\npi-web version\npi-web uninstall\n```\n\nUse `pi-web version` to compare the installed package version with the versions reported by the running Web\u002FUI and session daemon services.\n\nOne-line install is also available for users who prefer it:\n\n```bash\ncurl -fsSL https:\u002F\u002Fraw.githubusercontent.com\u002Fjmfederico\u002Fpi-web\u002Fmain\u002Finstall.sh | sh\n```\n\nPI WEB is also published as a Pi package. Installing it through Pi exposes a `\u002Fpi-web` command inside Pi:\n\n```bash\npi install npm:@jmfederico\u002Fpi-web\n```\n\nThen in Pi:\n\n```text\n\u002Fpi-web install\n\u002Fpi-web status\n\u002Fpi-web logs\n\u002Fpi-web restart\n\u002Fpi-web doctor\n\u002Fpi-web version\n```\n\nThe Pi command is a convenience wrapper around the same service installer. When installed this way, the service installer can use PI WEB's package-local server entrypoints, so `pi-web-server` and `pi-web-sessiond` do not need to be on your shell `PATH`. `\u002Fpi-web logs` shows the last 100 service log lines; use `pi-web logs` in a shell when you want to follow logs continuously.\n\nAdvanced users may run the binaries however they prefer:\n\n```bash\npi-web-sessiond\nPI_WEB_PORT=8504 pi-web-server\n```\n\n## Development quick start\n\n```bash\nnpm install\nnpm run dev\n```\n\nOpen the Vite URL, usually \u003Chttp:\u002F\u002Flocalhost:8505>.\n\nDuring development, the static marketing\u002Fdocs site is also served by the Vite dev server at \u003Chttp:\u002F\u002Flocalhost:8505\u002Fsite\u002F>.\n\nFor the recommended split development setup, run these in separate terminals:\n\n```bash\nnpm run dev:sessiond\nnpm run dev:web\nnpm run dev:client\n```\n\nOr install the split development setup as native per-user services from the checkout:\n\n```bash\npi-web install --dev\n```\n\n`pi-web install --dev` writes the session daemon plus a UI development service using the native user-service backend. `pi-web uninstall` removes both production and development service files; no uninstall flags are needed.\n\n`dev:web` also watches bundled plugin TypeScript and rebuilds the browser-loaded plugin JavaScript under `dist\u002Fpi-web-plugins\u002F`. You can restart `dev:web` or `dev:client` without stopping active Pi sessions.\n\n## Production-style run from a checkout\n\n```bash\nnpm run build\nnpm run start:sessiond\nPI_WEB_PORT=8504 npm start\n```\n\n## Packaging and publishing\n\n```bash\nnpm run verify\nnpm run pack:dry\nnpm publish --access public\n```\n\n`prepack` builds `dist\u002F` and bundled plugin JavaScript before npm creates the tarball, and `prepublishOnly` runs verification before publishing. Releases can also be published by the GitHub Actions npm workflow when a GitHub release is published.\n\nPI WEB uses a single-line CalVer-inspired npm version: `MAJOR.YYYYMM.SEQUENCE`, for example `1.202605.1`. The major number signals breaking-change eras; the middle number is the release month; the final number increments for additional releases in that month. Older major eras may be deprecated rather than maintained in parallel.\n\nPI WEB declares `@earendil-works\u002Fpi-coding-agent` as a peer dependency (`>=0.74.0 \u003C1`) and a development dependency for local builds. This keeps published installs flexible: npm 7+ installs the peer automatically, and users can upgrade the Pi package within the compatible range without PI WEB pinning a separate copy.\n\n\nThe web server defaults to `127.0.0.1:8504`. Set `PI_WEB_HOST=0.0.0.0` only when you intentionally want to bind directly on all interfaces.\n\nThe session daemon defaults to a private Unix socket at:\n\n```text\n~\u002F.pi-web\u002Fsessiond.sock\n```\n\nEnvironment variables:\n\n- `PI_WEB_PORT` \u002F `PORT` — web server port. Defaults to `8504`.\n- `PI_WEB_HOST` — web server bind host. Defaults to `127.0.0.1`.\n- `PI_WEB_DATA_DIR` — PI WEB data directory. Defaults to `~\u002F.pi-web`.\n- `PI_WEB_SESSIOND_SOCKET` — Unix socket path used by both the daemon and web process when `PI_WEB_SESSIOND_URL` is not set. Defaults to `$PI_WEB_DATA_DIR\u002Fsessiond.sock`.\n- `PI_WEB_SESSIOND_PORT` — optional TCP port for the daemon. If unset, the daemon listens on the Unix socket instead.\n- `PI_WEB_SESSIOND_HOST` — daemon TCP bind host when `PI_WEB_SESSIOND_PORT` is set. Defaults to `127.0.0.1`.\n- `PI_WEB_SESSIOND_URL` — daemon URL used by the web process when connecting over TCP, for example `http:\u002F\u002F127.0.0.1:3001`. If you set `PI_WEB_SESSIOND_PORT`, set this for the web process too.\n- `PI_WEB_PROJECTS_FILE` — optional override for the projects storage JSON file. Defaults to `$PI_WEB_DATA_DIR\u002Fprojects.json`.\n\n## Development services\n\n`pi-web install --dev` creates a practical local setup with two native per-user services:\n\n- `pi-web-sessiond` runs `npm run start:sessiond` from the checkout without autoreload.\n- `pi-web-ui-dev` runs `npm run dev:web` and `npm run dev:client` for API reloads, bundled plugin rebuilds, and Vite HMR.\n\nUnder the hood, the native backends are systemd user services and LaunchAgents. For reference, an equivalent systemd setup looks like:\n\n```ini\n# ~\u002F.config\u002Fsystemd\u002Fuser\u002Fpi-web-sessiond.service\n[Unit]\nDescription=PI WEB session daemon\n\n[Service]\nType=simple\nWorkingDirectory=\u002Fsrv\u002Fdev\u002Fpi-web\nExecStart=\u002Fbin\u002Fbash -lc 'exec npm run start:sessiond'\nRestart=no\n\n[Install]\nWantedBy=default.target\n```\n\n```ini\n# ~\u002F.config\u002Fsystemd\u002Fuser\u002Fpi-web-ui-dev.service\n[Unit]\nDescription=PI WEB UI dev server\nAfter=pi-web-sessiond.service\nWants=pi-web-sessiond.service\n\n[Service]\nType=simple\nWorkingDirectory=\u002Fsrv\u002Fdev\u002Fpi-web\nExecStart=\u002Fbin\u002Fbash -lc 'trap \"kill 0\" EXIT; npm run dev:web & npm run dev:client & wait'\nRestart=no\n\n[Install]\nWantedBy=default.target\n```\n\nOn Linux servers, enable persistent user services so the user systemd manager starts at boot and remains running after logout:\n\n```bash\nsudo loginctl enable-linger \"$USER\"\nloginctl show-user \"$USER\" -p Linger\n```\n\nInstall or refresh the development services with:\n\n```bash\npi-web install --dev\n```\n\nUseful logs:\n\n```bash\npi-web logs\n```\n\nIf code affecting the session daemon changes, restart it manually:\n\n```bash\npi-web restart\n```\n\n## Current limitations\n\n- Assumes trusted users and trusted server paths.\n- Not a sandbox, permission model, or secure multi-tenant platform.\n- Some Pi TUI slash-command behavior is not yet represented exactly in the web UI.\n- Workspaces are discovered from existing git worktrees; UI-driven worktree management is a natural next step.\n\n## Vision\n\nPI WEB is the beginning of an agent-first development environment:\n\n- agents run persistently on servers;\n- humans connect through the browser;\n- work is organized by projects, workspaces, and sessions;\n- the UI grows around the needs of agentic development rather than the habits of local IDEs.\n\nThe goal is simple: make it practical to run more development remotely, in parallel, with agents as first-class participants and humans focused on direction, judgment, and review.\n\n## License\n\nMIT © 2026 Federico Jaramillo Martinez. See [LICENSE](LICENSE).\n","PI WEB是一个用于远程代理软件开发的Web控制平台，特别针对使用Pi Coding Agent的场景。它允许用户在自己的机器或服务器上运行AI编码代理，并通过浏览器进行管理和控制。核心功能包括并行启动和监督多个编码代理会话、保持会话在断开连接后继续运行、按项目、工作区、分支等组织代理工作以及利用git worktrees隔离并发特性与修复。该项目适合需要跨设备（如笔记本电脑、手机、平板电脑）灵活切换开发环境的开发者，同时也适用于希望将任何服务器转变为以代理为中心的开发中心的企业。技术方面，PI WEB采用TypeScript编写，遵循MIT许可证开放源代码。",2,"2026-06-11 04:04:50","CREATED_QUERY"]