pi-pocket README

项目的 README,来自 github.com/TannerMidd/pi-pocket。合并为一个 markdown 文件:README.md。

Pi Pocket

Your Pi coding agent, in your pocket.

Start a coding session on your computer, check its diff on your phone, and invite a teammate to the same conversation. Pi runs on your machine, in your project, with your models. No cloud VM required.

Release Node.js 22.19+ MIT license

Quick start · Highlights · Feature tour · Website · Docs

Desktop: review a test diff while another session waits for approval to push. Phone: check in on other sessions with PiP.

Highlights

In the 0.31 beta: optional classification. Relay triage can screen messages from unmarked senders and replies to them. Run outcomes can label a subagent’s or linked session’s report without replacing its answer. Both send text to the classifier provider you choose; with no classifier selected, neither makes a call. Jev Hub shows classifier activity. These features aren’t in the stable install below.

Quick start

With Node.js 22.19 or newer:

npm install -g pi-pocket
pi-pocket

Or try npx pi-pocket. Choose how your devices should connect, then open the launcher’s sign-in link or scan its QR code. Keep that link private: it signs you in as the owner. In the app, open Providers to connect a model provider, or use an existing Pi sign-in. Start a session in the folder you want Pi to work in.

Prefer a desktop app? Download the latest stable release. Both installers include Node.js and install for your account without admin rights. They are unsigned; the platform guides cover verification and first launch.

Updates: Menu → Update Pi Pocket handles supported installs. For local npm installs, npx, or rollback precautions, see updates and backups.

Remote access

Choose local for this machine, lan for a trusted local network (plain HTTP), tailscale or tailscale-serve for your tailnet, or cloudflare for a public HTTPS tunnel that still requires sign-in. The launcher guide lists prerequisites and flags. In the desktop app, use Menu → Sign in another device.

[!WARNING] Anyone who can steer Pi can run commands as your user. A session invite limits what someone sees in the app, not which files Pi can reach. Give steering access only to people you would trust at your keyboard. Security model.

Behind a reverse proxy on a Unix socket

On a shared host, use --socket in a protected directory rather than proxying to a TCP port another user could claim during a restart. See socket permissions, Caddy, and nginx examples.

Development

git clone https://github.com/TannerMidd/pi-pocket.git
cd pi-pocket
npm install
npm start

There’s no build step. Run npm run check for types and API references, npm run lint for style, and npm test for the test suite. Use node test/serve.ts to try changes on an isolated copy. See Contributing, the code map, and safe self-editing.

Limitations

One server process owns the database. Git worktrees separate files; they are not sandboxes. The built-in browser needs a Chromium-based browser on the host. Pi Pocket has its own extension API; Pi CLI extensions do not run unchanged. Full limitations.

Credits and license

Inspired by Mario Zechner’s Pi app demo. Pi Pocket is an independent project, not affiliated with Earendil. MIT; the bundled fonts and dependencies retain their own licenses, including libheif-js (LGPL-3.0). Report a security problem privately.

pi-pocket (TannerMidd/pi-pocket)

正在搜索数据库…

这是什么?Pi Pocket 是一个稳定耐用、支持多人同时使用、以手机为先的网页应用,让你在自己电脑或手机上运行 Pi 编程代理会话,不需要云虚拟机。
这是我自己搭建的服务,还是云端服务?它是自托管应用:你在自己的电脑或手机上运行 Node 启动器,然后通过本地网络、局域网、Cloudflare 快速隧道或 Tailscale 把它暴露出去,而不是连接任何云虚拟机。
怎么把它跑起来?先安装 Node.js 22.19+,用 Pi 登录一个提供商(先运行 pi,再输入 /login),然后运行启动器;它会询问设备之间如何连接,并打印出一个地址、一个登录链接和一个二维码。
我需要先设置好 Pi 编程代理吗?需要。Pi Pocket 只是 Pi 的一个前端界面:它直接复用 Pi 本身的模型运行时、登录、技能和提示词模板,所以你只需按会话选择模型和提供商,不用另外配置后端。
在依赖它之前,最大的坑是什么?同一时间只能有一个服务器进程访问数据库;Pi Durrent 仍是实验性功能,其 API 可能随版本更迭而变化;此外虽然启动器能在 Windows 上运行,但 Windows 支持尚未经过测试。
在手机上真的能用吗?可以。它就是按主屏幕 PWA 设计的:在 Android 上用 Chrome 打开链接,选择“添加到主屏幕”,并运行 termux-wake-lock 让 Termux 在后台保持运行。
一旦我邀请别人加入会话,对方能做多少事?任何被授予 steering(干预)权限的人都能以你的身份在你的电脑上让代理执行命令,访问你的文件以及 Pi Pocket 自身的设置和令牌;只有只读邀请才被限制,不能让 Pi 执行操作。
PiP 是什么?PiP(“Pi in Pocket”,即“口袋里的 Pi”)用 Alt+A 打开,是一个悬浮助手面板:它可以列出、读取、启动你的其他会话并向它们发消息,跟踪它们的运行状态,还能监视一个 GitHub 仓库或 PR 并响应 webhook。
Codemode 是干什么的?Codemode 默认开启,它让 Pi 编写简短的脚本来批量调用自己的工具,而不是一个一个地调用;不过每次调用仍然要经过同样的审批检查。
Lancet Guard 是什么?一个可选扩展(默认关闭),它会让有风险的 bash、写入和编辑调用先等待会话中的某人批准;它依赖 ONNX Runtime,而这个组件在 Android 上可能加载失败。
它为什么自带 Omarchy 主题?它的界面复刻了每一款 Omarchy 桌面主题(也可以实时跟随你的系统主题),采用 Hyprland 风格的平铺窗口和 Walker 风格的启动器,因此在外观上与它一同开发的 Omarchy Linux 环境保持一致。
大小
19.9 MB
星标
861
时长
1个月
提交 · 90 天