v0.1.20 · MIT 开源 · macOS / Windows / Linux / Android / iPhone Duo MIT Open Source · macOS / Windows / Linux / Android / iPhone Duo

把另一台电脑的终端,
装进这一个窗口。
Another computer's terminal,
right in your window.

输入 9 位设备码和配对密码,对方点允许就能连上。直连优先、端到端加密,认得 Claude、Codex 等 20 种命令行 AI。 Enter a 9-digit device code and pairing password. Once approved, run shells and 20 CLI AIs on that machine — direct first, end-to-end encrypted.

P2PCLI Beta
2 个终端2 terminals 连接Connect 本机信息This device
给 Claude Code 发一整句(⌘L 切换焦点,拖文件进来自动填路径)…Send a full prompt to Claude Code (⌘L to toggle, drop files to attach)…
Sonnet High Default
Claude Code · 在干活Working · 5h 35% ~/Projects/api IPv6 直连IPv6 direct · 12 ms · tmux
▾ src
▾ routes
auth.rs
health.rs
session.rs
main.rs
Cargo.toml
38pub async fn login(State(db): State<Pool>, req: Json<Creds>) -> Result<Token> {
39    let sess = db.find_session(&req.token).await?;
40    let Some(sess) = sess.filter(|s| !s.is_expired()) else {
41        return Err(AuthError::SessionExpired);
42    };
43    let user = db.load_user(sess.user_id).await?;
44    Ok(Token::issue(user))
45}
Monaco · UTF-8 · LF · Git (+3 -1) 打字全在本机 · 保存前校验远端冲突Local typing · remote conflict check on save
H.265 · VideoToolbox → WebCodecs 2560×1440 · 60 fps
localhost:5173vite

画面仅走直连,静止时不发流量;两边剪贴板按需互通。Direct-only video with zero idle traffic and on-demand clipboard sync.

监听中的端口Listening ports
:5173vite
127.0.0.1:5173
:8080api
127.0.0.1:8080
:5432postgres
转发Forward

终端里按住 ⌘/Ctrl 点 localhost 链接也会自动转发并打开。⌘/Ctrl-click any localhost link in the terminal to forward and open it.

仅限本机 127.0.0.1 访问Bound to 127.0.0.1 only 直连 · 12 msDirect · 12 ms

直连优先,端到端加密Direct first, end-to-end encrypted

先试 IPv6 直连与 IPv4 打洞,不通才走中继;同一局域网自动发现,免设备码。牵线和中继都读不到任何内容。IPv6 direct, then IPv4 hole punching, relay only as fallback. LAN peers appear automatically with no code needed; relays see only ciphertext.

会话不断,翻历史不卡Persistent sessions, local scrollback

基于 tmux / psmux,断网或关掉软件任务照跑,手机和电脑还能同时看同一个终端;历史缓存在本机,翻页选字不走网络。Backed by tmux/psmux so sessions outlive disconnects and can be shared with mobile. Local scrollback makes scrolling and selection instant.

认得 20 种命令行 AIKnows 20 command-line AIs

识别 Claude Code、Codex、Gemini CLI、Cursor 等的干活、等待确认与账号额度,需要你时弹窗提醒;底部输入框支持中文整句发送。Tracks working, approval and quota states across Claude Code, Codex, Gemini CLI and 17 more, with desktop alerts and a local prompt box.

原地改代码、端口转发与借网In-place editor, ports & proxy lending

内置 Monaco 编辑器直接改对方文件并防冲突;支持正反向端口转发与一键借网,让对方终端直接走本机代理。Edit remote files in Monaco with conflict checks, forward ports in either direction, or lend your local proxy to the remote shell.

并发传文件、显卡级控屏8-stream files & GPU screen control

文件拖进终端 8 路并发 + BLAKE3 续传并自动填入路径;macOS / Windows 远程桌面全程显卡硬件编解码,剪贴板全格式互通。Drop files to send over 8 BLAKE3-verified streams; control macOS/Windows screens with GPU H.265/WebCodecs and shared clipboard.

原生移动端与 iPhone Duo 折叠屏Native mobile & iPhone Duo foldable

