auvezy-terminal-remote 0.7.0 → 0.7.2

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
@@ -15,22 +15,36 @@ Remote-control any terminal program on your PC from a phone or tablet
15
15
  browser over LAN. Start a broker once at boot — open the browser any
16
16
  time to log in, create instances, and run Claude / your shell / any TUI.
17
17
 
18
- <img src="./frontend/public/screenshots/desktop.png" alt="Webapp running Claude Code in a browser tab" width="720">
18
+ <img src="./frontend/public/screenshots/desktop.png" alt="Webapp running Claude Code in a browser tab" width="960">
19
19
 
20
- </div>
20
+ <img src="./frontend/public/screenshots/mobile.png" alt="Webapp on a phone screen" width="400">
21
21
 
22
- ## ✨ Features
22
+ </div>
23
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 instance is its own subprocess; one tab bar shows them all, URL is the instance (`/i/<id>/`)
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 design** token + shared sessions, `timingSafeEqual`, `/api/hook` is loopback-only, workers bind to 127.0.0.1
32
- - **WSL aware** auto-detects mirrored vs NAT mode; prints a one-liner PowerShell port-forward snippet when needed
33
- - **Boot autostart** — `atr broker service install` writes the systemd / launchd config in one shot
24
+ ## Highlights
25
+
26
+ - **Mobile browser as a first-class terminal client** full-fidelity PTY
27
+ for any program (`claude`, `vim`, `htop`, your shell). The mobile UI ships
28
+ with on-screen shortcut keys, IME-safe input handling, swipe-to-scroll,
29
+ viewport-aware sizing, and an installable PWA manifest.
30
+ - **TUI / Claude Code adaptation** — handles Ink/Yoga reflow on resize so
31
+ Claude does not blank on device rotation; an alt-screen blocklist keeps
32
+ full-screen TUIs (`claude`, `tmux`, `lazygit`, …) clean across reconnects.
33
+ - **Reconnect with replay** — scrollback is rehydrated on every reconnect,
34
+ so transient network drops, lock-screen, or sleeping the device do not
35
+ lose context.
36
+ - **Multi-instance with unified tab bar** — each `atr <program>` runs as an
37
+ independent subprocess at its own URL (`/i/<id>/`); the webapp surfaces
38
+ every active instance in a single tab strip.
39
+ - **Configurable from the settings panel** — on-screen shortcut keys,
40
+ saved command snippets, per-device font size, terminal theme, scrollback
41
+ size, and hook integrations are user-configurable. All preferences are
42
+ persisted to `~/.atrrc`.
43
+ - **LAN-only architecture** — a single shared token (timing-safe comparison),
44
+ workers bound to `127.0.0.1`, and the broker as the sole outward-facing
45
+ process. No public server, no third-party relay.
46
+ - **One-step boot autostart** — `atr install` generates the systemd /
47
+ launchd unit; the service comes up automatically on reboot.
34
48
 
35
49
  Full list: [`docs/FEATURES.md`](./docs/FEATURES.md).
36
50
 
@@ -40,23 +54,23 @@ Full list: [`docs/FEATURES.md`](./docs/FEATURES.md).
40
54
  **worker** is a single PTY instance.
41
55
 
42
56
  ```
43
- Browser / phone Your PC
44
- ┌──────────────┐ ┌──────────────────────────────────┐
45
- │ │ ws://host │ broker (LAN: 0.0.0.0:3000) │
46
- │ webapp PWA │ ──────────────►│ ├─ /api/* (auth / instances / │
47
- │ │ │ │ push / config / …) │
48
- │ │ │ ├─ /i/<id>/ → SPA + base href │
49
- │ │ │ ├─ /i/<id>/api/* → proxy worker │
50
- │ │ │ └─ /i/<id>/ws → proxy worker │
51
- └──────────────┘ │ │ │
52
- │ ▼ │
53
- │ worker A worker B … │
54
- │ 127.0.0.1: 127.0.0.1: │
55
- │ 3001 3002 … │
56
- │ ├─ PTY (claude / shell / TUI) │
57
- │ ├─ /api/health /api/hook │
58
- │ └─ /ws (PTY IO) │
59
- └──────────────────────────────────┘
57
+ Browser / phone Your PC
58
+ ┌──────────────┐ ┌──────────────────────────────────┐
59
+ │ │ ws://host │ broker (LAN: 0.0.0.0:3000) │
60
+ │ webapp PWA │ ──────────────►│ ├─ /api/* (auth / instances / │
61
+ │ │ │ │ push / config / …) │
62
+ │ │ │ ├─ /i/<id>/ → SPA + base href │
63
+ │ │ │ ├─ /i/<id>/api/* → proxy worker │
64
+ │ │ │ └─ /i/<id>/ws → proxy worker │
65
+ └──────────────┘ │ │ │
66
+ │ ▼ │
67
+ │ worker A worker B … │
68
+ │ 127.0.0.1: 127.0.0.1: │
69
+ │ 3001 3002 … │
70
+ │ ├─ PTY (claude / shell / TUI) │
71
+ │ ├─ /api/health /api/hook │
72
+ │ └─ /ws (PTY IO) │
73
+ └──────────────────────────────────┘
60
74
  ```
