Skip to content

Commit b7c449a

Browse files
committed
docs: update user guides for tmux ssh flow
1 parent e7d2d90 commit b7c449a

3 files changed

Lines changed: 23 additions & 1 deletion

File tree

docs/command-reference.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,17 @@
1717
- `okdev validate`
1818
- `okdev up [--wait-timeout 3m] [--dry-run]`
1919
- Reconciles Pod/PVC resources, updates SSH config, initializes managed forwarding/sync, then exits.
20+
- `--tmux`: enable persistent interactive shells by setting tmux mode on the sidecar.
2021
- `spec.ports` is materialized as SSH `LocalForward`.
2122
- `okdev down [--delete-pvc] [--dry-run]`
2223
- `okdev status [--all] [--all-users]`
2324
- `okdev list [--all-namespaces] [--all-users]`
2425
- `okdev use <session>`
2526
- `okdev connect [--shell /bin/bash] [--cmd "..."] [--no-tty]`
26-
- `okdev ssh [--setup-key] [--user root] [--cmd "..."]`
27+
- `okdev ssh [--setup-key] [--user root] [--cmd "..."] [--no-tmux]`
2728
- Targets merged `okdev-sidecar` (`sshd` + Syncthing).
2829
- Maintains managed host alias in `~/.ssh/config` as `okdev-<session>`.
30+
- `--no-tmux`: bypass tmux for this SSH session when tmux mode is enabled.
2931
- `okdev ports`
3032
- `okdev sync [--mode up|down|bi] [--background] [--dry-run]`
3133
- `okdev prune [--ttl-hours 72] [--all-namespaces] [--all-users] [--include-pvc] [--dry-run]`

docs/quickstart.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,17 +44,25 @@ Use an explicit session name when running multiple environments for the same rep
4444
./bin/okdev up --session serving-main-alice
4545
```
4646

47+
Enable persistent interactive shells backed by tmux:
48+
49+
```bash
50+
./bin/okdev up --tmux
51+
```
52+
4753
`okdev up` performs one-step setup:
4854
- ensures Pod/PVC state
4955
- writes managed `~/.ssh/config` host entry (`okdev-<session>`)
5056
- starts managed SSH/forwarding bootstrap
5157
- starts background Syncthing sync when enabled
58+
- exits after setup (no attach mode)
5259

5360
## Access and Data Movement
5461

5562
```bash
5663
./bin/okdev connect
5764
./bin/okdev ssh --setup-key
65+
./bin/okdev ssh
5866
./bin/okdev sync --mode up
5967
./bin/okdev ports
6068

@@ -71,6 +79,9 @@ Notes:
7179
- `spec.sync.exclude` applies local ignore patterns; `spec.sync.remoteExclude` applies remote-only ignores.
7280
- SSH target is always the merged `okdev-sidecar` container (`sshd` on `22`).
7381
- `spec.ports` are rendered as SSH `LocalForward` entries.
82+
- Local runtime state/logs are stored under `~/.okdev/` (not in the project working directory).
83+
- Use `ssh okdev-<session>` for direct SSH. For tmux-backed interactive sessions, force TTY (`ssh -tt okdev-<session>`).
84+
- Use `okdev ssh --no-tmux` to bypass tmux for a single connection.
7485
- SSH keepalive can be tuned with:
7586
- `spec.ssh.keepAliveIntervalSeconds` (default `10`)
7687
- `spec.ssh.keepAliveTimeoutSeconds` (default `15`, must be `>= interval`)

docs/troubleshooting.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,15 @@
3434
- If local bind conflicts occur, use `okdev ssh --local-port <port>`.
3535
- Verify managed entry exists in `~/.ssh/config`:
3636
- `Host okdev-<session>`
37+
- For tmux-enabled sessions, use interactive TTY mode:
38+
- `okdev ssh` or `ssh -tt okdev-<session>`
39+
- To bypass tmux for one connection:
40+
- `okdev ssh --no-tmux`
3741
- For unstable links, increase:
3842
- `spec.ssh.keepAliveIntervalSeconds`
3943
- `spec.ssh.keepAliveTimeoutSeconds`
44+
45+
## Local State Files
46+
47+
- okdev stores local runtime state in `~/.okdev/` (locks, logs, SSH metadata, sync state).
48+
- If behavior looks stale after upgrades, inspect and clean targeted files under `~/.okdev/` instead of deleting project files.

0 commit comments

Comments
 (0)