{"_id":"@cad0p/pi-web-agegr","_rev":"4-106df1233cb6fe89c43b64ebb52ea83d","name":"@cad0p/pi-web-agegr","dist-tags":{"latest":"0.9.0","next":"0.8.11-20260910.0"},"versions":{"0.8.11":{"name":"@cad0p/pi-web-agegr","version":"0.8.11","license":"MIT","_id":"@cad0p/pi-web-agegr@0.8.11","maintainers":[{"name":"cad0p","email":"dev@pcad.it"}],"homepage":"https://github.com/cad0p/pi-web-agegr#readme","bugs":{"url":"https://github.com/cad0p/pi-web-agegr/issues"},"bin":{"pi-web":"bin/pi-web.js"},"dist":{"shasum":"19c7f20935cc786fdf60e8fc51f199d298d891d8","tarball":"https://registry.npmjs.org/@cad0p/pi-web-agegr/-/pi-web-agegr-0.8.11.tgz","fileCount":620,"integrity":"sha512-KZQ06ixOYsyeOaPJSPNcFdp84U8S0mNQcErK0vsRCEdqwm5lbr/DSVcMCZCrP/d37oFZQCuzpIz7R26Vbkl1Xw==","signatures":[{"sig":"MEUCIGBNTj/zCpgBuiwxIqZ4MsrfSACn2IgZzYVVsIzaa+Y+AiEA196DnrI3d+lJUJiDAER0lCGkxCzeQzewsdknQCUmXh0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":30236000},"engines":{"node":">=22.19.0"},"gitHead":"58ced464769a0c9bcff0754623f1712cc355d516","private":false,"scripts":{"dev":"next dev -H 127.0.0.1 -p 30141","lint":"eslint .","test":"node --experimental-strip-types --test \"app/**/*.test.mjs\" \"components/**/*.test.mjs\" \"hooks/**/*.test.mjs\" \"lib/**/*.test.mjs\" \"public/**/*.test.mjs\"","build":"next build --webpack","start":"next start -H 127.0.0.1 -p 30141","dev:lan":"next dev -H 0.0.0.0 -p 30141","release":"npm version patch --no-git-tag-version && npm run build && npm publish --access public","start:lan":"next start -H 0.0.0.0 -p 30141","prepublishOnly":"next build --webpack"},"_npmUser":{"name":"cad0p","email":"dev@pcad.it"},"repository":{"url":"git+https://github.com/cad0p/pi-web-agegr.git","type":"git"},"_npmVersion":"11.16.0","description":"Web UI for the pi coding agent","directories":{},"_nodeVersion":"24.18.0","dependencies":{"next":"16.3.1","react":"^19.2.4","undici":"8.10.0","ansi_up":"^6.0.6","js-yaml":"^5.2.3","web-push":"^3.6.7","react-dom":"^19.2.4","proper-lockfile":"4.1.2","remark-frontmatter":"^5.0.0","@earendil-works/pi-ai":"0.84.3","@earendil-works/pi-tui":"0.84.3","@earendil-works/pi-agent-core":"0.84.3","@earendil-works/pi-coding-agent":"0.84.3"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org"},"_hasShrinkwrap":false,"devDependencies":{"jiti":"^2.7.0","katex":"^0.16.47","eslint":"^9","mammoth":"^1.12.0","mermaid":"^11.16.1","postcss":"^8.5.26","rehype-raw":"^7.0.0","remark-gfm":"^4.0.1","typescript":"^5","@types/node":"^25","remark-math":"^6.0.0","tailwindcss":"^4.2.2","@types/react":"^19","rehype-katex":"^7.0.1","@types/js-yaml":"^4.0.9","react-markdown":"^10.1.0","@types/web-push":"^3.6.4","rehype-sanitize":"^6.0.0","@types/react-dom":"^19","eslint-config-next":"16.3.1","@tailwindcss/postcss":"^4.2.2","@types/proper-lockfile":"4.1.4","react-syntax-highlighter":"^16.1.1","@types/react-syntax-highlighter":"^15.5.13"},"_npmOperationalInternal":{"tmp":"tmp/pi-web-agegr_0.8.11_1787845337125_0.05411191046030517","host":"s3://npm-registry-packages-npm-production"}},"0.8.11-20260827.0":{"name":"@cad0p/pi-web-agegr","version":"0.8.11-20260827.0","license":"MIT","_id":"@cad0p/pi-web-agegr@0.8.11-20260827.0","maintainers":[{"name":"cad0p","email":"dev@pcad.it"}],"homepage":"https://github.com/cad0p/pi-web-agegr#readme","bugs":{"url":"https://github.com/cad0p/pi-web-agegr/issues"},"bin":{"pi-web":"bin/pi-web.js"},"dist":{"shasum":"8453cd4e37e386212a43f2ba2dc43313098b1085","tarball":"https://registry.npmjs.org/@cad0p/pi-web-agegr/-/pi-web-agegr-0.8.11-20260827.0.tgz","fileCount":620,"integrity":"sha512-6oHTAuhcJX0fNWWKcfKigEQzQPTSe0FFOF9BtjDSoLbHaWkj+ljs1OS1ZS3EpRJ7zn0otUb80HeEjwoQFJX3nQ==","signatures":[{"sig":"MEUCIQDx+5i9NKZRvNxjil9dM8OQ0evniw98Mp41ZaHSmMy7rQIgRf12G2JkYd0g9U3h/83h1ariAVa4Gv3XDOXQUfpzdgg=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":29194247},"engines":{"node":">=22.19.0"},"gitHead":"58ced464769a0c9bcff0754623f1712cc355d516","private":false,"scripts":{"dev":"next dev -H 127.0.0.1 -p 30141","lint":"eslint .","test":"node --experimental-strip-types --test \"app/**/*.test.mjs\" \"components/**/*.test.mjs\" \"hooks/**/*.test.mjs\" \"lib/**/*.test.mjs\" \"public/**/*.test.mjs\"","build":"next build --webpack","start":"next start -H 127.0.0.1 -p 30141","dev:lan":"next dev -H 0.0.0.0 -p 30141","release":"npm version patch --no-git-tag-version && npm run build && npm publish --access public","start:lan":"next start -H 0.0.0.0 -p 30141","prepublishOnly":"next build --webpack"},"_npmUser":{"name":"cad0p","email":"dev@pcad.it"},"repository":{"url":"git+https://github.com/cad0p/pi-web-agegr.git","type":"git"},"_npmVersion":"11.16.0","description":"Web UI for the pi coding agent","directories":{},"_nodeVersion":"24.18.0","dependencies":{"next":"16.3.1","react":"^19.2.4","undici":"8.10.0","ansi_up":"^6.0.6","js-yaml":"^5.2.3","web-push":"^3.6.7","react-dom":"^19.2.4","proper-lockfile":"4.1.2","remark-frontmatter":"^5.0.0","@earendil-works/pi-ai":"0.84.3","@earendil-works/pi-tui":"0.84.3","@earendil-works/pi-agent-core":"0.84.3","@earendil-works/pi-coding-agent":"0.84.3"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org"},"_hasShrinkwrap":false,"readmeFilename":"README.zh-CN.md","devDependencies":{"jiti":"^2.7.0","katex":"^0.16.47","eslint":"^9","mammoth":"^1.12.0","mermaid":"^11.16.1","postcss":"^8.5.26","rehype-raw":"^7.0.0","remark-gfm":"^4.0.1","typescript":"^5","@types/node":"^25","remark-math":"^6.0.0","tailwindcss":"^4.2.2","@types/react":"^19","rehype-katex":"^7.0.1","@types/js-yaml":"^4.0.9","react-markdown":"^10.1.0","@types/web-push":"^3.6.4","rehype-sanitize":"^6.0.0","@types/react-dom":"^19","eslint-config-next":"16.3.1","@tailwindcss/postcss":"^4.2.2","@types/proper-lockfile":"4.1.4","react-syntax-highlighter":"^16.1.1","@types/react-syntax-highlighter":"^15.5.13"},"_npmOperationalInternal":{"tmp":"tmp/pi-web-agegr_0.8.11-20260827.0_1787845379092_0.06277331192329383","host":"s3://npm-registry-packages-npm-production"}},"0.8.11-20260910.0":{"name":"@cad0p/pi-web-agegr","version":"0.8.11-20260910.0","license":"MIT","_id":"@cad0p/pi-web-agegr@0.8.11-20260910.0","maintainers":[{"name":"cad0p","email":"dev@pcad.it"}],"homepage":"https://github.com/cad0p/pi-web-agegr#readme","bugs":{"url":"https://github.com/cad0p/pi-web-agegr/issues"},"bin":{"pi-web":"bin/pi-web.js"},"dist":{"shasum":"83b0be7e6c422b738eee3d05a90236e59a51913a","tarball":"https://registry.npmjs.org/@cad0p/pi-web-agegr/-/pi-web-agegr-0.8.11-20260910.0.tgz","fileCount":668,"integrity":"sha512-UT1nOjWFSDVVTD3yQPIAmA3VSKAVz5Eg0Ewgu3nhjskj6zbxAwfDYS95laCJt0K+5wY7V3Xjp1IK7R59CZ5T/w==","signatures":[{"sig":"MEQCIBqIH7OVolzc1idfC8NaVBrwxDXIYvM/EeUZOwthMwObAiBnemQzaBZxjUiJYujkxkchMameUqmKLUm7RFHGftRGuQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEQCID93jXnULl6wW5EggsPdDTKi3nB/S74cKE8RE0Ap2HOqAiAdRZZK3jwXcG58q86wt08AlNuHxpjBGq+rm0zeSSVqQw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@cad0p%2fpi-web-agegr@0.8.11-20260910.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":32117121},"engines":{"node":">=22.19.0"},"gitHead":"81ee6b197fe5654f0021670434ada18e22fac523","private":false,"scripts":{"dev":"next dev -H 127.0.0.1 -p 30141","lint":"eslint .","test":"node --experimental-strip-types --test \"app/**/*.test.mjs\" \"components/**/*.test.mjs\" \"hooks/**/*.test.mjs\" \"lib/**/*.test.mjs\" \"public/**/*.test.mjs\"","build":"next build --webpack","start":"next start -H 127.0.0.1 -p 30141","dev:lan":"next dev -H 0.0.0.0 -p 30141","release":"npm version patch --no-git-tag-version && npm run build && npm publish --access public","test:e2e":"node e2e/run.mjs","start:lan":"next start -H 0.0.0.0 -p 30141","postinstall":"node bin/prepare-terminal.js","test:terminal":"node e2e/terminal.mjs","prepublishOnly":"next build --webpack"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:12f1a0c0-d81c-420c-8989-9992be391ddc"}},"repository":{"url":"git+https://github.com/cad0p/pi-web-agegr.git","type":"git"},"_npmVersion":"11.19.0","description":"Web UI for the pi coding agent","directories":{},"_nodeVersion":"24.20.0","dependencies":{"next":"16.3.1","react":"^19.2.4","semver":"7.8.0","undici":"8.10.0","ansi_up":"^6.0.6","js-yaml":"^5.2.3","node-pty":"1.2.0-beta.15","web-push":"^3.6.7","react-dom":"^19.2.4","@xterm/xterm":"6.0.0","proper-lockfile":"4.1.2","@xterm/addon-fit":"0.11.0","remark-frontmatter":"^5.0.0","@earendil-works/pi-ai":"0.85.1","@earendil-works/pi-tui":"0.85.1","@earendil-works/pi-agent-core":"0.85.1","@earendil-works/pi-coding-agent":"0.85.1"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org"},"_hasShrinkwrap":false,"readmeFilename":"README.zh-CN.md","devDependencies":{"jiti":"^2.7.0","katex":"^0.16.47","eslint":"^9","mammoth":"^1.12.0","mermaid":"^11.16.1","postcss":"^8.5.26","playwright":"^1.62.1","rehype-raw":"^7.0.0","remark-gfm":"^4.0.1","typescript":"^5","@types/node":"^25","remark-math":"^6.0.0","tailwindcss":"^4.2.2","@types/react":"^19","rehype-katex":"^7.0.1","@types/semver":"7.8.0","@types/js-yaml":"^4.0.9","react-markdown":"^10.1.0","@types/web-push":"^3.6.4","rehype-sanitize":"^6.0.0","@types/react-dom":"^19","eslint-config-next":"16.3.1","@tailwindcss/postcss":"^4.2.2","@types/proper-lockfile":"4.1.4","react-syntax-highlighter":"^16.1.1","@types/react-syntax-highlighter":"^15.5.13"},"_npmOperationalInternal":{"tmp":"tmp/pi-web-agegr_0.8.11-20260910.0_1789057121695_0.6684826868733924","host":"s3://npm-registry-packages-npm-production"}},"0.9.0":{"_id":"@cad0p/pi-web-agegr@0.9.0","bin":{"pi-web":"bin/pi-web.js"},"bugs":{"url":"https://github.com/cad0p/pi-web-agegr/issues"},"dist":{"shasum":"66b4487e4af347981978859561d5cf46923223ff","tarball":"https://registry.npmjs.org/@cad0p/pi-web-agegr/-/pi-web-agegr-0.9.0.tgz","fileCount":668,"integrity":"sha512-qql6TWL3qlWWSNBihck8nP4KVsHSCBhewl+WopnFJOKBaw50Dqm+s1gpWGFZNwTZmgm+JU3PRoYxIZFHwNRvjQ==","signatures":[{"sig":"MEYCIQDH/Srmv8cpXf7IZ/5qeOCWFxi4NeIavwx8/08fXS14HQIhANn/ILZ8+vwUIcN+8uM2Ex0rvV/hz9dGEnLSJA98SSUo","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCICyTF7PbZbOx9LvtQp8i6bdDEkPFmNjoOgHR2bI95b3xAiEApHDilKG/TeDhMX+lEADCORzaYmsTMChYisN3wYyInEI="}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@cad0p%2fpi-web-agegr@0.9.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":31923302},"name":"@cad0p/pi-web-agegr","engines":{"node":">=22.19.0"},"gitHead":"6acf2fd8723480919f167becc0ae246aca55a832","license":"MIT","private":false,"scripts":{"dev":"next dev -H 127.0.0.1 -p 30141","lint":"eslint .","test":"node --experimental-strip-types --test \"app/**/*.test.mjs\" \"components/**/*.test.mjs\" \"hooks/**/*.test.mjs\" \"lib/**/*.test.mjs\" \"public/**/*.test.mjs\"","build":"next build --webpack","start":"next start -H 127.0.0.1 -p 30141","dev:lan":"next dev -H 0.0.0.0 -p 30141","release":"npm version patch --no-git-tag-version && npm run build && npm publish --access public","test:e2e":"node e2e/run.mjs","start:lan":"next start -H 0.0.0.0 -p 30141","postinstall":"node bin/prepare-terminal.js","test:terminal":"node e2e/terminal.mjs","prepublishOnly":"next build --webpack"},"version":"0.9.0","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:12f1a0c0-d81c-420c-8989-9992be391ddc"}},"homepage":"https://github.com/cad0p/pi-web-agegr#readme","repository":{"url":"git+https://github.com/cad0p/pi-web-agegr.git","type":"git"},"_npmVersion":"11.19.0","description":"Web UI for the pi coding agent","directories":{},"maintainers":[{"name":"cad0p","email":"dev@pcad.it"}],"_nodeVersion":"24.20.0","dependencies":{"next":"16.3.1","react":"^19.2.4","semver":"7.8.0","undici":"8.10.0","ansi_up":"^6.0.6","js-yaml":"^5.2.3","node-pty":"1.2.0-beta.15","web-push":"^3.6.7","react-dom":"^19.2.4","@xterm/xterm":"6.0.0","proper-lockfile":"4.1.2","@xterm/addon-fit":"0.11.0","remark-frontmatter":"^5.0.0","@earendil-works/pi-ai":"0.85.1","@earendil-works/pi-tui":"0.85.1","@earendil-works/pi-agent-core":"0.85.1","@earendil-works/pi-coding-agent":"0.85.1"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org"},"_hasShrinkwrap":false,"devDependencies":{"jiti":"^2.7.0","katex":"^0.16.47","eslint":"^9","mammoth":"^1.12.0","mermaid":"^11.16.1","postcss":"^8.5.26","playwright":"^1.62.1","rehype-raw":"^7.0.0","remark-gfm":"^4.0.1","typescript":"^5","@types/node":"^25","remark-math":"^6.0.0","tailwindcss":"^4.2.2","@types/react":"^19","rehype-katex":"^7.0.1","@types/semver":"7.8.0","@types/js-yaml":"^4.0.9","react-markdown":"^10.1.0","@types/web-push":"^3.6.4","rehype-sanitize":"^6.0.0","@types/react-dom":"^19","eslint-config-next":"16.3.1","@tailwindcss/postcss":"^4.2.2","@types/proper-lockfile":"4.1.4","react-syntax-highlighter":"^16.1.1","@types/react-syntax-highlighter":"^15.5.13"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/pi-web-agegr_0.9.0_1789057746345_0.2645425117180047"}}},"time":{"created":"2026-08-27T15:42:16.990Z","modified":"2026-09-10T16:29:06.970Z","0.8.11":"2026-08-27T15:42:17.370Z","0.8.11-20260827.0":"2026-08-27T15:42:59.432Z","0.8.11-20260910.0":"2026-09-10T16:18:41.934Z","0.9.0":"2026-09-10T16:29:06.576Z"},"bugs":{"url":"https://github.com/cad0p/pi-web-agegr/issues"},"license":"MIT","homepage":"https://github.com/cad0p/pi-web-agegr#readme","repository":{"url":"git+https://github.com/cad0p/pi-web-agegr.git","type":"git"},"description":"Web UI for the pi coding agent","maintainers":[{"name":"cad0p","email":"dev@pcad.it"}],"readme":"# Pi Web\n\n[English](./README.md) | [日本語](./README.ja.md) | [Русский](./README.ru.md)\n\n[pi 编程智能体](https://github.com/earendil-works/pi)的本地浏览器界面。Pi Web 与 pi 共用本机配置和会话文件，可在浏览器中查找和继续对话、运行智能体、配置模型与资源，并查看项目文件。\n\n中文微信群：请查看 [GitHub Discussions 帖子](https://github.com/agegr/pi-web/discussions/271)。\n\n![Pi Web 展示包含结构化 Markdown、工具调用和项目导航的 pi 会话](https://raw.githubusercontent.com/agegr/pi-web/main/docs/screenshot2.png)\n\n## 功能\n\n- **会话工作区**：按项目查找、继续、重命名、导出和删除对话，并查看运行状态、上下文占用、花费和压缩信息。\n- **两种分支方式**：**新会话**会从较早的消息创建独立会话文件；**从此处编辑**会在当前会话内创建分支。\n- **项目文件工具**：浏览和上传文件、查看 Git Diff，并预览源码、Markdown、图片、音频、PDF 和 DOCX；文件变化后会自动刷新。\n- **Git worktree**：从侧边栏切换 checkout，同时把同一仓库不同 worktree 的会话归在一起。\n- **网页配置**：无需离开 Pi Web，即可管理 Provider 登录和 API Key、模型、模型测试、插件包及技能。\n- **英文、简体中文和繁体中文界面**：Pi Web 首次打开时跟随浏览器语言，也可从顶部栏切换语言。\n\n## 快速开始\n\nPi Web 要求 Node.js 22.19.0 或更高版本。先用 `node --version` 检查版本，然后运行：\n\n```bash\nnpx @agegr/pi-web@latest\n```\n\n服务就绪后，命令行会尝试自动打开浏览器。如果没有打开，请访问 [http://127.0.0.1:30141](http://127.0.0.1:30141)。Pi Web 默认仅监听 `127.0.0.1`。\n\n如果尚未配置模型 Provider，请打开**模型（Models）**面板登录或添加 API Key。\n\n如需全局安装 `pi-web` 命令：\n\n```bash\nnpm install -g @agegr/pi-web@latest\npi-web\n```\n\n更新前先用 `Ctrl+C` 停止正在运行的进程，再次执行同一条安装命令。卸载时运行 `npm uninstall -g @agegr/pi-web`。\n\n## 配置\n\n端口和主机名以命令行参数为准，优先于对应的环境变量。`--no-open` 与 `PI_WEB_NO_OPEN=1` 中任意一个都会关闭自动打开浏览器。运行 `pi-web --help`（或 `-h`）可打印启动选项并以退出码 0 结束，不会启动服务；未知参数会报错并以退出码 1 结束。\n\n| 参数或环境变量 | 用途 | 默认值 |\n| --- | --- | --- |\n| `--help`、`-h` | 打印启动选项并退出 | — |\n| `--port <端口>`、`-p <端口>` 或 `PORT` | 服务端口 | `30141` |\n| `--hostname <主机>`、`-H <主机>` 或 `PI_WEB_HOSTNAME` | 监听主机名 | `127.0.0.1` |\n| `--no-open` 或 `PI_WEB_NO_OPEN=1` | 不自动打开浏览器 | 自动打开 |\n| `PI_WEB_ALLOWED_HOSTS` | 额外允许的代理或自定义主机名，多个值用逗号分隔，必须精确匹配 | 未设置 |\n| `PI_WEB_PASSWORD` | 启用浏览器密码登录；API 客户端可使用用户名为 `pi` 的 Basic Auth | 不启用认证 |\n\n例如：\n\n```bash\npi-web --help\npi-web -p 8080 -H 0.0.0.0 --no-open\n```\n\n### 远程访问\n\n监听非回环地址会暴露一个可执行高权限操作的智能体。在可信局域网中使用时，请设置足够长的随机密码：\n\n```bash\nPI_WEB_PASSWORD='足够长的随机密码' pi-web --hostname 0.0.0.0\n```\n\n密码认证不会加密连接。不要通过明文 HTTP 将 Pi Web 暴露到互联网；远程访问应使用可信反向代理提供 HTTPS，或通过可信 VPN。如果反向代理传递外部主机名，请把该名称精确加入 `PI_WEB_ALLOWED_HOSTS`。这个白名单不会改变 Pi Web 的监听地址。\n\n### HTTP 代理\n\n服务端的模型和 API 请求会读取标准的 `HTTP_PROXY`、`HTTPS_PROXY` 和 `NO_PROXY` 环境变量。\n\nmacOS 或 Linux：\n\n```bash\nHTTP_PROXY=http://127.0.0.1:7890 \\\nHTTPS_PROXY=http://127.0.0.1:7890 \\\nNO_PROXY=localhost,127.0.0.1 \\\nnpx @agegr/pi-web@latest\n```\n\nWindows PowerShell：\n\n```powershell\n$env:HTTP_PROXY = \"http://127.0.0.1:7890\"\n$env:HTTPS_PROXY = \"http://127.0.0.1:7890\"\n$env:NO_PROXY = \"localhost,127.0.0.1\"\nnpx @agegr/pi-web@latest\n```\n\n## 注意事项\n\n- **智能体数据**：Pi Web 默认读取 `~/.pi/agent` 下的 pi 数据，包括 `sessions/<编码后的工作目录>/<时间戳>_<uuid>.jsonl` 中的会话文件。可通过 `PI_CODING_AGENT_DIR` 指定其他 pi agent 目录。\n- **文件系统访问**：Pi Web 必须能读取智能体数据目录及会话记录中的工作目录。与现有 pi 会话共用数据时，请让 Pi Web 运行在与 pi 相同的文件系统环境中。\n- **共享配置**：模型面板使用 pi 的模型、设置和凭据存储，因此两种界面都能看到相关更改。\n- **文件访问边界**：文件浏览器仅能访问在 Pi Web 中选择过的工作目录，以及它已识别的项目或会话根目录；它不是通用的文件系统浏览器。\n- **Git worktree**：切换器何时显示、如何创建 worktree，以及删除会产生什么影响，见 [Pi Web 里的 Worktree](./docs/worktrees.zh-CN.md)。\n\n## 开发\n\n```bash\nnpm install\nnpm run dev\n```\n\n开发服务器运行在 [http://127.0.0.1:30141](http://127.0.0.1:30141)。常用检查命令：\n\n```bash\nnpm test\nnode_modules/.bin/tsc --noEmit\nnpm run lint\n```\n\n日常开发时不要运行 `next build` 或 `npm run build`。它们会写入 `.next/`，可能干扰开发服务器；仅在发布流程中执行构建。\n\n贡献者文档：[国际化](./docs/i18n.md)和[发布流程](./docs/release.md)。\n\n## 仓库结构\n\n```text\napp/             Next.js 界面和 API 路由\ncomponents/      React 界面组件\nhooks/           客户端状态和交互 hooks\nlib/             会话、智能体、模型、文件、Git 和安全逻辑\npublic/          静态资源和 PWA 文件\nbin/             npm CLI 入口及启动参数解析\ndocs/            面向用户和贡献者的专题文档\n```\n\n架构说明和详细文件地图见 [AGENTS.md](./AGENTS.md)。\n\n## 许可证\n\n[MIT](./LICENSE)\n","readmeFilename":"README.zh-CN.md"}