61
75
 
62
76
  - **broker** (LAN entry point): the only outward-facing process, listens on
@@ -93,20 +107,20 @@ npm install -g auvezy-terminal-remote # -g is required (it's a CLI)
93
107
  ### Run the background service once at boot (recommended)
94
108
 
95
109
  ```bash
96
- atr --install # writes systemd (Linux/WSL2) / launchd (macOS) config
110
+ atr install # writes systemd (Linux/WSL2) / launchd (macOS) config
97
111
  # Follow the printed steps to enable + start; auto-starts at boot.
98
112
  ```
99
113
 
100
114
  Or run it manually (for testing / no autostart):
101
115
 
102
116
  ```bash
103
- atr --start # foreground, Ctrl+C to quit
117
+ atr start # foreground, Ctrl+C to quit
104
118
  ```
105
119
 
106
120
  ### Open in a browser
107
121
 
108
122
  ```bash
109
- atr --status # one-shot view: process / token / entry URLs / instances
123
+ atr status # one-shot view: process / token / entry URLs / instances
110
124
  ```
111
125
 
112
126
  The "entry URLs" section lists every reachable URL with `?token=<token>`
@@ -131,22 +145,32 @@ spawns the instance, and prints the URL.
131
145
  ## 🔧 Usage
132
146
 
133
147
  ```
134
- atr <service-flag> # manage background service (must follow atr)
135
- atr [run-flags...] [program] [args...] # spawn a PTY instance
136
- atr <subcommand> [args] # instance-level operations
148
+ atr [run-flags...] [program] [args...] # spawn a PTY instance (default)
149
+ atr <subcommand> [args] # manage broker / instances
137
150
  ```
138
151
 
139
- ### Service-level flags (must follow `atr`; mutually exclusive)
152
+ Strict argument order: atr's own flags must come **before** `[program]`.
153
+ Once a program name is seen, every remaining token passes through to the child.
140
154
 
141
- | Flag | Purpose |
155
+ ### Subcommands
156
+
157
+ | Command | Purpose |
142
158
  |---|---|
143
- | `atr --start` | Start the background service (foreground, Ctrl+C to quit) |
144
- | `atr --stop` | Stop the background service (SIGTERM → 5s grace → SIGKILL) |
145
- | `atr --status` | One-shot view: process, token, entry URLs, instances |
146
- | `atr --list` | List all live instances |
147
- | `atr --logs` | Tail today's service log (`~/.atr/broker-YYYY-MM-DD.log`) |
148
- | `atr --install` | Register autostart (systemd / launchd) |
149
- | `atr --uninstall` | Remove autostart |
159
+ | `atr start [--port n] [--host ip]` | Start the broker (foreground, Ctrl+C to quit) |
160
+ | `atr stop` | Stop the broker (SIGTERM → 5s grace → SIGKILL) |
161
+ | `atr status` | One-shot view: process, token, entry URLs, instances |
162
+ | `atr list` | List all live instances |
163
+ | `atr logs` | Tail today's broker log (`~/.atr/broker-YYYY-MM-DD.log`) |
164
+ | `atr install` | Register autostart (systemd / launchd) |
165
+ | `atr uninstall` | Remove autostart (asks for confirmation) |
166
+ | `atr attach <url>` | CLI client to share a PTY with a running instance |
167
+ | `atr kill <pattern \| all>` | Kill instances by substring match; `all` kills every one (with confirm) |
168
+ | `atr completion <zsh\|bash\|fish>` | Print shell completion script to stdout |
169
+
170
+ Reserved words (the subcommands above) take precedence at position 0. To run
171
+ a PATH binary with the same name: `atr ./<name>` or `atr -- <name>`. In an
172
+ interactive terminal, atr will prompt you to choose if a PATH binary
173
+ collides with a subcommand.
150
174
 
151
175
  ### Run flags (used with `atr [program]`)
152
176
 
@@ -158,13 +182,6 @@ atr <subcommand> [args] # instance-level operations
158
182
  | `--workdir <path>` | Child process cwd |
159
183
  | `--token <s>` | Use a fixed token instead of reading `~/.atrrc` |
160
184
 
161
- ### Instance-level subcommands
162
-
163
- | Command | Purpose |
164
- |---|---|
165
- | `atr stop [pattern]` | Stop an instance (substring match on name / cwd / host:port; no pattern = stop all) |
166
- | `atr attach <url>` | CLI client to share a PTY with a running instance |
167
-
168
185
  Full reference (all flags, env vars, config file):
169
186
  [`docs/CLI.md`](./docs/CLI.md). Run `atr -h` for the inline help.
170
187