|
13 | 13 | ## Commands |
14 | 14 |
|
15 | 15 | - `okdev version` |
16 | | -- `okdev init [--template basic|gpu|llm-stack] [--force]` |
| 16 | +- `okdev init [--template basic|gpu|llm-stack] [--stignore-preset default|python|node|go|rust] [--force]` |
17 | 17 | - `okdev validate` |
18 | 18 | - `okdev up [--wait-timeout 10m] [--dry-run]` |
19 | 19 | - `okdev down [--delete-pvc] [--dry-run]` |
|
23 | 23 | - `okdev connect [--shell /bin/bash] [--cmd "..."] [--no-tty]` |
24 | 24 | - `okdev ssh [--setup-key] [--user root] [--cmd "..."] [--no-tmux]` |
25 | 25 | - `okdev ports` |
26 | | -- `okdev sync [--mode up|down|bi] [--background] [--reset] [--dry-run]` |
| 26 | +- `okdev sync [--mode up|down|bi] [--foreground] [--reset] [--dry-run]` |
27 | 27 | - `okdev prune [--ttl-hours 72] [--all-namespaces] [--all-users] [--include-pvc] [--dry-run]` |
28 | 28 |
|
29 | | -### `okdev init [--template basic|gpu|llm-stack] [--force]` |
| 29 | +### `okdev init [--template basic|gpu|llm-stack] [--stignore-preset default|python|node|go|rust] [--force]` |
30 | 30 |
|
31 | 31 | - Writes a starter `.okdev.yaml`. |
32 | 32 | - For built-in templates, it also writes a starter local `.stignore` file for the initialized sync root. |
| 33 | +- `--stignore-preset`: override the starter `.stignore` patterns with a project-oriented preset. |
| 34 | +- When `--stignore-preset` is omitted, `okdev init` tries to detect a preset from common repo markers like `go.mod`, `package.json`, `Cargo.toml`, and `pyproject.toml`. |
33 | 35 |
|
34 | 36 | ### `okdev up [--wait-timeout 10m] [--dry-run]` |
35 | 37 |
|
36 | 38 | - Reconciles Pod/PVC resources, updates SSH config, initializes managed forwarding/sync, then exits. |
37 | 39 | - tmux-backed persistent interactive shells are enabled by default. |
38 | 40 | - `--tmux`: explicitly enable tmux mode in the dev container. |
39 | 41 | - `--no-tmux`: disable tmux mode for this pod. |
40 | | -- When `sync.engine=syncthing`, `okdev up` starts background sync in bidirectional mode by default. |
| 42 | +- When `sync.engine=syncthing`, `okdev up` refreshes the session's local Syncthing processes and starts background sync in bidirectional mode by default. |
41 | 43 | - `spec.ports` is materialized as SSH `LocalForward`. |
42 | 44 |
|
43 | 45 | ### `okdev ssh [--setup-key] [--user root] [--cmd "..."] [--no-tmux]` |
|
51 | 53 | - Advanced/recovery command. Rebuilds managed SSH `LocalForward` state from `spec.ports` after disconnects or local port changes. |
52 | 54 | - No-op when managed forwards are already healthy and config is unchanged. |
53 | 55 |
|
54 | | -### `okdev sync [--mode up|down|bi] [--background] [--reset] [--dry-run]` |
| 56 | +### `okdev sync [--mode up|down|bi] [--foreground] [--reset] [--dry-run]` |
55 | 57 |
|
56 | | -- Advanced command. Use for foreground sync debugging, or explicit one-way sync (`up`/`down`). |
| 58 | +- Advanced command. Starts detached background sync by default; use `--foreground` for sync debugging, or explicit one-way sync (`up`/`down`). |
57 | 59 | - For default `--mode bi`, no-op when background sync is already active for the session. |
| 60 | +- `--background`: explicitly request detached background mode. |
58 | 61 | - `--reset`: stop the session's existing local sync processes and local Syncthing state, then bootstrap sync again. |
59 | | -- `okdev init` writes the starter config and, when `spec.sync.exclude` is populated, a local `.stignore` file for the initialized sync root. |
| 62 | +- `okdev init` writes the starter config and, for built-in templates, a starter local `.stignore` file for the initialized sync root. |
0 commit comments