auvezy-terminal-remote 0.4.4 → 0.5.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 +88 -74
- package/dist/cli.js +177 -92
- package/frontend-dist/assets/{eruda-yHyqIqVX.js → eruda-B7ChK697.js} +1 -1
- package/frontend-dist/assets/index-BcyWF0bU.css +32 -0
- package/frontend-dist/assets/index-D03FAZXJ.js +350 -0
- package/frontend-dist/index.html +2 -2
- package/frontend-dist/screenshots/desktop.png +0 -0
- package/frontend-dist/screenshots/mobile.png +0 -0
- package/frontend-dist/sw.js +1 -1
- package/package.json +2 -2
- package/frontend-dist/assets/index-CmEDzLbV.css +0 -32
- package/frontend-dist/assets/index-GlsB_6pe.js +0 -335
package/README.md
CHANGED
|
@@ -1,107 +1,121 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
|
|
3
|
+
<img src="./frontend/public/icons/atr-icon.svg" alt="auvezy-terminal-remote logo" width="96" height="96">
|
|
4
|
+
|
|
1
5
|
# auvezy-terminal-remote
|
|
2
6
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
7
|
+
[](https://www.npmjs.com/package/auvezy-terminal-remote)
|
|
8
|
+
[](./LICENSE)
|
|
9
|
+
[](https://nodejs.org)
|
|
10
|
+
[](https://github.com/jjj201200/auvezy-terminal-remote)
|
|
6
11
|
|
|
7
|
-
|
|
12
|
+
**English** · [简体中文](./README.zh-CN.md)
|
|
8
13
|
|
|
9
|
-
|
|
14
|
+
Remote-control any terminal program on your PC from a phone or tablet
|
|
15
|
+
browser over LAN. One command — `atr [program]` — and every instance
|
|
16
|
+
shows up as a tab in your browser's top bar.
|
|
10
17
|
|
|
11
|
-
|
|
12
|
-
- 输入下一条指令、按方向键
|
|
13
|
-
- Claude 触发审批 hook 时,手机锁屏弹通知
|
|
14
|
-
- 不开公网、不依赖云
|
|
18
|
+
<img src="./frontend/public/screenshots/desktop.png" alt="Webapp running Claude Code in a browser tab" width="720">
|
|
15
19
|
|
|
16
|
-
|
|
17
|
-
把 webapp 输入桥回 PTY。仅绑 LAN IP,用 token + 本地 cookie 鉴权。
|
|
20
|
+
</div>
|
|
18
21
|
|
|
19
|
-
##
|
|
22
|
+
## ✨ Features
|
|
20
23
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
+
- **PTY bridge** — node-pty + xterm.js 5, full ANSI, alt-screen TUI safe
|
|
25
|
+
- **Claude Code / TUI tuned** — Ink/Yoga reflow fix on resize, alt-screen blocklist, "adapt to current device" PTY sizing
|
|
26
|
+
- **Multi-instance** — every `atr` grabs the next free port; one tab bar shows them all
|
|
27
|
+
- **Multi-client** — many browsers / `attach` clients on one instance, with master arbitration
|
|
28
|
+
- **Mobile-first PWA** — IME guard, long-press, swipe scroll, viewport-aware fit, install to home screen
|
|
29
|
+
- **Custom shortcuts & commands** — define on-screen keys and saved command snippets in the settings panel
|
|
30
|
+
- **Reconnect with replay** — scrollback rehydrated on every reconnect, alt-screen TUIs protected
|
|
31
|
+
- **LAN-only by design** — token + port-bound cookie, `timingSafeEqual`, loopback-only `/api/hook`
|
|
32
|
+
- **WSL aware** — mirrored / NAT auto-detected, PowerShell port-forward script generated
|
|
24
33
|
|
|
25
|
-
|
|
34
|
+
Full inventory in [`docs/FEATURES.md`](./docs/FEATURES.md).
|
|
35
|
+
|
|
36
|
+
## 📦 Install
|
|
26
37
|
|
|
27
38
|
```bash
|
|
28
|
-
|
|
29
|
-
atr claude # 跑 claude
|
|
30
|
-
atr zsh # 跑 zsh
|
|
31
|
-
atr claude --resume foo # 透传任意参数给子进程
|
|
39
|
+
npm install -g auvezy-terminal-remote # -g is required (it's a CLI)
|
|
32
40
|
```
|
|
33
41
|
|
|
34
|
-
|
|
42
|
+
> ⚠️ The default `npm i` command shown on the npm package page is **missing
|
|
43
|
+
> `-g`** — without it the `atr` binary won't be on your PATH.
|
|
35
44
|
|
|
36
|
-
|
|
37
|
-
浏览器顶栏会自动出现新 tab,点击即可切换。
|
|
45
|
+
## 🚀 Quick start
|
|
38
46
|
|
|
39
47
|
```bash
|
|
40
|
-
atr
|
|
41
|
-
atr
|
|
42
|
-
atr
|
|
48
|
+
atr # runs your $SHELL (zsh / bash auto-detected)
|
|
49
|
+
atr claude # runs claude
|
|
50
|
+
atr claude --resume foo # extra args passed through to claude
|
|
43
51
|
```
|
|
44
52
|
|
|
45
|
-
|
|
53
|
+
After it starts, scan the QR code printed in the terminal — the webapp
|
|
54
|
+
logs in automatically (token lives in `~/.auvezy/terminal-remote/config.json`).
|
|
55
|
+
|
|
56
|
+
Run `atr` in different terminals to spawn more instances; the browser tab
|
|
57
|
+
bar updates live.
|
|
58
|
+
|
|
59
|
+
## 🔧 Usage
|
|
46
60
|
|
|
47
61
|
```
|
|
48
|
-
atr [
|
|
49
|
-
|
|
50
|
-
子命令:
|
|
51
|
-
start 启动 backend(默认)
|
|
52
|
-
attach attach 到运行中的实例(命令行接管)
|
|
53
|
-
list 列出本机所有运行中实例
|
|
54
|
-
stop 停止本机所有实例
|
|
55
|
-
|
|
56
|
-
选项:
|
|
57
|
-
-p, --port <n> 端口(默认 3000,多实例自动递增;除非 -S)
|
|
58
|
-
-S, --strict-port 严格端口模式:被占即报错退出,不自适应
|
|
59
|
-
--spawn-timeout <s> PTY spawn 兜底秒数(默认 30;0=不超时;
|
|
60
|
-
首个浏览器连入 / 按 Enter / 超时三选一触发)
|
|
61
|
-
--wait-confirm 强制必须按 Enter 才 spawn(覆盖浏览器/超时触发)
|
|
62
|
-
--name <s> 实例名(用于 webapp 显示)
|
|
63
|
-
--no-terminal 不打印二维码(CI / 守护进程友好)
|
|
64
|
-
--command <cmd> PTY 启动命令(默认当前 $SHELL)
|
|
65
|
-
--args <json> 命令参数(JSON 数组字符串)
|
|
66
|
-
-h, --help 显示帮助
|
|
67
|
-
-v, --version 显示版本号
|
|
62
|
+
atr [atr-flags...] [program] [program-args...]
|
|
63
|
+
atr <subcommand> [args]
|
|
68
64
|
```
|
|
69
65
|
|
|
70
|
-
|
|
66
|
+
Most-used flags:
|
|
71
67
|
|
|
72
|
-
|
|
|
68
|
+
| Flag | Purpose |
|
|
73
69
|
|---|---|
|
|
74
|
-
|
|
|
75
|
-
|
|
|
76
|
-
| `
|
|
77
|
-
|
|
|
78
|
-
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
| `STRICT_PORT` | 同 `--strict-port`(设 `true` 启用严格模式)|
|
|
82
|
-
| `OCR_SPAWN_TIMEOUT` | 同 `--spawn-timeout`(秒;0 = 无超时)|
|
|
83
|
-
| `AUTH_TOKEN` | 指定 token(默认自动生成)|
|
|
84
|
-
| `LOG_LEVEL` | pino 级别(默认 info)|
|
|
70
|
+
| `-p, --port <n>` | Port (default 3000, auto-increments) |
|
|
71
|
+
| `--name <s>` | Instance name (shown in webapp) |
|
|
72
|
+
| `--no-terminal` | Don't print QR (CI / daemon-friendly) |
|
|
73
|
+
| `--workdir <path>` | Child process cwd |
|
|
74
|
+
| `--token <s>` | Use a fixed token instead of auto-generated |
|
|
75
|
+
|
|
76
|
+
Subcommands: `atr list` · `atr stop [pattern]` · `atr attach <url>`.
|
|
85
77
|
|
|
86
|
-
|
|
78
|
+
Full reference (all flags, env vars, config file): [`docs/CLI.md`](./docs/CLI.md).
|
|
79
|
+
Run `atr -h` for the inline help.
|
|
87
80
|
|
|
88
|
-
|
|
89
|
-
VAPID 在 `~/.auvezy/terminal-remote/vapid.json`,多实例注册表在
|
|
90
|
-
`~/.auvezy/terminal-remote/instances/<port>.json`。
|
|
81
|
+
## 📱 Install as a PWA
|
|
91
82
|
|
|
92
|
-
|
|
83
|
+
The webapp ships with a manifest. "Add to Home Screen" gives a near-native
|
|
84
|
+
app: no browser chrome, status bar tinted to match.
|
|
93
85
|
|
|
94
|
-
|
|
86
|
+
- **iOS Safari** — share button → "Add to Home Screen"
|
|
87
|
+
- **Android Chrome** — top-right ⋮ → "Install app"
|
|
95
88
|
|
|
96
|
-
|
|
97
|
-
Windows 浏览器可以直接用 banner 上的 IP 访问,无需任何额外配置
|
|
98
|
-
- **NAT 模式**(默认):WSL 在 `172.x.x.x` 私网,Windows 浏览器无法直连。
|
|
99
|
-
backend 启动时会自动检测并在 banner 末尾打印 PowerShell 配置命令
|
|
89
|
+
## 🌐 WSL → Windows browser
|
|
100
90
|
|
|
101
|
-
|
|
91
|
+
WSL2 backend works out of the box on **mirrored mode**. On **NAT mode**
|
|
92
|
+
the banner prints a one-shot PowerShell snippet to make the port reachable
|
|
93
|
+
from Windows. Details: [`docs/WSL.md`](./docs/WSL.md).
|
|
94
|
+
|
|
95
|
+
## 🛣️ Roadmap
|
|
96
|
+
|
|
97
|
+
Planned, evaluating, and explicitly out-of-scope items live in
|
|
98
|
+
[`docs/ROADMAP.md`](./docs/ROADMAP.md). The README only lists what already ships.
|
|
99
|
+
|
|
100
|
+
## 🏛️ Architecture
|
|
101
|
+
|
|
102
|
+
- Module diagram & data flow: [`docs/ARCHITECTURE.md`](./docs/ARCHITECTURE.md)
|
|
103
|
+
- Design doc & ADRs: [`docs/plans/open-claude-remote-clone/`](./docs/plans/open-claude-remote-clone/)
|
|
104
|
+
|
|
105
|
+
## 🛠️ Development
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
git clone https://github.com/jjj201200/auvezy-terminal-remote.git
|
|
109
|
+
cd auvezy-terminal-remote
|
|
110
|
+
bash install.sh # checks Node 20+ / pnpm 9+ / build deps → installs → builds
|
|
111
|
+
pnpm dev # backend (tsx watch) + frontend (vite) in parallel
|
|
112
|
+
pnpm test # shared + backend + frontend unit tests
|
|
113
|
+
```
|
|
102
114
|
|
|
103
|
-
|
|
115
|
+
Gitee mirror (faster from mainland China):
|
|
116
|
+
`git clone https://gitee.com/drowsyflesh/auvezy-terminal-remote.git`
|
|
104
117
|
|
|
105
|
-
##
|
|
118
|
+
## License
|
|
106
119
|
|
|
107
|
-
|
|
120
|
+
[PolyForm Noncommercial 1.0.0](./LICENSE) — free for personal, educational,
|
|
121
|
+
and nonprofit use. Commercial use requires a separate license.
|