From 5f67c023a2c3c7da4b4d76d6c635663f0af0d4f0 Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Sat, 13 Dec 2025 16:23:02 +0000 Subject: [PATCH] docs(clawdis-mac): improve help for browser control --- .../macos/Sources/ClawdisCLI/BrowserCLI.swift | 7 +- .../macos/Sources/ClawdisCLI/ClawdisCLI.swift | 83 +++++++++++++------ 2 files changed, 65 insertions(+), 25 deletions(-) diff --git a/apps/macos/Sources/ClawdisCLI/BrowserCLI.swift b/apps/macos/Sources/ClawdisCLI/BrowserCLI.swift index 9aeab48d5..9cd3ba89a 100644 --- a/apps/macos/Sources/ClawdisCLI/BrowserCLI.swift +++ b/apps/macos/Sources/ClawdisCLI/BrowserCLI.swift @@ -239,6 +239,8 @@ enum BrowserCLI { private static func printHelp() { let usage = """ + Browser (clawd) — control clawd’s dedicated Chrome/Chromium via the gateway’s loopback server. + Usage: clawdis-mac browser status [--url ] clawdis-mac browser start [--url <...>] @@ -248,8 +250,11 @@ enum BrowserCLI { clawdis-mac browser focus [--url <...>] clawdis-mac browser close [--url <...>] clawdis-mac browser screenshot [--target-id ] [--full-page] [--url <...>] + + Notes: + - Config defaults come from ~/.clawdis/clawdis.json (browser.enabled, browser.controlUrl). + - `browser screenshot` prints MEDIA: in text mode. """ print(usage) } } - diff --git a/apps/macos/Sources/ClawdisCLI/ClawdisCLI.swift b/apps/macos/Sources/ClawdisCLI/ClawdisCLI.swift index 35f071d42..96dc70f5f 100644 --- a/apps/macos/Sources/ClawdisCLI/ClawdisCLI.swift +++ b/apps/macos/Sources/ClawdisCLI/ClawdisCLI.swift @@ -408,34 +408,69 @@ struct ClawdisCLI { private static func printHelp() { let usage = """ - clawdis-mac — talk to the running Clawdis.app XPC service + clawdis-mac — talk to the running Clawdis.app (local control socket) Usage: clawdis-mac [--json] ... - clawdis-mac notify --title --body [--sound ] [--priority ] [--delivery ] - clawdis-mac ensure-permissions - [--cap ] - [--interactive] - clawdis-mac ui screens - clawdis-mac ui screenshot [--screen-index ] [--window-id ] - clawdis-mac run [--cwd ] [--env KEY=VAL] [--timeout ] [--needs-screen-recording] - clawdis-mac status - clawdis-mac rpc-status - clawdis-mac agent --message [--thinking ] - [--session ] [--deliver] [--to ] - clawdis-mac node list - clawdis-mac node invoke --node --command [--params-json ] - clawdis-mac canvas show [--session ] [--path ] - [--x --y ] [--width --height ] - clawdis-mac canvas hide [--session ] - clawdis-mac canvas goto --path [--session ] - [--x --y ] [--width --height ] - clawdis-mac canvas eval --js [--session ] - clawdis-mac canvas snapshot [--out ] [--session ] - clawdis-mac browser status|start|stop|tabs|open|focus|close|screenshot - clawdis-mac --help - Default output is text. Use --json for machine-readable output. + Commands: + Notifications: + clawdis-mac notify --title --body [--sound ] + [--priority ] [--delivery ] + + Permissions: + clawdis-mac ensure-permissions + [--cap ] + [--interactive] + + UI: + clawdis-mac ui screens + clawdis-mac ui screenshot [--screen-index ] [--window-id ] + + Shell: + clawdis-mac run [--cwd ] [--env KEY=VAL] [--timeout ] + [--needs-screen-recording] + + Status: + clawdis-mac status + clawdis-mac rpc-status + + Agent: + clawdis-mac agent --message [--thinking ] + [--session ] [--deliver] [--to ] + + Nodes: + clawdis-mac node list + clawdis-mac node invoke --node --command [--params-json ] + + Canvas: + clawdis-mac canvas show [--session ] [--path ] + [--x --y ] [--width --height ] + clawdis-mac canvas hide [--session ] + clawdis-mac canvas goto --path [--session ] + [--x --y ] [--width --height ] + clawdis-mac canvas eval --js [--session ] + clawdis-mac canvas snapshot [--out ] [--session ] + + Browser (clawd): + clawdis-mac browser status|start|stop|tabs|open|focus|close|screenshot + + Browser notes: + - Uses clawd’s dedicated Chrome/Chromium profile (separate user-data dir). + - Talks to the gateway’s loopback browser-control server (config: ~/.clawdis/clawdis.json). + - Keys: browser.enabled, browser.controlUrl (default: http://127.0.0.1:18791). + + Examples: + clawdis-mac status + clawdis-mac agent --message "Hello from clawd" --thinking low + clawdis-mac browser start + clawdis-mac browser open https://example.com + clawdis-mac browser tabs + clawdis-mac browser screenshot --full-page + + Output: + Default output is text. Use --json for machine-readable output. + In text mode, `browser screenshot` prints MEDIA:. """ print(usage) }