Skip to content

Commit 71078d0

Browse files
committed
docs: add documentation for v1.1.0 features
1 parent 23f2f08 commit 71078d0

4 files changed

Lines changed: 675 additions & 7 deletions

File tree

docs/basic-usage.mdx

Lines changed: 138 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,16 +76,64 @@ Use this for:
7676
Include `` `r`n`` (carriage return + newline) for cmd.exe to execute the command.
7777
</Note>
7878

79+
### Built-in UI Mode
80+
81+
Launch the interactive text-based UI for managing multiple sessions:
82+
83+
```powershell
84+
# Start the built-in UI
85+
./undying-terminal.exe --ui
86+
```
87+
88+
**UI Commands:**
89+
90+
```text
91+
add <name> <host> <port> <client_id> <passkey> # Create a profile
92+
set-tunnel <name> <spec> # Configure port forwarding
93+
set-flag <name> <noexit|tunnel-only|predictive-echo> <on|off> # Set options
94+
start <name> # Launch a session
95+
stop <name> # Stop a running session
96+
remove <name> # Delete a profile
97+
list # Show all profiles
98+
help # Show commands
99+
quit # Exit UI
100+
```
101+
102+
**Example Session:**
103+
104+
```text
105+
ut-ui> add dev 127.0.0.1 2022 abc123 mypasskey
106+
Profile 'dev' added
107+
108+
ut-ui> set-flag dev predictive-echo on
109+
Flag 'predictive-echo' set to 'on' for profile 'dev'
110+
111+
ut-ui> start dev
112+
started 'dev' (pid=12345)
113+
114+
ut-ui> list
115+
- dev host=127.0.0.1 port=2022 running=yes tunnel-only=off predictive-echo=on
116+
117+
ut-ui> quit
118+
```
119+
79120
### SSH Bootstrap (Remote Servers)
80121

81122
```powershell
82123
# Connect to remote server, start terminal, connect directly
83124
./undying-terminal.exe --ssh user@remote-server.com -l username
84125
```
85126

127+
**With Tmux Integration:**
128+
129+
```powershell
130+
# Auto-attach to tmux session (creates if doesn't exist)
131+
./undying-terminal.exe --ssh user@remote-server.com -l username --tmux --tmux-session mysession
132+
```
133+
86134
This:
87135
1. SSHs to remote server
88-
2. Starts `undying-terminal-terminal` there
136+
2. Starts `undying-terminal-terminal` there (optionally inside tmux)
89137
3. Extracts credentials
90138
4. Switches to direct TCP connection
91139
5. Keeps session alive forever
@@ -183,9 +231,30 @@ python train-model.py # Takes 6 hours
183231

184232
## Session Management
185233

186-
### Multiple Sessions
234+
### Built-in UI Multi-Session (v1.1.0+)
235+
236+
The easiest way to manage multiple sessions is with the built-in UI:
237+
238+
```powershell
239+
# Launch the UI
240+
./undying-terminal.exe --ui
241+
242+
# Create profiles for different environments
243+
ut-ui> add dev localhost 2022 dev-id dev-key
244+
ut-ui> add prod prod-server.com 2022 prod-id prod-key
245+
ut-ui> add staging staging-server.com 2022 staging-id staging-key
187246
188-
Run multiple independent sessions:
247+
# Start any session
248+
ut-ui> start dev
249+
250+
# Switch between sessions by stopping one and starting another
251+
ut-ui> stop dev
252+
ut-ui> start prod
253+
```
254+
255+
### Traditional Multiple Sessions
256+
257+
Run multiple independent sessions manually:
189258

190259
<CodeGroup>
191260
```powershell Session 1: Development
@@ -239,6 +308,72 @@ Prod Session:
239308
**Exiting the shell** (e.g., `exit` or `Ctrl+D`) will **terminate the terminal process**. This ends the session! Use client disconnect instead.
240309
</Warning>
241310

311+
## Advanced Features
312+
313+
### Predictive Echo (v1.1.0+)
314+
315+
Enable local echo prediction for high-latency connections:
316+
317+
```powershell
318+
# Direct connection with predictive echo
319+
./undying-terminal.exe `
320+
--connect <HOST> <PORT> <CLIENT_ID> `
321+
--key <PASSKEY> `
322+
--predictive-echo `
323+
--noexit
324+
325+
# SSH bootstrap with predictive echo
326+
./undying-terminal.exe --ssh user@remote --predictive-echo
327+
```
328+
329+
**When to use:**
330+
- Connections with >100ms latency
331+
- Satellite or cellular networks
332+
- International connections
333+
334+
**How it works:**
335+
- Characters appear instantly (local echo)
336+
- Server output reconciles with local echo
337+
- No duplicate characters visible
338+
339+
### Tunnel-Only Mode (v1.1.0+)
340+
341+
Run port forwarding without terminal overhead:
342+
343+
```powershell
344+
# Forward ports without interactive shell
345+
./undying-terminal.exe `
346+
--connect <HOST> <PORT> <CLIENT_ID> `
347+
--key <PASSKEY> `
348+
-t 5432:db-server:5432 `
349+
-t 6379:redis:6379 `
350+
--tunnel-only
351+
```
352+
353+
**Use cases:**
354+
- Database tunneling
355+
- API proxy connections
356+
- Secure access to internal services
357+
- CI/CD pipeline integration
358+
359+
### IPv6 Support (v1.1.0+)
360+
361+
Connect to IPv6 hosts:
362+
363+
```powershell
364+
# IPv6 address
365+
./undying-terminal.exe --connect 2001:db8::1 2022 <ID> --key <KEY>
366+
367+
# IPv6 with SSH bootstrap
368+
./undying-terminal.exe --ssh user@[2001:db8::1] -l username
369+
370+
# IPv6 tunnels
371+
./undying-terminal.exe `
372+
--connect <HOST> <PORT> <ID> `
373+
--key <KEY> `
374+
-t "[::1]:8080:[2001:db8::1]:80"
375+
```
376+
242377
## Disconnecting vs. Exiting
243378

244379
### Client Disconnect (Safe)

0 commit comments

Comments
 (0)