docs: fix CLI attach section order (#25749)
This commit is contained in:
@@ -61,37 +61,6 @@ opencode agent [command]
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
### attach
|
|
||||||
|
|
||||||
Attach a terminal to an already running OpenCode backend server started via `serve` or `web` commands.
|
|
||||||
|
|
||||||
```bash
|
|
||||||
opencode attach [url]
|
|
||||||
```
|
|
||||||
|
|
||||||
This allows using the TUI with a remote OpenCode backend. For example:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# Start the backend server for web/mobile access
|
|
||||||
opencode web --port 4096 --hostname 0.0.0.0
|
|
||||||
|
|
||||||
# In another terminal, attach the TUI to the running backend
|
|
||||||
opencode attach http://10.20.30.40:4096
|
|
||||||
```
|
|
||||||
|
|
||||||
#### Flags
|
|
||||||
|
|
||||||
| Flag | Short | Description |
|
|
||||||
| ---------------------------------------- | ----- | -------------------------------------------------------------------------- |
|
|
||||||
| <nobr><code>{"--dir"}</code></nobr> | | Working directory to start TUI in |
|
|
||||||
| <nobr><code>{"--continue"}</code></nobr> | `-c` | Continue the last session |
|
|
||||||
| <nobr><code>{"--session"}</code></nobr> | `-s` | Session ID to continue |
|
|
||||||
| <nobr><code>{"--fork"}</code></nobr> | | Fork the session when continuing (use with `--continue` or `--session`) |
|
|
||||||
| <nobr><code>{"--password"}</code></nobr> | `-p` | Basic auth password (defaults to `OPENCODE_SERVER_PASSWORD`) |
|
|
||||||
| <nobr><code>{"--username"}</code></nobr> | `-u` | Basic auth username (defaults to `OPENCODE_SERVER_USERNAME` or `opencode`) |
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
#### create
|
#### create
|
||||||
|
|
||||||
Create a new agent with custom configuration.
|
Create a new agent with custom configuration.
|
||||||
@@ -126,6 +95,37 @@ opencode agent list
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
### attach
|
||||||
|
|
||||||
|
Attach a terminal to an already running OpenCode backend server started via `serve` or `web` commands.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
opencode attach [url]
|
||||||
|
```
|
||||||
|
|
||||||
|
This allows using the TUI with a remote OpenCode backend. For example:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Start the backend server for web/mobile access
|
||||||
|
opencode web --port 4096 --hostname 0.0.0.0
|
||||||
|
|
||||||
|
# In another terminal, attach the TUI to the running backend
|
||||||
|
opencode attach http://10.20.30.40:4096
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Flags
|
||||||
|
|
||||||
|
| Flag | Short | Description |
|
||||||
|
| ---------------------------------------- | ----- | -------------------------------------------------------------------------- |
|
||||||
|
| <nobr><code>{"--dir"}</code></nobr> | | Working directory to start TUI in |
|
||||||
|
| <nobr><code>{"--continue"}</code></nobr> | `-c` | Continue the last session |
|
||||||
|
| <nobr><code>{"--session"}</code></nobr> | `-s` | Session ID to continue |
|
||||||
|
| <nobr><code>{"--fork"}</code></nobr> | | Fork the session when continuing (use with `--continue` or `--session`) |
|
||||||
|
| <nobr><code>{"--password"}</code></nobr> | `-p` | Basic auth password (defaults to `OPENCODE_SERVER_PASSWORD`) |
|
||||||
|
| <nobr><code>{"--username"}</code></nobr> | `-u` | Basic auth username (defaults to `OPENCODE_SERVER_USERNAME` or `opencode`) |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
### auth
|
### auth
|
||||||
|
|
||||||
Command to manage credentials and login for providers.
|
Command to manage credentials and login for providers.
|
||||||
|
|||||||
Reference in New Issue
Block a user