docs(cli): fix command examples (#52603)

Co-authored-by: rekram1-node <rekram1-node@users.noreply.github.com>
This commit is contained in:
opencode-agent[bot]
2026-10-01 19:34:08 -05:00
committed by GitHub
Unverified
parent 2deb0e250f
commit 37f3e239c6
@@ -3,7 +3,7 @@ title: "Commands"
description: "Reference for the opencode command line."
---
Every command accepts `--help` for its full flag list, for example `opencode run --help`. Commands that talk to a server also accept `--standalone` to run a private server and `--server <url>` to target a specific one.
Every command accepts `--help` for its full flag list, for example `opencode run --help`. Some server-backed commands accept `--standalone` to run a private server or `--server <url>` to target a specific one; check the command's help for its supported flags.
## run
@@ -167,7 +167,7 @@ $ opencode auth login anthropic
Log in with a specific authentication method.
```bash
$ opencode auth login anthropic --method api-key
$ opencode auth login anthropic --method key
```
Log out of a saved account.
@@ -462,13 +462,13 @@ $ opencode api GET /api/session
Call an operation ID with a query parameter.
```bash
$ opencode api v2.session.list --param limit=10
$ opencode api session.list --param limit=10
```
Send a JSON body.
```bash
$ opencode api v2.session.create --data '{"title": "New session"}'
$ opencode api session.create --data '{"title": "New session"}'
```
Add a request header.
@@ -540,7 +540,7 @@ $ opencode upgrade
Upgrade to a specific version with a specific package manager.
```bash
$ opencode upgrade 1.18.15 --method bun
$ opencode upgrade 2.0.21 --method bun
```
View all subcommands and flags.