从源码构建需要 Node.js ≥ 22.19;应用自带 pi SDK,但首次仍需像终端 pi 一样登录模型提供方;扩展需在 ~/.pi/agent/settings.json 的 packages 中启用并新开会话才生效。
pi-app
justhilMIT活跃维护pi 编程 Agent 的跨平台桌面客户端,提供流式时间线、按 hunk 暂存的 Git 审查、会话树和扩展原生界面,让编码 Agent 的日常使用更顺手。
Desktop app for the pi coding agent: streaming timeline, Git review with hunk staging, session tree, native UI for pi extensions. Windows · macOS · Linux. pi 编程 Agent 桌面客户端
git clone https://github.com/justhil/pi-app.git
cd pi-app
npm install
npm run devREADME 未说明显存或 GPU 要求;桌面端支持 Windows x64、macOS(Apple Silicon 与 Intel)、Linux x64,另有 Android 9+ arm64 手机端。
pi 编程 Agent 的桌面客户端,复用终端同一份会话与配置,补上时间线与 Git 审阅
pi 编程 Agent 的跨平台桌面客户端,提供流式时间线、按 hunk 暂存的 Git 审查、会话树和扩展原生界面,让编码 Agent 的日常使用更顺手。
核心能力
- 在后台 worker 中运行 pi SDK,与 CLI 共享 ~/.pi/agent 会话和登录
- 工具调用以流式时间线展示,可回退或从消息分叉新会话
- 按本轮、本会话或整个工作区查看 Git diff,并逐个 hunk 暂存
- 每个会话独立 worker,可并行运行多个会话
- 内置终端支持多标签与最多四格分屏,输出可一键送入输入框
容易踩的坑
- v0.7.7最新正式版2026-10-25 · 2026-10-25 06:54 UTC
pi Desktop v0.7.7
修复
- 分屏会话:Windows 上从侧栏 Ctrl+点击,在旁边打开另一个会话时,原窗格不再被一起替换,左右窗格保持各自的会话
- 回复截断:长回复输出时切走再切回,不再只显示开头一部分;刷新历史时也会保留已经收到的完整内容(#130)
- 会话切换:消息、运行状态、模型与思考强度、排队消息等按会话分别保存,减少切换时内容和状态串到其他会话的问题;删除会话或草稿转为正式会话后,也会清理旧状态(#129)
- Windows MCP:启动命令不存在时明确提示缺失的命令,不再只显示连接关闭;修复可执行文件扩展名大小写导致的命令识别问题
- 依赖安全:更新 DOMPurify,修复已知安全问题(#131)
优化
- 代码高亮加载:语法和主题资源拆分为按需加载,不再全部打进同一个高亮资源包
安装包见本页 Assets。更新说明以本正文为准(应用内「发现新版本」弹窗会展示)。
- v0.7.62026-10-19 · 2026-10-19 13:51 UTC
查看更新说明
pi Desktop v0.7.6
优化
- 上下文用量:输入框、运行面板和 Context 面板统一使用 pi SDK 返回的 token 用量与模型容量,不再按字符数估算已加载会话的占用;切换模型后会刷新容量,压缩后用量暂未确定时不再显示旧数字
修复
- Windows SDK 升级:设置里选择版本后点「升级并切换」没有反应、独立 SDK 始终安装不上;现在能正确启动系统 npm,安装失败后也可以重试(#125)
- 会话切换与新对话:切换会话后仍显示上一个会话的运行状态、发送被阻塞;创建新对话或运行中刷新历史时串入其他会话的内容;回到已回退的会话后丢失当前分支
- 完成通知:点击通知回到当前会话时,正在输出的回复不再停住;只读子会话点击「继续」也能正常退出预览状态
- 排队消息:已经处理的消息,切走再回来后不再重新显示为排队
- 思考强度:在新会话中调整强度不再误改后台运行中的会话;手动选择的强度不再被延迟返回的默认值覆盖
- 斜杠命令:恢复输入框的命令菜单,
/compact会真正压缩当前会话,而不是只显示完成提示 - 活动标题:Worker 退出后,活动列表里的会话标题仍能正确恢复
- WSL Git:打开 WSL 会话后能正确识别项目仓库,分支选择器正常列出分支
- 网页粘贴:从 GitHub 等网页复制日志到输入框时,不再插入多余空行
安装包见本页 Assets。更新说明以本正文为准(应用内「发现新版本」弹窗会展示)。
- v0.7.52026-10-11 · 2026-10-11 16:37 UTC
查看更新说明
pi Desktop v0.7.5
新增
- 链接右键菜单与悬停预览:回复里的网页链接可以右键在外部浏览器打开或复制地址,鼠标停留片刻会弹出卡片,显示域名、网页标题、摘要和分享图;文件链接右键可以打开文件、在文件夹中显示或复制路径,悬停卡片显示文件名和完整路径。工作区内的文件在 Files 面板里预览并定位到引用的行,工作区外的文件用系统默认程序打开;Windows、WSL 路径以及带中文、空格的文件名都能识别
修复
- 冷启动后点开输入框的模型选择器,经常显示「无可用模型」:启动初期模型列表还没准备好时拿到的空结果不再被当成最终结果,会自动重试几次;等待期间显示「正在加载模型…」
- 新对话发送第一条消息时卡住不动(项目有未提交改动并开启 Dirty Repo Guard 时会多弹一次确认);发送失败或取消后,已清空的输入和附件现在会恢复到输入框
- 从别的项目点进另一个项目的「新会话」,之前写好的草稿不显示,要再进一次才出现
- 新对话里删光文字后继续按退格,空行越删越多,后面输入的内容落到提示文字下方
安装包见本页 Assets。更新说明以本正文为准(应用内「发现新版本」弹窗会展示)。
- v0.7.42026-10-08 · 2026-10-08 14:46 UTC
查看更新说明
pi Desktop v0.7.4
新增
- 我的 Chrome:Agent 可以直接操作你自己的 Chrome,用上你已有的登录状态和扩展。在「设置 → 浏览器」里加载 pi 扩展、粘贴配对码即可;Agent 的标签页开在单独的 pi 窗口里,不打扰你正在用的窗口,借用你已打开的标签页需要你确认,用完交还给你。遇到 Cloudflare 这类人机验证的网站,用自己的 Chrome 更容易通过。输入框工具菜单里可以三选一:关闭 / 内置浏览器 / 我的 Chrome;右侧浏览器面板会标明当前用的是哪个
- Agent 请你帮忙:遇到验证码、登录或需要你拍板的操作(付款、发帖、删除等),Agent 会在浏览器面板上方(用自己的 Chrome 时显示在输入框上方,并弹出 Chrome 通知)请你处理,你点「完成」或「允许 / 拒绝」后它接着做
- 站点笔记:Agent 在某个网站上摸索出的经验(比如某个按钮要先悬停才出现)会记下来,下次访问同一网站时自动带上;可在「设置 → 浏览器」查看和删除
- 浏览器新能力:能操作跨域 iframe 里的元素、看到一闪而过的提示消息、识别并应答页面弹窗(alert / confirm);悬停才出现的菜单可以自动探测;整页截图、按截图坐标点击、下载文件、保存 PDF、模拟手机尺寸;查看网络请求和控制台;一次调用连续执行多步操作
优化
- 浏览器更省 token:长列表自动折叠成「… 还有 N 项」,操作后只返回页面变化的部分,文章可按纯文本读取。实测 Hacker News 首页的页面内容缩到原来的约 1/7,Wikipedia 长条目缩到约 1/3(纯文本模式约 1/4);每次请求附带的浏览器工具说明从约 1600 token 降到约 1300。长会话里较早的页面状态不再反复发给模型(会话记录仍完整保留),超大页面可以整页存成文件再按需读取
- 工具调用折叠:折叠后的工具组只占一行,失败的调用以数量显示在这一行上,不再在下面列出好几行
- 扩展适配器:按常用扩展的当前版本重写:pi-goal-x 新增适配(目标的任务列表显示在输入框上方,设置页可改自主续跑、任务、审核模型等);pi-cache-optimizer 的开关改为写入扩展真正读取的配置文件(之前只存在桌面本地、不生效);pi-search 搜索模式改为当前的 auto / coding_docs 等,新增 API 协议、思考等级和 Context7 缓存时长;pi-image-gen 去掉已移除的审图开关;magic-context 覆盖全部 ctx_* 工具和命令;pi-subagents 可设置默认后台运行、子代理上下文和 worktree;/context 直接打开桌面 Context 面板;带参数的扩展命令(如
/image-gen generate …、/cache-optimizer status)不再被设置页拦截 - MCP 工具调用:时间线里显示为「服务器/工具 · 参数摘要」并带插头图标,不再是
mcp__服务器__工具原名;展开可看调用参数和结果(JSON 自动格式化),输出过长被截断时给出完整输出文件并可直接打开;恢复旧会话、服务器未连接时也按同样方式显示
修复
- 新对话时打开底部终端,输入框会被顶到标题上面:现在输入框按聊天区居中
- 长回复进行中切换会话,回来后自己发的消息不见了;向上加载历史时正在输出的消息丢失;切换会话后残留上一个会话的历史
- 从托盘图标或系统通知无法恢复已最小化 / 隐藏的主窗口
- 回复里指向本地 Markdown 文件的链接现在在工作区预览中打开;引用来源可以点开,并高亮对应的行
- 「活动」里跨项目的会话标题显示不对、点了跳不过去
注意
- 「我的 Chrome」需要在 Chrome 里手动加载 pi 扩展(设置页有「打开扩展文件夹」按钮),开启后 Chrome 顶部会显示「正在调试此浏览器」,这是正常的
安装包见本页 Assets。更新说明以本正文为准(应用内「发现新版本」弹窗会展示)。
- v0.7.32026-10-06 · 2026-10-06 18:20 UTC
查看更新说明
pi Desktop v0.7.3
新增
- 内置终端:按 Ctrl+`(或点状态栏右下角的终端图标)从聊天区下方拉出终端,可拖动调整高度;支持多标签,每个标签最多左右并排 4 栏,分隔线可拖动调宽,分栏时可用每栏的 ✕ 或 Ctrl+Shift+W(macOS 为 ⌘W)单独关闭一栏;收起后进程和输出都还在,已退出的终端按 Enter 原地重启。默认使用 pi 执行命令时用的同一个外壳(Windows 上为 Git Bash),PATH 里带上 pi 自带的工具;也可以从「+」菜单选择 PowerShell 7、Windows PowerShell、命令提示符、各个 WSL 发行版,或 zsh、fish 等。GPU 渲染、配色跟随主题,中文和 emoji 对齐;Ctrl+Shift+C / V 复制粘贴,有选区时 Ctrl+C 也是复制,Ctrl+Shift+F 查找,链接可点击;粘贴图片会存成文件并输入路径;选中的输出可以一键放进输入框。还有终端在运行时关闭窗口会先确认
- 用量页:「设置 → 用量」统计本机所有 pi 会话的 token 与费用(终端 pi 的会话和自定义
sessionDir也算在内,复制进分叉会话的回复只计一次),可选今天、7 天、30 天、90 天、一年或全部:总费用、token、请求数、缓存命中率、日均与单次平均、有使用的天数、费用最高的一天;按天的输入 / 缓存 / 输出堆叠柱状图(悬停可看每一层的占比,图例可开关),日历热力图和按星期 × 小时的热力图,以及按模型、按项目、费用最高的会话排行,点击会话可直接打开。费用按模型条目里设置的价格计算 - 手机在外网也能连:电脑和手机加入同一个 Tailscale、ZeroTier 或 WireGuard 网络后,离开家里或办公室的局域网也能连接。二维码会带上组网地址(包括 macOS 上的 Tailscale)和 Tailscale 的
*.ts.net域名;手机的主机列表可以手动添加地址;「设置 → 手机连接」会标注每个地址是局域网还是组网 - 手机查看改动:会话面板的「改动」查看整个工作区相对上次提交的改动,点回复下方的文件可查看本轮对它的改动;diff 带行号和增删底色。长按某一行开始选择,点其他行扩大范围后写批注,可以写多条,最后一起放进输入框,不会自动发送
- 手机端分支与分叉:会话面板的「分支」列出回退或改写后留下的各个分支(最后的提问和回复、轮数、从哪里分出),点一下就能切换;长按自己的消息选择「从这里分叉」,会在新会话里接着这条之前的内容继续
- 手机会话费用:会话面板显示本会话的累计费用和请求数
- 分支切换:状态栏左侧显示当前项目的分支、未提交改动和领先 / 落后数;点开可以搜索本地和远端分支、切换或新建分支(命令面板里也有「切换分支…」)。改动能带过去时直接带到新分支;会被覆盖时可以先暂存,回到原分支时提示恢复。项目里有会话在运行时会先确认
- 主题重做:外观设置改为预设卡片,新增内置 Claude 主题(浅色暖米白、深色暖炭灰,标题和回复用衬线体)。可单独设置侧栏、聊天区、你的消息、代码块、边框的颜色,标题 / 回复字体,聊天字号和行高,圆角和阴影;这些都是 CSS 变量,自定义 CSS 旁边列出了可用变量。主题字符串会带上这些新设置
- 背景图:「设置 → 外观 → 背景图」可以在窗口后面放一张图片,浅色深色分开或共用。图片可调强度、模糊、亮度、饱和度和暗角,以及适配方式;面板可选磨砂、液态玻璃或通透三种材质,并调整不透明度和模糊。默认聊天区和右侧栏几乎不透明,打开「透出整个界面」后背景会透过所有面板;还可以单独调整聊天区和右侧栏的不透明度、材质和模糊。菜单、弹窗和代码块始终保持不透明
- 手机 App 语言:默认英文、跟随系统语言,菜单里可以单独选「跟随系统 / English / 简体中文」;Android 13 及以上与系统的「应用语言」设置同步
- 手机首页下拉刷新:在会话列表下拉即可重新同步会话状态,电脑上做过但没自动推送到手机的改动也会补上;未连接时下拉会立即重连
优化
- 手机 App 发布:APK 改为在 CI 中构建并正式签名,安装包
pi-remote-0.7.3-android-arm64.apk与桌面安装包一起附在本版 Release 中,并列入 SHA256SUMS - README:重新整理,补充内置终端、分支、用量、主题与背景图、手机 App 的演示
修复
- CI:Windows 检出时,行尾差异不再导致构建产物检查失败;分栏的端到端测试与当前布局一致;Node 25 及以上版本可直接运行单元测试
- 依赖安全:升级了一批有安全修复的依赖
- 手机会话面板刚配对后偶尔为空:现在会等连接就绪并自动重试
- 手机端展开待办列表时会把对话往上推:现在列表浮在对话上层,按返回键可收起
- 手机端模型名过长会把发送键挤出屏幕:输入框下方工具栏现在优先保留停止和发送键,窄屏时思考档位只显示图标,模型名过长时用省略号截断;首页主机名、会话页副标题、待办标题同样不会再挤掉旁边的按钮
注意
- 手机 App 需要卸载重装:手机 App 从调试签名改为正式签名,从 0.7.1 升级时需要先卸载旧版再安装新版,然后重新扫码配对;以后的版本可以直接覆盖升级
- 手机 App 和桌面端请同时升级到 0.7.3,查看改动、分支与分叉、会话费用等新功能需要两端版本一致
- 在外网使用需要两端都装好并登录同一个组网工具;pi 不提供中继服务器,也不支持直接连公网地址
安装包见本页 Assets。更新说明以本正文为准(应用内「发现新版本」弹窗会展示)。
用户点评
登录用户的真实使用记录,可按版本和硬件筛选还没有人点评。第一个说出真实体验的人最有价值。
pi Desktop
A desktop app for the pi coding agent.
The same agent and the same ~/.pi/agent you use in the terminal — with a timeline, Git review, a built-in terminal, and an Android app to keep going from your phone.
English · 简体中文 · Download · Getting started · Adapters
pi Desktop is not another agent. It runs the pi SDK in a background worker and reads the same files as the CLI — sessions, model logins, settings.json, installed extensions. Open a project and the sessions you started in the terminal are already in the sidebar; continue any of them, or start a new one.
At a glance
One turn, start to finish
Recorded from the app itself. The model replies come from a scripted local endpoint so the demo is reproducible; the bash, read and edit tools ran for real on the sample repo.
Timeline
Tool calls stream in as flat steps — thinking, commands, reads, edits — and fold into one summary line once the answer starts. Each edit shows +N −M; the turn ends with a Files changed card that opens the file in Files or Review.
Markdown, code blocks, KaTeX and long outputs render in place. Hover a message to copy it, rewind to it, or fork a new session from it.
Review
Pick a scope — this turn, this session, or the whole Git working tree — and expand a file for its diff; drag the sidebar wider for a side-by-side view. Hunks can be staged or unstaged one at a time, and a line comment goes straight back into the conversation.
Files
- Browse the project next to the chat;
Ctrl/⌘+click opens a file in another tab. - The gutter button quotes
path:lineinto the composer as a reference. - Expand preview gives the file the whole chat column; click again to go back. Drag a file onto the composer to attach it.
Composer
@searches project files (respects.gitignore, usesfd) and inserts them as references./lists pi's built-in commands and the ones your extensions register.- Paste or drop images and files; model and thinking level sit at the right of the input.
- While the agent is working,
Entersteers the current turn andAlt+Enterqueues a follow-up for when it finishes.
Parallel sessions
Each session runs in its own worker. Start a turn, open another session and start a second one: both keep going, the sidebar marks the ones that are working and the status bar counts them. Settings → General sets how many workers stay alive and when idle ones are reclaimed; running sessions are never reclaimed.
Built-in terminal
Ctrl+` pulls a terminal up from under the chat, in the current project. It starts the same shell pi runs commands in (Git Bash on Windows) with pi's tools on PATH; + also offers PowerShell 7, Windows PowerShell, cmd, each WSL distribution, zsh or fish. Tabs and up to four side-by-side panes per tab — drag the borders, close one pane with its ✕ or Ctrl+Shift+W. Hiding the drawer keeps the shells and their output; selected output goes into the composer with one click.
Branches
The status bar shows the project's branch, uncommitted changes and ahead / behind. Click it (or Switch branch… in the command palette) to search local and remote branches, switch, or create one from HEAD. Changes travel with the switch when Git allows it; when they would be overwritten you can stash them first, and they are offered back when you return to the branch. If a session is still working in the project you are asked before anything changes under it.
Usage
Settings → Usage adds up tokens and cost from every pi session on the machine — the desktop's and terminal pi's, including a custom sessionDir — by day, hour, model, project and session. Hover a layer of a day for its share; replies copied into a fork count once.
More panels
| Panel | What it does |
|---|---|
| Tree | The session as a tree, like pi /tree: filter to user messages, jump back to any node and continue from there as a new branch. |
| Run | Run state, model and thinking level, and how the context window splits between user, assistant and tool messages. |
| Context | The messages that make up the current context, with token estimates per entry. |
Themes and background
Light and dark each take a preset — Claude, VS Code Light+, Codex Dark — or your own: colours for the sidebar, chat, your messages, code blocks and borders, a heading / reply font (serif included), chat text size and line height, corner radius and shadow. Everything is a CSS variable, listed next to the custom CSS editor. A background image can sit behind the window — per mode or shared, with its strength, blur and the panes' opacity adjustable; text always stays on a frosted surface. Themes import from pi-theme-v1 / codex-theme-v1 strings; five icon sets and 90–110% density are in Settings → Appearance too.
pi on your phone
pi Remote (Android) connects to the desktop app: turn on Settings → Mobile, scan the QR code, and every session is on the phone — read along while a turn runs, answer its questions, send prompts with images, pick the model and thinking level. Review a turn's changes or the working tree file by file, long-press lines to leave comments that go into your next message, switch the session's branch or fork from any message. The connection is end-to-end encrypted and stays on your network; away from home, put both devices in the same Tailscale / ZeroTier / WireGuard network (the app finds the overlay address, or add one by hand). English and Chinese follow the phone's language, with an in-app override.
How it fits together
The renderer never talks to the SDK directly: the main process routes each request to the worker that owns the session, and that worker runs the pi SDK on your machine or inside a WSL distribution. Sessions, logins and settings stay in ~/.pi/agent, so the CLI and the app can take turns on the same session.
Also included
| Extensions, unchanged | Extensions you installed for terminal pi load here. Their dialogs, tool cards, panels and /commands are mapped to native UI by declarative adapters — 36 ship built in. List |
| Notifications | A system notification and an in-app inbox when a turn finishes or needs input; the status bar shows what is running. |
| WSL runtime (Windows) | Run the worker inside a chosen WSL distribution, with sessions, Git and previews resolved on the Linux side. |
| Chinese / English UI | Switch in Settings; the phone app follows the system language. |
| Updates | Checks GitHub Releases in the background and can download and launch the installer. |
Install
| Platform | Package |
|---|---|
| Windows x64 | pi.Desktop-Setup-<version>-x64.exe (installer) or pi.Desktop-Portable-<version>-x64.exe |
| macOS | .dmg / .zip for Apple Silicon (arm64) and Intel (x64) |
| Linux x64 | .AppImage or .deb |
| Android 9+ (arm64) | pi-remote-<version>-android-arm64.apk — the phone app |
Get them from Releases; each release lists SHA-256 checksums in SHA256SUMS.txt. The app bundles its own pi SDK; you only need to sign in to a model provider once, the same way you do for terminal pi (the credentials live in ~/.pi/agent). Settings → Runtime can switch to a globally installed pi version.
Requires Node.js ≥ 22.19.
git clone https://github.com/justhil/pi-app.git
cd pi-app
npm install
npm run dev # development
npm run build # production bundle in out/
npm run package # installers via electron-builder
First five minutes
- Open folder — the folder becomes the agent's working directory. For a throwaway chat, use + next to Conversations instead.
- Pick a session — sessions from terminal pi for that folder are listed; + next to the project starts a new one.
- Send —
Entersends,Shift+Enteradds a line. - Look right — Review, Run, Context, Tree and Files share the right sidebar; drag its edge to make it wider.
- Go back — hover a message to rewind or fork, or press
Esctwice in an empty composer to open the session tree.
Shortcuts
| Action | Keys |
|---|---|
| Send / new line | Enter / Shift+Enter |
| Steer the running turn / queue a follow-up | Enter / Alt+Enter while running |
| Pull the last queued message back | Alt+↑ |
| Stop | Esc |
| Session tree | Esc Esc in an empty composer |
| Previous / next sent message | ↑ / ↓ with an empty composer or the caret at the start / end |
| File reference / command | @ / / |
| Open a file in a new tab | Ctrl/⌘+click in Files |
| Show / hide the terminal | Ctrl+` |
| Close the focused terminal pane / find in it | Ctrl+Shift+W / Ctrl+Shift+F (⌘W / ⌘F on macOS) |
Extensions
Install and enable extensions exactly as for terminal pi:
pi install npm:<package> # or: pi install git:github.com/<owner>/<repo>
then make sure the package is enabled in ~/.pi/agent/settings.json → packages and start a new session. Settings → Extensions shows what the current worker loaded; Settings → Adapters holds each adapter's desktop options. To override or add an adapter, put a .json adapter file in ~/.pi/desktop/adapters/ (or <project>/.pi/desktop/adapters/, which takes precedence) — see the authoring guide.
The mic button in the composer transcribes speech into the input. By default it uses the built-in service, which calls ChatGPT's transcription endpoint with your Codex / ChatGPT sign-in — no OpenAI API key and no local process. In Settings → Voice, paste an access_token or import it from ~/.codex/auth.json (written by codex login), then Verify login.
Under Advanced you can use a local codex-asr CLI or your own codex-asr serve URL instead. Typing always works without voice.
| Problem | Try |
|---|---|
| An extension is listed in Settings but missing in chat | Enable it in packages, then start a new session. |
| The first switch to a long session is slow | Only the latest messages load first; the rest loads on scroll or when you send. |
| Closed an extension dialog by accident | Use Continue on its timeline card. |
| Voice says the login is invalid | The token expired — run codex login again and re-import. |
| Blank window after changing source | Delete node_modules/.vite and rerun npm run dev. |
- Stack: Electron 43 · React 18 · TypeScript · Tailwind · Zustand · i18next · xterm.js ·
@earendil-works/pi-coding-agent - Processes: Electron main (IPC, worker pool, Git, previews) → one utility-process worker per session running the pi SDK → renderer.
- Checks:
npm run test:unit,npm run test:scripts,npm run typecheck,npm run lint - Docs:
doc/· adapter authoring · changelog - Phone app: Kotlin / Compose in
apps/mobile;node scripts/remote-dev-host.mjsruns a fake desktop to develop against. - Releases: pushing a
v*tag runs.github/workflows/release.ymland builds Windows, macOS, Linux and Android packages.
Support
Questions and feedback: LinuxDo or GitHub Issues. If the app is useful to you, a ⭐ helps other pi users find it, and you can sponsor maintenance with the QR code below.