summaryrefslogtreecommitdiffhomepage
path: root/packages/web/src
diff options
context:
space:
mode:
authorNindaleth <[email protected]>2025-12-28 02:11:30 +0100
committerGitHub <[email protected]>2025-12-27 19:11:30 -0600
commit2fe7a7f2d32e8f61d1e88e2bd2966b66ee9a9cd3 (patch)
tree930c823f4916a5fda4193bf88703caaea17b59c5 /packages/web/src
parent8a2f4ddf70813aa37c69810d5c5a96a1388dd6fa (diff)
downloadopencode-2fe7a7f2d32e8f61d1e88e2bd2966b66ee9a9cd3.tar.gz
opencode-2fe7a7f2d32e8f61d1e88e2bd2966b66ee9a9cd3.zip
docs: document attach command (#6254)
Co-authored-by: Black_Fox <[email protected]>
Diffstat (limited to 'packages/web/src')
-rw-r--r--packages/web/src/content/docs/cli.mdx29
1 files changed, 28 insertions, 1 deletions
diff --git a/packages/web/src/content/docs/cli.mdx b/packages/web/src/content/docs/cli.mdx
index 4a826e5b3..35ef993b8 100644
--- a/packages/web/src/content/docs/cli.mdx
+++ b/packages/web/src/content/docs/cli.mdx
@@ -57,6 +57,33 @@ 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 |
+| ------------ | ----- | --------------------------------- |
+| `--dir` | | Working directory to start TUI in |
+| `--session` | `-s` | Session ID to continue |
+
+---
+
#### create
Create a new agent with custom configuration.
@@ -325,7 +352,7 @@ opencode run --attach http://localhost:4096 "Explain async/await in JavaScript"
### serve
-Start a headless opencode server for API access. Check out the [server docs](/docs/server) for the full HTTP interface.
+Start a headless OpenCode server for API access. Check out the [server docs](/docs/server) for the full HTTP interface.
```bash
opencode serve