iOS 液态玻璃原生 App 与 Android / 鸿蒙客户端,扫码即连。已适配最新 iPhone Duo,三种开合姿态自动切换布局。Native iOS (Liquid Glass), Android and HarmonyOS apps with QR pairing and automatic posture layouts for iPhone Duo.

iOS 27.1+ · Liquid Glass · Android / HarmonyOS

适配最新 iPhone Duo,
合上、半折、展开都顺手。
Built for iPhone Duo.
Folded, half-folded, or wide open.

基于系统折痕区域与自适应分栏重构手机端体验:无需手动切模式,随设备开合即时变换界面,电脑端扫一下二维码就能接管终端。 Adapts automatically to the hinge and container size as you fold or open the phone, with instant QR pairing from your desktop.

工作室 Mac mini #1 Claude Code
❯ claude
⏺ Read(src/routes/auth.rs)
⏺ Update(src/routes/auth.rs) +6 −2
⏺ Bash(cargo test auth)
⎿ 14 passed; 0 failed
⏺ 修好了,要我提交到分支吗?Fixed. Commit to branch?
EscTabCtrl↑↓粘贴Paste
Claude Code · 等你确认Waiting AI 面板AI Deck键盘Keys
1. 是,提交并推送Yes, commit & push
2. 仅提交本地Commit locally
中断Stop 写指令…Prompt…
P2PCLI
本机This phone
iPhone Duo
设备Devices
工作室 Mac mini12ms
#1 Claude Code
#2 zsh
办公室 PC24ms
工作室 Mac mini #1 IPv6 · 12 ms
sam@studio-mac ~/Projects/api
⏺ Read(src/routes/auth.rs)
⏺ Bash(cargo test auth)
⎿ test result: ok. 14 passed
⏺ 全部测试通过。All tests passed.
~/Projects/api Claude Codex
Mac mini #1
❯ claude
⏺ Read(auth.rs)
⏺ Update(auth.rs)
✓ 14 passed
_
← + AI ⌘ ⋯

两台电脑装上就行,
AI 也会用 p2pcli。
Pair in seconds.
Script or drive with p2pcli.

  1. 被连的一方点「本机信息」,发给对方 9 位设备码和 6 位密码;对方输入连接后点一下允许。Share the 9-digit code and 6-digit password from This device, then click Allow when asked.
  2. 连自己的电脑时勾上互相信任,以后免密码、免弹窗,直接点左侧列表接回终端。Check Trust each other for your own machines to reconnect from the sidebar with no prompts.
  3. 安装时会自带 p2pcli 命令,启动时自动写入 Claude Code、Codex、Cursor 等技能目录,本地 AI 直接就能跨机改文件、跑命令。Ships with the p2pcli CLI and auto-installs an Agent Skill so local AIs can run commands and edit remote files directly.

        

下载 P2PCLIDownload P2PCLI

当前版本 v0.1.20 · 安装后自动检查更新Latest v0.1.20 · Auto-updates in app

macOS15+
苹果菜单 → 关于本机 查看芯片Apple menu → About This Mac
Windows10+
大多数电脑选 x64Most PCs use x64
Linuxx64 · ARM64
内置 tmux · Bundled tmux · 说明Notes
移动端Mobile预览版 · 适配折叠屏Preview · Foldable ready
已适配 iPhone Duo · 需 AltStore / SideStore 自签iPhone Duo ready · Sign via AltStore / SideStore
首次打开被 macOS 或 Windows 拦截怎么放行?Blocked on first launch?
  • macOS — 双击打开点「完成」,去 系统设置 → 隐私与安全性 → 安全性 点「仍要打开」,输密码后再点「仍要打开」。看不到按钮先再双击一次 P2PCLI。Double-click and click Done, then System Settings → Privacy & Security → Open Anyway.
  • Windows — 提示「Windows 已保护你的电脑」时,点 更多信息 → 仍要运行。Click More info → Run anyway when SmartScreen appears.

所有版本与 SHA256SUMS 见All builds & SHA256SUMS on GitHub Releases.