handmux 0.9.1 → 0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -16,7 +16,7 @@ handmux is more than a terminal on your phone. It puts the *same* live **tmux**
16
16
  <em>Real phone browser, real panes — say what you need and Claude Code writes it, then tap a filename to preview (left); a push pings you when needed, and you review the git repo &amp; each agent's usage (right).</em>
17
17
  </p>
18
18
 
19
- **[📖 Docs](https://handmux.com/docs.html)** · **[📝 Changelog](CHANGELOG.md)** · **[📦 npm](https://www.npmjs.com/package/handmux)**
19
+ **[📖 Docs](https://handmux.com/docs)** · **[📝 Changelog](CHANGELOG.md)** · **[📦 npm](https://www.npmjs.com/package/handmux)**
20
20
 
21
21
  ## Quick start · about a minute
22
22
 
@@ -35,7 +35,7 @@ Want to reach it from **anywhere**? Add one flag for a free public HTTPS link:
35
35
  handmux start --tunnel cloudflare # instant public URL (cloudflared auto-installed)
36
36
  ```
37
37
 
38
- > Tunnel types, self-hosting, Windows/WSL2, and the full command & flag reference → see the **[docs](https://handmux.com/docs.html)**.
38
+ > Tunnel types, self-hosting, Windows/WSL2, and the full command & flag reference → see the **[docs](https://handmux.com/docs)**.
39
39
 
40
40
  ## Why handmux
41
41
 
@@ -64,14 +64,14 @@ LAN-only by default, nothing exposed. To reach it from outside, just ask: **does
64
64
  - **Yes** (cloud box / public IP / forwarded port) — no tunnel needed, connect directly; fastest and most private.
65
65
  - **No** — open a tunnel: `cloudflare` (zero-config, up in seconds, but its public nodes can be slow or unreliable in some regions) · `cloudflare-named` (your own domain, steadier) · `ssh` self-hosted (through your own server — the pick where Cloudflare is unreliable, e.g. mainland China).
66
66
 
67
- > Tunnel config, server-side reverse proxy, autostart, voice/push credentials, and port previews → see the **[docs](https://handmux.com/docs.html)**.
67
+ > Tunnel config, server-side reverse proxy, autostart, voice/push credentials, and port previews → see the **[docs](https://handmux.com/docs)**.
68
68
 
69
69
  ## Requirements
70
70
 
71
- Your computer needs **Node ≥ 18** and **tmux ≥ 3.0**; the phone just needs a browser. On **Windows**, run it inside **WSL2** (a real Linux kernel + real tmux) — see the [docs](https://handmux.com/docs.html#windows).
71
+ Your computer needs **Node ≥ 18** and **tmux ≥ 3.0**; the phone just needs a browser. On **Windows**, run it inside **WSL2** (a real Linux kernel + real tmux) — see the [docs](https://handmux.com/docs#windows).
72
72
 
73
73
  ## More
74
74
 
75
- **[📖 Docs](https://handmux.com/docs.html)** · **[📝 Changelog](CHANGELOG.md)** · **[🔒 Security](SECURITY.md)** · License **AGPL-3.0**
75
+ **[📖 Docs](https://handmux.com/docs)** · **[📝 Changelog](CHANGELOG.md)** · **[🔒 Security](SECURITY.md)** · License **AGPL-3.0**
76
76
 
77
77
  Found a security issue? Please report it privately (see [SECURITY.md](SECURITY.md)), not via a public issue.
package/README.zh-CN.md CHANGED
@@ -16,7 +16,7 @@ handmux 不只是把终端搬上手机。它把你电脑上**正跑着的 tmux
16
16
  <em>真实手机浏览器、真实 pane——左:说出需求,Claude Code 直接写好,点文件名即可预览;右:需要你时推送提醒,查看 git 仓库与各 agent 用量。</em>
17
17
  </p>
18
18
 
19
- **[📖 文档](https://handmux.com/docs.html)** · **[📝 更新日志](CHANGELOG.md)** · **[📦 npm](https://www.npmjs.com/package/handmux)**
19
+ **[📖 文档](https://handmux.com/docs)** · **[📝 更新日志](CHANGELOG.md)** · **[📦 npm](https://www.npmjs.com/package/handmux)**
20
20
 
21
21
  ## 快速上手 · 约一分钟
22
22
 
@@ -35,7 +35,7 @@ handmux start # 跑起来 —— 仅本机 / 同 wifi,不对外暴露
35
35
  handmux start --tunnel cloudflare # 即时公网地址(自动装 cloudflared)
36
36
  ```
37
37
 
38
- > 隧道类型、自建、Windows/WSL2、完整命令与参数 → 见 **[文档](https://handmux.com/docs.html)**。
38
+ > 隧道类型、自建、Windows/WSL2、完整命令与参数 → 见 **[文档](https://handmux.com/docs)**。
39
39
 
40
40
  ## 为什么是 handmux
41
41
 
@@ -64,14 +64,14 @@ handmux start --tunnel cloudflare # 即时公网地址(自动装 cloudflared)
64
64
  - **有**(云主机 / 公网 IP / 已端口转发)—— 不用隧道,直接连,最快也最私密。
65
65
  - **没有** —— 开一条隧道:`cloudflare`(零配置秒通,但公共节点在国内常不稳定)· `cloudflare-named`(你的域名,更稳)· `ssh` 自建(接你自己的服务器,**国内网络首选**)。
66
66
 
67
- > 隧道配置、服务端反向代理、开机自启、语音 / 推送凭证、端口预览等细节 → 见 **[文档](https://handmux.com/docs.html)**。
67
+ > 隧道配置、服务端反向代理、开机自启、语音 / 推送凭证、端口预览等细节 → 见 **[文档](https://handmux.com/docs)**。
68
68
 
69
69
  ## 环境要求
70
70
 
71
- 电脑需 **Node ≥ 18** 与 **tmux ≥ 3.0**;手机只要浏览器。**Windows** 请装进 **WSL2**(真 Linux 内核 + 真 tmux)——见 [文档](https://handmux.com/docs.html#windows)。
71
+ 电脑需 **Node ≥ 18** 与 **tmux ≥ 3.0**;手机只要浏览器。**Windows** 请装进 **WSL2**(真 Linux 内核 + 真 tmux)——见 [文档](https://handmux.com/docs#windows)。
72
72
 
73
73
  ## 更多
74
74
 
75
- **[📖 文档](https://handmux.com/docs.html)** · **[📝 更新日志](CHANGELOG.md)** · **[🔒 安全](SECURITY.md)** · 许可证 **AGPL-3.0**
75
+ **[📖 文档](https://handmux.com/docs)** · **[📝 更新日志](CHANGELOG.md)** · **[🔒 安全](SECURITY.md)** · 许可证 **AGPL-3.0**
76
76
 
77
77
  发现安全问题请私下报告(见 [SECURITY.md](SECURITY.md)),别开公开 issue。
package/bin/handmux.js CHANGED
@@ -118,6 +118,7 @@ async function preflightSsh(cfg) {
118
118
  async function main() {
119
119
  switch (command) {
120
120
  case 'start': return start();
121
+ case 'open': return openCmd();
121
122
  case 'stop': stop(); return;
122
123
  case 'restart': { stop(); await sleep(600); return start(); }
123
124
  case 'status': return status();
@@ -469,6 +470,23 @@ async function maybeQr(url, st) {
469
470
  } catch { /* no qrcode-terminal — URL alone is fine */ }
470
471
  }
471
472
 
473
+ // `open` is deliberately DECOUPLED from the server lifecycle: it never starts/stops anything. It's the
474
+ // desk-side quick attach — `handmux open foo` attaches session foo (creating it if missing), including
475
+ // sessions that were created from the phone. Inside tmux it refuses (don't nest tmux in tmux).
476
+ function openCmd() {
477
+ const name = process.argv[3];
478
+ if (!name || name.startsWith('-')) { console.error(t('open.usage')); process.exit(2); }
479
+ if (process.env.TMUX) { console.error(t('open.insideTmux')); process.exit(1); }
480
+ const tmux = checkTmux();
481
+ if (!tmux.present) {
482
+ console.error(t('tmux.notFound'));
483
+ console.error(t('tmux.install', { hint: tmuxInstallHint() }));
484
+ process.exit(1);
485
+ }
486
+ const r = spawnSync('tmux', ['new-session', '-A', '-s', name], { stdio: 'inherit' });
487
+ process.exit(r.status ?? 0);
488
+ }
489
+
472
490
  function help() {
473
491
  console.log(t('help.body'));
474
492
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "handmux",
3
- "version": "0.9.1",
4
- "description": "A mobile vibe-coding cockpit — built on tmux: drive your live session, Claude Code & Codex from your phone.",
3
+ "version": "0.10.0",
4
+ "description": "A mobile vibe-coding cockpit — built on tmux: drive your live session, Claude Code / Codex — anything a terminal can run — from your phone.",
5
5
  "type": "module",
6
6
  "license": "AGPL-3.0-only",
7
7
  "author": "yuanyuanzijin",
@@ -47,5 +47,14 @@
47
47
  "devDependencies": {
48
48
  "supertest": "^7.0.0",
49
49
  "vitest": "^2.0.0"
50
- }
50
+ },
51
+ "whatsNew": [
52
+ {"version":"0.10.0","date":"2026-07-06","zh":"升级前预览新功能 · 电脑 handmux open 接管","en":"Preview an update before installing · handmux open"},
53
+ {"version":"0.9.1","date":"2026-07-06","zh":"「添加到主屏」引导","en":"\"Add to Home Screen\" coach"},
54
+ {"version":"0.9.0","date":"2026-07-05","zh":"聊天输入框多行重做","en":"Multi-line chat composer redone"},
55
+ {"version":"0.8.0","date":"2026-07-05","zh":"快捷栏可自定义 · 上传体验重做","en":"Customizable quick-bars · upload redone"},
56
+ {"version":"0.7.0","date":"2026-07-03","zh":"新增「用量」页","en":"New \"Usage\" page"},
57
+ {"version":"0.6.0","date":"2026-07-02","zh":"新增 Codex 支持","en":"Codex support added"},
58
+ {"version":"0.5.0","date":"2026-06-28","zh":"首个公开版 · 多语言界面","en":"First public release · multi-language UI"}
59
+ ]
51
60
  }