{"_id":"@amber__xxx/pi-web","_rev":"3-35efad141bcc0262a248fb13ac73c40f","name":"@amber__xxx/pi-web","dist-tags":{"latest":"0.8.14"},"versions":{"0.8.12":{"name":"@amber__xxx/pi-web","version":"0.8.12","license":"MIT","_id":"@amber__xxx/pi-web@0.8.12","maintainers":[{"name":"amber__xxx","email":"jin94bingpeng@gmail.com"}],"homepage":"https://github.com/agegr/pi-web#readme","bugs":{"url":"https://github.com/agegr/pi-web/issues"},"bin":{"pi-web":"bin/pi-web.js"},"dist":{"shasum":"59d89e55fa65507652bb4a1228a63af53676cc0d","tarball":"https://registry.npmjs.org/@amber__xxx/pi-web/-/pi-web-0.8.12.tgz","fileCount":625,"integrity":"sha512-UJBaMF7Ij0XTyp+YXrIry0zTzIYKYdt8dvgyvanrH+U7qT6V3XK1JHUkca0+MLAbCwO/bXEqze3+oG85v3AjzQ==","signatures":[{"sig":"MEUCICphVTwhm/L+oT9W3MW4+IpIu+FLWlXmu76fmJnRDPDfAiEAgvOES/Gbeeu2n7Mq5esnss4aexfo4CFZZjfk6HWT+oY=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":29744255},"engines":{"node":">=22.19.0"},"gitHead":"5c07e278fd51a1d13da07354799c53cde841edde","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"},"_npmUser":{"name":"amber__xxx","email":"jin94bingpeng@gmail.com"},"repository":{"url":"git+https://github.com/agegr/pi-web.git","type":"git"},"_npmVersion":"11.17.0","description":"Web UI for the pi coding agent","directories":{},"_nodeVersion":"24.19.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"},"_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.8.2","@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_0.8.12_1788337450839_0.05379064898692976","host":"s3://npm-registry-packages-npm-production"}},"0.8.13":{"name":"@amber__xxx/pi-web","version":"0.8.13","license":"MIT","_id":"@amber__xxx/pi-web@0.8.13","maintainers":[{"name":"amber__xxx","email":"jin94bingpeng@gmail.com"}],"homepage":"https://github.com/agegr/pi-web#readme","bugs":{"url":"https://github.com/agegr/pi-web/issues"},"bin":{"pi-web":"bin/pi-web.js"},"dist":{"shasum":"43d2459361ee42a69d01c78b79c0bcd23ab0449c","tarball":"https://registry.npmjs.org/@amber__xxx/pi-web/-/pi-web-0.8.13.tgz","fileCount":625,"integrity":"sha512-zfgEZiTdyObDrWXc+WoajkDRZ7Dnfji+FGdzHSa+DfIF+HwCY/5DFpoI1cyLj9smgspR/t5w+OwGSurOpZHiqg==","signatures":[{"sig":"MEUCIQDOr+eTk8jwEZPToMOo8f10Sdfql2zItWjNKjarskIjawIgC2crqswjqXwL4CKWgFWxLjTBigXDVAQjn+Z/zoH/oOQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":29659987},"engines":{"node":">=22.19.0"},"gitHead":"5c07e278fd51a1d13da07354799c53cde841edde","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 --registry https://registry.npmjs.org --access public","start:lan":"next start -H 0.0.0.0 -p 30141"},"_npmUser":{"name":"amber__xxx","email":"jin94bingpeng@gmail.com"},"repository":{"url":"git+https://github.com/agegr/pi-web.git","type":"git"},"_npmVersion":"11.17.0","description":"Web UI for the pi coding agent","directories":{},"_nodeVersion":"24.19.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"},"_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.8.2","@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_0.8.13_1788337586070_0.6796777098482314","host":"s3://npm-registry-packages-npm-production"}},"0.8.14":{"name":"@amber__xxx/pi-web","version":"0.8.14","description":"Web UI for the pi coding agent","homepage":"https://github.com/agegr/pi-web#readme","repository":{"type":"git","url":"git+https://github.com/agegr/pi-web.git"},"bugs":{"url":"https://github.com/agegr/pi-web/issues"},"license":"MIT","engines":{"node":">=22.19.0"},"bin":{"pi-web":"bin/pi-web.js"},"scripts":{"dev":"next dev -H 127.0.0.1 -p 30141","dev:lan":"next dev -H 0.0.0.0 -p 30141","build":"next build --webpack","start":"next start -H 127.0.0.1 -p 30141","start:lan":"next start -H 0.0.0.0 -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\"","release":"npm version patch --no-git-tag-version && npm run build && npm publish --registry https://registry.npmjs.org --access public"},"dependencies":{"@earendil-works/pi-agent-core":"0.84.3","@earendil-works/pi-ai":"0.84.3","@earendil-works/pi-coding-agent":"0.84.3","@earendil-works/pi-tui":"0.84.3","ansi_up":"^6.0.6","js-yaml":"^5.2.3","next":"16.3.1","proper-lockfile":"4.1.2","react":"^19.2.4","react-dom":"^19.2.4","remark-frontmatter":"^5.0.0","undici":"8.10.0","web-push":"^3.6.7"},"devDependencies":{"@tailwindcss/postcss":"^4.2.2","@types/js-yaml":"^4.0.9","@types/node":"^25","@types/proper-lockfile":"4.1.4","@types/react":"^19","@types/react-dom":"^19","@types/react-syntax-highlighter":"^15.5.13","@types/web-push":"^3.6.4","eslint":"^9","eslint-config-next":"16.3.1","jiti":"^2.7.0","katex":"^0.16.47","mammoth":"^1.12.0","mermaid":"^11.16.1","postcss":"^8.5.26","react-markdown":"^10.1.0","react-syntax-highlighter":"^16.1.1","rehype-katex":"^7.0.1","rehype-raw":"^7.0.0","rehype-sanitize":"^6.0.0","remark-gfm":"^4.0.1","remark-math":"^6.0.0","tailwindcss":"^4.2.2","typescript":"^5.8.2"},"gitHead":"5c07e278fd51a1d13da07354799c53cde841edde","_id":"@amber__xxx/pi-web@0.8.14","_nodeVersion":"24.19.0","_npmVersion":"11.17.0","dist":{"integrity":"sha512-eRRkPgn5rmUtxps66EgXCRSSEgQ3Ob7tOhEjsMzd4XGXNlo6m9UgHi6gDVIja5cMzxn54EwyQdK41GvmDEZToQ==","shasum":"54beb5bd29b000f539e7445ed44128b15eabecee","tarball":"https://registry.npmjs.org/@amber__xxx/pi-web/-/pi-web-0.8.14.tgz","fileCount":625,"unpackedSize":29744283,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIH4uaWMQHgBTfnYCyaoxXFPYnPGIghUDHA21O5Fm8A6kAiBP/S2WEwRhOL9TljXzvqtER9upKyawni5owqrtTL/m8A=="}]},"_npmUser":{"name":"amber__xxx","email":"jin94bingpeng@gmail.com"},"directories":{},"maintainers":[{"name":"amber__xxx","email":"jin94bingpeng@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/pi-web_0.8.14_1788338138780_0.9247857439690279"},"_hasShrinkwrap":false}},"time":{"created":"2026-09-02T08:24:10.623Z","modified":"2026-09-02T08:35:39.277Z","0.8.12":"2026-09-02T08:24:11.094Z","0.8.13":"2026-09-02T08:26:26.344Z","0.8.14":"2026-09-02T08:35:39.051Z"},"bugs":{"url":"https://github.com/agegr/pi-web/issues"},"license":"MIT","homepage":"https://github.com/agegr/pi-web#readme","repository":{"type":"git","url":"git+https://github.com/agegr/pi-web.git"},"description":"Web UI for the pi coding agent","maintainers":[{"name":"amber__xxx","email":"jin94bingpeng@gmail.com"}],"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 @amber__xxx/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 @amber__xxx/pi-web@latest\npi-web\n```\n\n更新前先用 `Ctrl+C` 停止正在运行的进程，再次执行同一条安装命令。卸载时运行 `npm uninstall -g @amber__xxx/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` | 启用 HTTP Basic Auth，用户名固定为 `pi` | 不启用认证 |\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\nBasic Auth 不会加密传输中的密码。不要通过明文 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 @amber__xxx/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 @amber__xxx/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"}