ccy.dev
/

gtmux / 指南guides / 用手机和网页远程管理与协作 Manage and collaborate from your phone and the web

Manage and collaborate from your phone and the web

An agent run takes half an hour; you don’t have to sit there for it. This guide does two things: pair your own phone and browser to the Mac so you can watch, reply, and get pushed from anywhere — then open one session to a collaborator for a while, with the permissions staying in your hand.

1 · Open the door on your Mac

gtmux serve                # same Wi-Fi
gtmux tunnel               # any network — a public URL over an outbound tunnel

serve is enough on the same Wi-Fi; away from it, tunnel — no port-forwarding, no VPN.

Don’t want a terminal? The same door is two clicks in the menu-bar app: click the gtmux status icon → ⚙︎ → Preferences… → Remote access — the same three-way switch, Off / Wi-Fi / Anywhere, plus a tunnel choice under Anywhere: Standard (hosted, free) or Direct (straight over 443 — access-code unlock, or self-hosted), with the reachable address shown while it’s on. “Pair a device…” in the ⚙︎ menu pops the pairing code directly (walking you through opening the door first if it’s off) — that’s the QR step 2 scans.

menu-bar app Preferences — Remote access: Off / Wi-Fi / Anywhere, tunnel Standard / Direct

Further reading: the full remote-access doc (Tailscale, tunnel backends, self-hosting, security) →

2 · Pair your phone

gtmux pair                 # one one-time code — scan it in the iOS app

In the iOS app: Pair → Scan, once. After that the phone has the whole kit: the radar (same colors and ordering as the Mac), a terminal mirror inside any session, the 1 / 2 / 3 approval card when an agent asks, typing into a pane, a lock-screen push the moment one blocks — and the HQ page. This is your own device: full control, same as sitting at the Mac.

3 · Or use a browser — nothing to install

The same gtmux pair printout includes a browser link — open it in any browser and you have your radar and terminal mirror. A borrowed laptop, an office Windows box, an iPad: all fine.

4 · Open one session to a collaborator

gtmux share new            # mint a scoped guest link
gtmux share view add %7    # they can SEE this pane
gtmux share on             # master switch: allow typing at all
gtmux share add %7         # …and TYPE into this pane (implies view)
gtmux share revoke <id>    # done — the link dies instantly

A guest link starts with nothing visible: you open “can view” per pane, and “can type” only where needed. They open it in a browser and collaborate — watch the agent run, answer a prompt for you — but touch only the panes you opened; never HQ, never preferences, never the rest of the Mac. revoke when you’re done and the link dies instantly.

5 · Three things to keep in mind

The pairing code is one-time and expires in five minutes; a paired device’s token is a password — lose the device, revoke it on the Mac (gtmux devices revoke). Guests and your own devices are separate tracks: pair is full control, share is scoped, and they never mix. Revoking and toggling remote access happen only on the Mac — a lost phone can’t re-key the machine.


Next: want a real terminal, not a mirror? Attach from any computer →

用手机和网页远程管理与协作

你自己的手机和浏览器配上 Mac,走到哪都能看、能回、能收推送;也可以把某一个会话临时开给协作者看,并选择允许写入会话。

1 · 在 Mac 上开门

gtmux serve                # 同一个 Wi-Fi
gtmux tunnel               # 任意网络 —— 走出站隧道给你一个公网地址

同一个 Wi-Fi 用 serve 就够;出了门用 tunnel,不用开路由端口、不用 VPN。

也可以在菜单栏 app 里配置

gtmux 图标 → ⚙︎ → 偏好设置… → 远程访问,同样的三档开关 关 / 局域网 / 任意网络,任意网络下可继续选择隧道走 标准(托管、免费)还是直连(443 直连,访问码解锁或自托管)。⚙︎ 菜单里的**「配对设备…」**直接弹出配对码,使用 gtmux 手机 app 扫码连接。

菜单栏 app 偏好设置 —— 远程访问:关 / 局域网 / 任意网络,隧道 标准 / 直连

延展阅读:远程访问全指南(Tailscale、隧道后端、自托管、安全边界)→

2 · 配上你的手机

gtmux pair                 # 一个一次性配对码 —— 在 iOS app 里扫它

iOS app 里「配对 → 扫码」,扫一次就好。之后手机上是一整套

(和 Mac 上同一套颜色和排序)、点进任何会话看终端镜像、agent 提问时的 1 / 2 / 3 审批卡、往 pane 里打字、agent 卡住那一刻的锁屏推送,还有 HQ 中控页。这是你自己的设备——全权,和坐在 Mac 前一样。

3 · 或者用浏览器,什么都不装

同一个 gtmux pair 印出的东西里有一条浏览器链接——在任何电脑的浏览器里打开,就是你的雷达和终端镜像。在电脑、iPad 甚至车载浏览器上都能用。

4 · 把一个会话开给协作者

gtmux share new            # 生成一条受限的 guest 链接
gtmux share view add %7    # 对方能「看」这个 pane
gtmux share on             # 总开关:允许输入
gtmux share add %7         # …并能「输入」这个 pane(隐含 view)
gtmux share revoke <id>    # 完事 —— 链接立刻失效

访客链接默认什么都看不到

pane 放开「能看」,需要时再放开「能输入」。对方在浏览器里打开就能协作——看着 agent 跑、帮你回一句——但只能碰你放开的那几个 pane,碰不到 HQ、碰不到偏好、更拿不到整台 Mac。用完 revoke,链接立刻失效。

5 · 信息安全

配对码是一次性的,5 分钟过期;配上后的设备 token 等同密码——丢了设备就在 Mac 上吊销(gtmux devices revoke)。访客和自己人是两条轨

全权、share 受限。吊销和开关远程访问只能在 Mac 上操作。


接下来: 想要一个真正的终端而不是镜像?从任意电脑 attach 接回会话 →