Skip to content

Commit 82dde7a

Browse files
committed
docs(browser): clarify JSON flag placement
1 parent bb26753 commit 82dde7a

2 files changed

Lines changed: 8 additions & 3 deletions

File tree

docs/cli/browser.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,10 @@ Related: [Browser tool](/tools/browser)
2020
- `--timeout <ms>`: request timeout in ms (default: `30000`).
2121
- `--expect-final`: wait for a final Gateway response.
2222
- `--browser-profile <name>`: choose a browser profile (default: `openclaw`, or `browser.defaultProfile`).
23-
- `--json`: machine-readable output (where supported).
23+
- `--json`: machine-readable output (where supported). Prefer the browser-level flag before
24+
the subcommand, for example `openclaw browser --json status`; trailing placement such as
25+
`openclaw browser status --json` is also supported when the selected child command does
26+
not define its own `--json`.
2427

2528
## Quick start (local)
2629

docs/tools/browser.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -309,8 +309,10 @@ main model can read the screenshot directly.
309309
browser processes.
310310
- On Linux hosts without `DISPLAY` or `WAYLAND_DISPLAY`, local managed profiles
311311
default to headless automatically when neither the environment nor profile/global
312-
config explicitly chooses headed mode. `openclaw browser status --json`
313-
reports `headlessSource` as `env`, `profile`, `config`,
312+
config explicitly chooses headed mode. The canonical JSON form is
313+
`openclaw browser --json status`, and trailing `status --json` also works
314+
because `status` does not define its own `--json`. It reports
315+
`headlessSource` as `env`, `profile`, `config`,
314316
`request`, `linux-display-fallback`, or `default`.
315317
- `OPENCLAW_BROWSER_HEADLESS=1` forces local managed launches headless for the
316318
current process. `OPENCLAW_BROWSER_HEADLESS=0` forces headed mode for ordinary

0 commit comments

Comments
 (0)