Skip to content

Commit 515ef8e

Browse files
authored
docs(cli): add documentation for --fork flag (#12561)
1 parent fedf9fe commit 515ef8e

1 file changed

Lines changed: 24 additions & 22 deletions

File tree

  • packages/web/src/content/docs

packages/web/src/content/docs/cli.mdx

Lines changed: 24 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,16 @@ opencode [project]
2929

3030
#### Flags
3131

32-
| Flag | Short | Description |
33-
| ------------ | ----- | ------------------------------------------ |
34-
| `--continue` | `-c` | Continue the last session |
35-
| `--session` | `-s` | Session ID to continue |
36-
| `--prompt` | | Prompt to use |
37-
| `--model` | `-m` | Model to use in the form of provider/model |
38-
| `--agent` | | Agent to use |
39-
| `--port` | | Port to listen on |
40-
| `--hostname` | | Hostname to listen on |
32+
| Flag | Short | Description |
33+
|--------------|-------|-------------------------------------------------------------------------|
34+
| `--continue` | `-c` | Continue the last session |
35+
| `--session` | `-s` | Session ID to continue |
36+
| `--fork` | | Fork the session when continuing (use with `--continue` or `--session`) |
37+
| `--prompt` | | Prompt to use |
38+
| `--model` | `-m` | Model to use in the form of provider/model |
39+
| `--agent` | | Agent to use |
40+
| `--port` | | Port to listen on |
41+
| `--hostname` | | Hostname to listen on |
4142

4243
---
4344

@@ -334,19 +335,20 @@ opencode run --attach http://localhost:4096 "Explain async/await in JavaScript"
334335

335336
#### Flags
336337

337-
| Flag | Short | Description |
338-
| ------------ | ----- | ------------------------------------------------------------------ |
339-
| `--command` | | The command to run, use message for args |
340-
| `--continue` | `-c` | Continue the last session |
341-
| `--session` | `-s` | Session ID to continue |
342-
| `--share` | | Share the session |
343-
| `--model` | `-m` | Model to use in the form of provider/model |
344-
| `--agent` | | Agent to use |
345-
| `--file` | `-f` | File(s) to attach to message |
346-
| `--format` | | Format: default (formatted) or json (raw JSON events) |
347-
| `--title` | | Title for the session (uses truncated prompt if no value provided) |
348-
| `--attach` | | Attach to a running opencode server (e.g., http://localhost:4096) |
349-
| `--port` | | Port for the local server (defaults to random port) |
338+
| Flag | Short | Description |
339+
|--------------|-------|-------------------------------------------------------------------------|
340+
| `--command` | | The command to run, use message for args |
341+
| `--continue` | `-c` | Continue the last session |
342+
| `--session` | `-s` | Session ID to continue |
343+
| `--fork` | | Fork the session when continuing (use with `--continue` or `--session`) |
344+
| `--share` | | Share the session |
345+
| `--model` | `-m` | Model to use in the form of provider/model |
346+
| `--agent` | | Agent to use |
347+
| `--file` | `-f` | File(s) to attach to message |
348+
| `--format` | | Format: default (formatted) or json (raw JSON events) |
349+
| `--title` | | Title for the session (uses truncated prompt if no value provided) |
350+
| `--attach` | | Attach to a running opencode server (e.g., http://localhost:4096) |
351+
| `--port` | | Port for the local server (defaults to random port) |
350352

351353
---
352354

0 commit comments

Comments
 (0)