diff --git a/docs/cli/index.md b/docs/cli/index.md new file mode 100644 index 000000000..8e1bf6e22 --- /dev/null +++ b/docs/cli/index.md @@ -0,0 +1,533 @@ +--- +summary: "CLI reference for clawdbot commands, subcommands, and options" +read_when: + - Adding or modifying CLI commands or options + - Documenting new command surfaces +--- + +# CLI reference + +This page mirrors `src/cli/*` and is the source of truth for CLI behavior. +If you change the CLI code, update this doc. + +## Global flags + +- `--dev`: isolate state under `~/.clawdbot-dev` and shift default ports. +- `--profile `: isolate state under `~/.clawdbot-`. +- `-V`, `--version`, `-v`: print version and exit. + +## Command tree + +``` +clawdbot [--dev] [--profile ] + setup + onboard + configure (alias: config) + update + doctor + login + logout + send + poll + agent + status + health + sessions + gateway + call + health + status + wake + send + agent + stop + restart + gateway-daemon + models + list + status + set + set-image + aliases list|add|remove + fallbacks list|add|remove|clear + image-fallbacks list|add|remove|clear + scan + wake + cron + status + list + add + edit + rm + enable + disable + runs + run + nodes + status + describe + list + pending + approve + reject + rename + invoke + run + notify + camera list|snap|clip + canvas snapshot + screen record + location get + canvas + snapshot + present + hide + navigate + eval + a2ui push|reset + browser + status + start + stop + reset-profile + tabs + open + focus + close + profiles + create-profile + delete-profile + screenshot + snapshot + navigate + resize + click + type + press + hover + drag + select + upload + fill + dialog + wait + evaluate + console + pdf + hooks + gmail setup|run + pairing + list + approve + telegram + pairing list|approve + docs + dns + setup + tui +``` + +## Setup + onboarding + +### `setup` +Initialize config + workspace. + +Options: +- `--workspace `: agent workspace path (default `~/clawd`). +- `--wizard`: run the onboarding wizard. +- `--non-interactive`: run wizard without prompts. +- `--mode `: wizard mode. +- `--remote-url `: remote Gateway URL. +- `--remote-token `: remote Gateway token. + +### `onboard` +Interactive wizard to set up gateway, workspace, and skills. + +Options: +- `--workspace ` +- `--non-interactive` +- `--mode ` +- `--auth-choice ` +- `--anthropic-api-key ` +- `--gateway-port ` +- `--gateway-bind ` +- `--gateway-auth ` +- `--gateway-token ` +- `--gateway-password ` +- `--remote-url ` +- `--remote-token ` +- `--tailscale ` +- `--tailscale-reset-on-exit` +- `--install-daemon` +- `--daemon-runtime ` +- `--skip-skills` +- `--skip-health` +- `--node-manager ` +- `--json` + +### `configure` / `config` +Interactive configuration wizard (models, providers, skills, gateway). + +### `update` +Audit and modernize the local configuration. + +### `doctor` +Health checks + quick fixes. + +Options: +- `--no-workspace-suggestions`: disable workspace memory hints. + +## Auth + provider helpers + +### `login` +Link a WhatsApp Web account via QR. + +Options: +- `--verbose` +- `--provider ` (default `whatsapp`) +- `--account ` + +### `logout` +Clear cached WhatsApp Web credentials. + +Options: +- `--provider ` +- `--account ` + +### `pairing` +Approve DM pairing requests across providers. + +Subcommands: +- `pairing list --provider [--json]` +- `pairing approve --provider <...> [--notify]` + +### `telegram pairing` +Telegram-only pairing helper. + +Subcommands: +- `telegram pairing list [--json]` +- `telegram pairing approve [--no-notify]` + +### `hooks gmail` +Gmail Pub/Sub hook setup + runner. See [/automation/gmail-pubsub](/automation/gmail-pubsub). + +Subcommands: +- `hooks gmail setup` (requires `--account `; supports `--project`, `--topic`, `--subscription`, `--label`, `--hook-url`, `--hook-token`, `--push-token`, `--bind`, `--port`, `--path`, `--include-body`, `--max-bytes`, `--renew-minutes`, `--tailscale`, `--tailscale-path`, `--push-endpoint`, `--json`) +- `hooks gmail run` (runtime overrides for the same flags) + +### `dns setup` +Wide-area discovery DNS helper (CoreDNS + Tailscale). See [/gateway/discovery](/gateway/discovery). + +Options: +- `--apply`: install/update CoreDNS config (requires sudo; macOS only). + +## Messaging + agent + +### `send` +Send a message through a provider. + +Required: +- `--to ` +- `--message ` + +Options: +- `--media ` +- `--gif-playback` +- `--provider ` +- `--account ` (WhatsApp) +- `--dry-run` +- `--json` +- `--verbose` + +### `poll` +Create a poll (WhatsApp or Discord). + +Required: +- `--to ` +- `--question ` +- `--option ` (repeat 2-12 times) + +Options: +- `--max-selections ` +- `--duration-hours ` (Discord) +- `--provider ` +- `--dry-run` +- `--json` +- `--verbose` + +### `agent` +Run one agent turn via the Gateway (or `--local` embedded). + +Required: +- `--message ` + +Options: +- `--to ` (for session key and optional delivery) +- `--session-id ` +- `--thinking ` +- `--verbose ` +- `--provider ` +- `--local` +- `--deliver` +- `--json` +- `--timeout ` + +### `status` +Show linked session health and recent recipients. + +Options: +- `--json` +- `--deep` (probe providers) +- `--timeout ` +- `--verbose` + +### `health` +Fetch health from the running Gateway. + +Options: +- `--json` +- `--timeout ` +- `--verbose` + +### `sessions` +List stored conversation sessions. + +Options: +- `--json` +- `--verbose` +- `--store ` +- `--active ` + +## Gateway + +### `gateway` +Run the WebSocket Gateway. + +Options: +- `--port ` +- `--bind ` +- `--token ` +- `--auth ` +- `--password ` +- `--tailscale ` +- `--tailscale-reset-on-exit` +- `--allow-unconfigured` +- `--force` (kill existing listener on port) +- `--verbose` +- `--ws-log ` +- `--compact` (alias for `--ws-log compact`) + +### `gateway-daemon` +Run the Gateway as a long-lived daemon (same options as `gateway`, minus `--allow-unconfigured` and `--force`). + +### `gateway ` +Gateway RPC helpers (use `--url`, `--token`, `--password`, `--timeout`, `--expect-final` for each). + +Subcommands: +- `gateway call [--params ]` +- `gateway health` +- `gateway status` +- `gateway wake --text [--mode now|next-heartbeat]` +- `gateway send --to --message [--media-url ] [--gif-playback] [--idempotency-key ]` +- `gateway agent --message [--to ] [--session-id ] [--thinking ] [--deliver] [--timeout-seconds ] [--idempotency-key ]` +- `gateway stop` +- `gateway restart` + +## Models + +See [/concepts/models](/concepts/models) for fallback behavior and scanning strategy. + +### `models` (root) +`clawdbot models` is an alias for `models status`. + +### `models list` +Options: +- `--all` +- `--local` +- `--provider ` +- `--json` +- `--plain` + +### `models status` +Options: +- `--json` +- `--plain` + +### `models set ` +Set `agent.model.primary`. + +### `models set-image ` +Set `agent.imageModel.primary`. + +### `models aliases list|add|remove` +Options: +- `list`: `--json`, `--plain` +- `add ` +- `remove ` + +### `models fallbacks list|add|remove|clear` +Options: +- `list`: `--json`, `--plain` +- `add ` +- `remove ` +- `clear` + +### `models image-fallbacks list|add|remove|clear` +Options: +- `list`: `--json`, `--plain` +- `add ` +- `remove ` +- `clear` + +### `models scan` +Options: +- `--min-params ` +- `--max-age-days ` +- `--provider ` +- `--max-candidates ` +- `--timeout ` +- `--concurrency ` +- `--yes` +- `--no-input` +- `--set-default` +- `--set-image` +- `--json` + +## Cron + wake + +### `wake` +Enqueue a system event and optionally trigger a heartbeat (Gateway RPC). + +Required: +- `--text ` + +Options: +- `--mode ` +- `--json` +- `--url`, `--token`, `--timeout`, `--expect-final` + +### `cron` +Manage scheduled jobs (Gateway RPC). See [/automation/cron-jobs](/automation/cron-jobs). + +Subcommands: +- `cron status [--json]` +- `cron list [--all] [--json]` +- `cron add` (requires `--name` and exactly one of `--at` | `--every` | `--cron`, and exactly one payload of `--system-event` | `--message`) +- `cron edit ` (patch fields) +- `cron rm ` +- `cron enable ` +- `cron disable ` +- `cron runs --id [--limit ]` +- `cron run [--force]` + +All `cron` commands accept `--url`, `--token`, `--timeout`, `--expect-final`. + +## Nodes + +`nodes` talks to the Gateway and targets paired nodes. See [/nodes](/nodes). + +Common options: +- `--url`, `--token`, `--timeout`, `--json` + +Subcommands: +- `nodes status` +- `nodes describe --node ` +- `nodes list` +- `nodes pending` +- `nodes approve ` +- `nodes reject ` +- `nodes rename --node --name ` +- `nodes invoke --node --command [--params ] [--invoke-timeout ] [--idempotency-key ]` +- `nodes run --node [--cwd ] [--env KEY=VAL] [--command-timeout ] [--needs-screen-recording] [--invoke-timeout ] ` (mac only) +- `nodes notify --node [--title ] [--body ] [--sound ] [--priority ] [--delivery ] [--invoke-timeout ]` (mac only) + +Camera: +- `nodes camera list --node ` +- `nodes camera snap --node [--facing front|back|both] [--device-id ] [--max-width ] [--quality <0-1>] [--delay-ms ] [--invoke-timeout ]` +- `nodes camera clip --node [--facing front|back] [--device-id ] [--duration ] [--no-audio] [--invoke-timeout ]` + +Canvas + screen: +- `nodes canvas snapshot --node [--format png|jpg|jpeg] [--max-width ] [--quality <0-1>] [--invoke-timeout ]` +- `nodes screen record --node [--screen ] [--duration ] [--fps ] [--no-audio] [--out ] [--invoke-timeout ]` + +Location: +- `nodes location get --node [--max-age ] [--accuracy ] [--location-timeout ] [--invoke-timeout ]` + +## Canvas + +Canvas RPC helper (top-level wrapper for `node.invoke`). See [/platforms/mac/canvas](/platforms/mac/canvas). + +Common options: +- `--url`, `--token`, `--timeout`, `--json` + +Subcommands: +- `canvas snapshot [--node ] [--format png|jpg] [--max-width ] [--quality <0-1>]` +- `canvas present [--node ] [--target ] [--x ] [--y ] [--width ] [--height ]` +- `canvas hide [--node ]` +- `canvas navigate [--node ]` +- `canvas eval [] [--js ] [--node ]` +- `canvas a2ui push (--jsonl | --text ) [--node ]` +- `canvas a2ui reset [--node ]` + +## Browser + +Browser control CLI (dedicated Chrome/Chromium). See [/tools/browser](/tools/browser). + +Common options: +- `--url ` +- `--browser-profile ` +- `--json` + +Manage: +- `browser status` +- `browser start` +- `browser stop` +- `browser reset-profile` +- `browser tabs` +- `browser open ` +- `browser focus ` +- `browser close [targetId]` +- `browser profiles` +- `browser create-profile --name [--color ] [--cdp-url ]` +- `browser delete-profile --name ` + +Inspect: +- `browser screenshot [targetId] [--full-page] [--ref ] [--element ] [--type png|jpeg]` +- `browser snapshot [--format aria|ai] [--target-id ] [--limit ] [--out ]` + +Actions: +- `browser navigate [--target-id ]` +- `browser resize [--target-id ]` +- `browser click [--double] [--button ] [--modifiers ] [--target-id ]` +- `browser type [--submit] [--slowly] [--target-id ]` +- `browser press [--target-id ]` +- `browser hover [--target-id ]` +- `browser drag [--target-id ]` +- `browser select [--target-id ]` +- `browser upload [--ref ] [--input-ref ] [--element ] [--target-id ] [--timeout-ms ]` +- `browser fill [--fields ] [--fields-file ] [--target-id ]` +- `browser dialog --accept|--dismiss [--prompt ] [--target-id ] [--timeout-ms ]` +- `browser wait [--time ] [--text ] [--text-gone ] [--target-id ]` +- `browser evaluate --fn [--ref ] [--target-id ]` +- `browser console [--level ] [--target-id ]` +- `browser pdf [--target-id ]` + +## Docs search + +### `docs [query...]` +Search the live docs index. + +## TUI + +### `tui` +Open the terminal UI connected to the Gateway. + +Options: +- `--url ` +- `--token ` +- `--password ` +- `--session ` +- `--deliver` +- `--thinking ` +- `--timeout-ms ` +- `--history-limit ` diff --git a/docs/concepts/models.md b/docs/concepts/models.md index c8b720841..64db76e05 100644 --- a/docs/concepts/models.md +++ b/docs/concepts/models.md @@ -14,27 +14,35 @@ that prefers tool-call + image-capable models and maintains ordered fallbacks. ## Model recommendations -Through testing, we’ve found Anthropic Opus 4.5 is the most useful general-purpose model for anything coding-related. We suggest GPT 5.2 Codex for coding and sub-agents. For personal assistant work, nothing comes close to Opus. If you’re going all-in on Claude, we recommend the Max $200 subscription: https://claude.com/pricing +Through testing, we’ve found [Claude Opus 4.5](https://www.anthropic.com/claude/opus) is the most useful general-purpose model for anything coding-related. We suggest [GPT-5.2-Codex](https://developers.openai.com/codex/models) for coding and sub-agents. For personal assistant work, nothing comes close to Opus. If you’re going all-in on Claude, we recommend the [Claude Max $200 subscription](https://www.anthropic.com/pricing/). -## Command tree (draft) +## Model discussions (community notes) -- `clawdbot models list` - - default: configured models only - - flags: `--all` (full catalog), `--local`, `--provider `, `--json`, `--plain` -- `clawdbot models status` - - show default model + aliases + fallbacks + configured models -- `clawdbot models set ` - - writes `agent.model.primary` and ensures `agent.models` entry -- `clawdbot models set-image ` - - writes `agent.imageModel.primary` and ensures `agent.models` entry -- `clawdbot models aliases list|add|remove` - - writes `agent.models.*.alias` -- `clawdbot models fallbacks list|add|remove|clear` - - writes `agent.model.fallbacks` -- `clawdbot models image-fallbacks list|add|remove|clear` - - writes `agent.imageModel.fallbacks` -- `clawdbot models scan` - - OpenRouter :free scan; probe tool-call + image; interactive selection +Anecdotal notes from the Discord thread on January 4–5, 2026. Treat as “what people reported,” not guarantees. + +**Reported working well** +- [Claude Opus 4.5](https://www.anthropic.com/claude/opus): best quality, but expensive and easy to hit limits. +- [Claude Sonnet 4.5](https://www.anthropic.com/claude/sonnet): solid fallback when Opus caps out. +- [GLM](https://www.zhipuai.cn/en/): used as a worker model under orchestration. +- [MiniMax M2.1](https://platform.minimax.io/docs/guides/models-intro): “good enough” fallback for grunt tasks. +- [Gemini 3 Pro](https://deepmind.google/en/models/gemini/pro/): some users said it maps Clawdbot structure well. + +**Mixed / unclear** +- [Antigravity](https://blog.google/technology/ai/google-ai-updates-november-2025/) (Claude Opus access): some reported extra Opus quota, pricing/limits unclear. + +**Reported weak in Clawdbot** +- [GPT-5.2-Codex](https://developers.openai.com/codex/models) inside Clawdbot: considered rough for conversation or assistant tasks. +- [Grok](https://docs.x.ai/docs/models/grok-4): tried, abandoned. + +**Tooling note** +- [Codex CLI](https://developers.openai.com/codex/cli) felt stronger than embedded use. + +**Theme** +- Token burn feels higher than expected in long sessions; people suspect context buildup + tool outputs. Pruning/compaction helps. Check session logs before blaming providers. See [/concepts/session](/concepts/session) and [/concepts/model-failover](/concepts/model-failover). + +## Models CLI + +See [/cli](/cli) for the full command tree and CLI flags. ## Config changes diff --git a/docs/start/hubs.md b/docs/start/hubs.md index 8a4b073c6..bddfaea85 100644 --- a/docs/start/hubs.md +++ b/docs/start/hubs.md @@ -86,6 +86,7 @@ Use these hubs to discover every page, including deep dives and reference docs t ## Tools + automation - [Tools surface](https://docs.clawd.bot/tools) +- [CLI reference](https://docs.clawd.bot/cli) - [Bash tool](https://docs.clawd.bot/tools/bash) - [Elevated mode](https://docs.clawd.bot/tools/elevated) - [Cron jobs](https://docs.clawd.bot/automation/cron-jobs)