跳到內容

OpenClaw CLI 完整指南:掌握終端機指令

  • --dev:將狀態隔離在 ~/.openclaw-dev 下並切換預設 ports。
  • --profile <name>:將狀態隔離在 ~/.openclaw-<name> 下。
  • --container <name>:指定執行目標為特定的 container。
  • --no-color:停用 ANSI 顏色。
  • --update:openclaw update 的簡寫(僅適用於從 source 安裝的情況)。
  • -V, --version, -v:印出版本資訊並退出。
  • ANSI 顏色和進度指示器只會在 TTY sessions 中渲染。
  • OSC-8 超連結在支援的終端機中會顯示為可點擊連結;否則我們會退回到純文字 URL。
  • --json(以及支援處的 --plain)會停用樣式,給你乾淨的輸出內容。
  • --no-color 會停用 ANSI 樣式;程式也會遵循 NO_COLOR=1 環境變數。
  • 執行時間較長的指令會顯示進度指示器(支援時使用 OSC 9;4)。

OpenClaw 的 CLI 輸出使用 lobster 配色方案。

  • accent (#FF5A2D):標題、標籤、主要高亮。
  • accentBright (#FF7A3D):指令名稱、強調。
  • accentDim (#D14A22):次要高亮文字。
  • info (#FF8A5B):資訊類數值。
  • success (#2FBF71):成功狀態。
  • warn (#FFB020):警告、後備方案、需要注意的事項。
  • error (#E23D2D):錯誤、失敗。
  • muted (#8B7F77):去強調、metadata。

配色方案的定義來源:src/terminal/palette.ts(即「lobster palette」)。

openclaw [--dev] [--profile <name>] <command>
setup
onboard
configure
config
get
set
unset
file
schema
validate
completion
doctor
dashboard
backup
create
verify
security
audit
secrets
reload
audit
configure
apply
reset
uninstall
update
wizard
status
channels
list
status
capabilities
resolve
logs
add
remove
login
logout
directory
self
peers list
groups list|members
skills
search
install
update
list
info
check
plugins
list
inspect
install
uninstall
update
enable
disable
doctor
marketplace list
memory
status
index
search
wiki
status
doctor
init
ingest
compile
lint
search
get
apply
bridge import
unsafe-local import
obsidian status|search|open|command|daily
message
send
broadcast
poll
react
reactions
read
edit
delete
pin
unpin
pins
permissions
search
thread create|list|reply
emoji list|upload
sticker send|upload
role info|add|remove
channel info|list
member info
voice status
event list|create
timeout
kick
ban
agent
agents
list
add
delete
bindings
bind
unbind
set-identity
acp
mcp
serve
list
show
set
unset
status
health
sessions
cleanup
tasks
list
audit
maintenance
show
notify
cancel
flow list|show|cancel
gateway
call
usage-cost
health
status
probe
discover
install
uninstall
start
stop
restart
run
daemon
status
install
uninstall
start
stop
restart
logs
system
event
heartbeat last|enable|disable
presence
models
list
status
set
set-image
aliases list|add|remove
fallbacks list|add|remove|clear
image-fallbacks list|add|remove|clear
scan
infer (alias: capability)
list
inspect
model run|list|inspect|providers|auth login|logout|status
image generate|edit|describe|describe-many|providers
audio transcribe|providers
tts convert|voices|providers|status|enable|disable|set-provider
video generate|describe|providers
web search|fetch|providers
embedding create|providers
auth add|login|login-github-copilot|setup-token|paste-token
auth order get|set|clear
sandbox
list
recreate
explain
cron
status
list
add
edit
rm
enable
disable
runs
run
nodes
status
describe
list
pending
approve
reject
rename
invoke
notify
push
canvas snapshot|present|hide|navigate|eval
canvas a2ui push|reset
camera list|snap|clip
screen record
location get
devices
list
remove
clear
approve
reject
rotate
revoke
node
run
status
install
uninstall
stop
restart
approvals
get
set
allowlist add|remove
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
list
info
check
enable
disable
install
update
webhooks
gmail setup|run
pairing
list
approve
qr
clawbot
qr
docs
dns
setup
tui

注意:plugins 可以新增額外的頂層指令(例如 openclaw voicecall)。

  • openclaw security audit — 稽核設定與本地狀態,檢查常見的安全疏失。
  • openclaw security audit --deep — 盡力而為的即時 Gateway 探測。
  • openclaw security audit --fix — 收緊安全預設值以及狀態/設定的權限。

管理 SecretRefs 以及相關的執行階段/設定衛生。

子指令:

  • secrets reload
  • secrets audit
  • secrets configure
  • secrets apply --from <path>

secrets reload 選項:

  • --url, --token, --timeout, --expect-final, --json

secrets audit 選項:

  • --check
  • --allow-exec
  • --json

secrets configure 選項:

  • --apply
  • --yes
  • --providers-only
  • --skip-provider-setup
  • --agent <id>
  • --allow-exec
  • --plan-out <path>
  • --json

secrets apply --from <path> 選項:

  • --dry-run
  • --allow-exec
  • --json

備註:

  • reload 是 Gateway RPC,當解析失敗時會保留最後一個已知的良好執行階段快照。
  • audit --check 在發現問題時會回傳非零值;未解析的引用會使用更高優先級的非零結束代碼。
  • 預設會跳過 Dry-run 執行檢查;使用 --allow-exec 來加入檢查。

管理擴充功能及其設定:

  • openclaw plugins list — 探索插件(使用 --json 取得機器可讀的輸出)。
  • openclaw plugins inspect <id> — 顯示插件詳情(info 是別名)。
  • openclaw plugins install &lt;path|.tgz|npm-spec|plugin@marketplace&gt; — 安裝插件(或將插件路徑新增至 plugins.load.paths;使用 --force 覆寫現有的安裝目標)。
  • openclaw plugins marketplace list <marketplace> — 在安裝前列出市集項目。
  • openclaw plugins enable <id> / disable <id> — 切換 plugins.entries.<id>.enabled。
  • openclaw plugins doctor — 回報插件載入錯誤。

大多數插件變更需要重啟 Gateway。請參閱 /plugin。

針對 MEMORY.md + memory/*.md 進行向量搜尋:

  • openclaw memory status — 顯示索引統計資料;使用 --deep 進行向量與 embedding 就緒檢查,或使用 --fix 修復過時的召回 (recall) 或晉升 (promotion) 產物。
  • openclaw memory index — 重新索引 memory 檔案。
  • openclaw memory search "<query>" (或 --query "<query>") — 對 memory 進行語義搜尋。
  • openclaw memory promote — 對短期召回進行排名,並可選擇將前幾名項目附加到 MEMORY.md 中。

管理用於隔離 Agent 執行的 Sandbox 執行階段。請參閱 /cli/sandbox。

子指令:

  • sandbox list [--browser] [--json]
  • sandbox recreate [--all] [--session <key>] [--agent <id>] [--browser] [--force]
  • sandbox explain [--session <key>] [--agent <id>] [--json]

備註:

  • sandbox recreate 會移除現有的執行階段,這樣下次使用時就會用目前的配置重新初始化。
  • 對於 ssh 和 OpenShell remote 後端,recreate 會刪除所選範圍的標準遠端工作區。

聊天訊息支援 /... 指令(文字和原生)。請參閱 /tools/slash-commands。

重點功能:

  • /status 用於快速診斷。
  • /config 用於持久化的配置變更。
  • /debug 用於僅限執行階段的配置覆寫(儲存在記憶體,非磁碟;需要 commands.debug: true)。

生成 shell 補全腳本,並可選擇將其安裝到你的 shell profile 中。

選項:

  • -s, --shell &lt;zsh|bash|powershell|fish&gt;
  • -i, --install
  • --write-state
  • -y, --yes

備註:

  • 如果沒有 --install 或 --write-state,completion 會將腳本列印到 stdout。
  • --install 會在你的 shell profile 中寫入一個 OpenClaw Completion 區塊,並將其指向 OpenClaw 狀態目錄下的快取腳本。

初始化配置與工作區。

選項:

  • --workspace <dir>:Agent 工作區路徑(預設為 ~/.openclaw/workspace)。
  • --wizard:執行引導程式。
  • --non-interactive:在沒有提示的情況下執行引導。
  • --mode &lt;local|remote&gt;:引導模式。
  • --remote-url <url>:遠端 Gateway URL。
  • --remote-token <token>:遠端 Gateway token。

當出現任何引導 flag(--non-interactive, --mode, --remote-url, --remote-token)時,引導程式會自動執行。

針對 Gateway、工作區、Skills 以及認證流程的互動式引導。

選項:

  • --workspace <dir>
  • --reset(在引導前重設配置 + 憑證 + session)
  • --reset-scope &lt;config|config+creds+sessions|full&gt;(預設為 config+creds+sessions;使用 full 也會移除工作區)
  • --non-interactive
  • --mode &lt;local|remote&gt;
  • --flow &lt;quickstart|advanced|manual&gt;(manual 是 advanced 的別名)
  • --auth-choice <choice>,其中 <choice> 是以下之一: chutes, deepseek-api-key, openai-codex, openai-api-key, openrouter-api-key, kilocode-api-key, litellm-api-key, ai-gateway-api-key, cloudflare-ai-gateway-api-key, moonshot-api-key, moonshot-api-key-cn, kimi-code-api-key, synthetic-api-key, venice-api-key, together-api-key, huggingface-api-key, apiKey, gemini-api-key, google-gemini-cli, zai-api-key, zai-coding-global, zai-coding-cn, zai-global, zai-cn, xiaomi-api-key, minimax-global-oauth, minimax-global-api, minimax-cn-oauth, minimax-cn-api, opencode-zen, opencode-go, github-copilot, copilot-proxy, xai-api-key, mistral-api-key, volcengine-api-key, byteplus-api-key, qianfan-api-key, qwen-standard-api-key-cn, qwen-standard-api-key, qwen-api-key-cn, qwen-api-key, modelstudio-standard-api-key-cn, modelstudio-standard-api-key, modelstudio-api-key-cn, modelstudio-api-key, custom-api-key, skip
  • Qwen 備註:qwen-* 是標準的 auth-choice 系列。modelstudio-* ID 僅作為舊版相容別名保留。
  • --secret-input-mode &lt;plaintext|ref&gt;(預設為 plaintext;使用 ref 儲存 provider 預設的環境變數引用,而非明文金鑰)
  • --anthropic-api-key <key>
  • --openai-api-key <key>
  • --mistral-api-key <key>
  • --openrouter-api-key <key>
  • --ai-gateway-api-key <key>
  • --moonshot-api-key <key>
  • --kimi-code-api-key <key>
  • --gemini-api-key <key>
  • --zai-api-key <key>
  • --minimax-api-key <key>
  • --opencode-zen-api-key <key>
  • --opencode-go-api-key <key>
  • --custom-base-url <url>(非互動式;與 --auth-choice custom-api-key 搭配使用)
  • --custom-model-id <id>(非互動式;與 --auth-choice custom-api-key 搭配使用)
  • --custom-api-key <key>(非互動式;選填;與 --auth-choice custom-api-key 搭配使用;省略時會回退到 CUSTOM_API_KEY)
  • --custom-provider-id <id>(非互動式;選填的自定義 provider ID)
  • --custom-compatibility &lt;openai|anthropic&gt;(非互動式;選填;預設為 openai)
  • --gateway-port <port>
  • --gateway-bind &lt;loopback|lan|tailnet|auto|custom&gt;
  • --gateway-auth &lt;token|password&gt;
  • --gateway-token <token>
  • --gateway-token-ref-env <name>(非互動式;將 gateway.auth.token 儲存為環境變數 SecretRef;需要設定該環境變數;不能與 --gateway-token 同時使用)
  • --gateway-password <password>
  • --remote-url <url>
  • --remote-token <token>
  • --tailscale &lt;off|serve|funnel&gt;
  • --tailscale-reset-on-exit
  • --install-daemon
  • --no-install-daemon(別名:--skip-daemon)
  • --daemon-runtime &lt;node|bun&gt;
  • --skip-channels
  • --skip-skills
  • --skip-search
  • --skip-health
  • --skip-ui
  • --cloudflare-ai-gateway-account-id <id>
  • --cloudflare-ai-gateway-gateway-id <id>
  • --node-manager &lt;npm|pnpm|bun&gt;(用於 Skills 的安裝/引導 Node 管理器;建議使用 pnpm,也支援 bun)
  • --json

互動式配置精靈(模型、Channels、Skills、Gateway)。

選項:

  • --section <section>(可重複;將精靈限制在特定章節)

非互動式配置輔助工具(get/set/unset/file/schema/validate)。執行不帶子指令的 openclaw config 會啟動精靈。

子指令:

  • config get <path>:列印配置值(點號/括號路徑)。
  • config set:支援四種賦值模式:
    • 數值模式:config set <path> <value>(JSON5 或字串解析)
    • SecretRef 建立模式:config set <path> --ref-provider <provider> --ref-source <source> --ref-id <id>
    • Provider 建立模式:config set secrets.providers.&lt;alias&gt; --provider-source &lt;env|file|exec&gt; ...
    • 批次模式:config set --batch-json '<json>' 或 config set --batch-file <path>
  • config set --dry-run:在不寫入 openclaw.json 的情況下驗證賦值(預設會跳過 exec SecretRef 檢查)。
  • config set --allow-exec --dry-run:啟用 exec SecretRef 的 dry-run 檢查(可能會執行 provider 指令)。
  • config set --dry-run --json:輸出機器可讀的 dry-run 結果(包含檢查 + 完整性訊號、操作、已檢查/已跳過的引用、錯誤)。
  • config set --strict-json:路徑/數值輸入要求使用 JSON5 解析。在非 dry-run 輸出模式下,--json 仍作為嚴格解析的舊版別名。
  • config unset <path>:移除一個值。
  • config file:列印目前的配置文件路徑。
  • config schema:列印生成的 openclaw.json JSON schema,包含在巢狀物件、萬用字元、陣列項目和組合分支中傳遞的欄位 title / description 文件元數據,以及盡力提供的即時 plugin/channel schema 元數據。
  • config validate:在不啟動 Gateway 的情況下,根據 schema 驗證目前的配置。
  • config validate --json:輸出機器可讀的 JSON 結果。

健康檢查與快速修復(配置、Gateway 以及舊版服務)。

選項:

  • --no-workspace-suggestions:停用工作區記憶提示。
  • --yes:不經提示直接接受預設值(無頭模式)。
  • --non-interactive:跳過提示;僅套用安全的遷移。
  • --deep:掃描系統服務以尋找額外的 Gateway 安裝。
  • --repair(別名:--fix):嘗試自動修復偵測到的問題。
  • --force:即使非嚴格必要也強制修復。
  • --generate-gateway-token:生成新的 Gateway 認證 token。

使用你目前的 token 開啟控制介面 (Control UI)。

選項:

  • --no-open:僅列印 URL 而不啟動瀏覽器。

備註:

  • 對於使用 SecretRef 管理的 Gateway token,dashboard 會列印或開啟不含 token 的 URL,而不是在終端機輸出或瀏覽器啟動參數中洩露秘密資訊。

更新已安裝的 CLI。

根選項:

  • --json
  • --no-restart
  • --dry-run
  • --channel &lt;stable|beta|dev&gt;
  • --tag &lt;dist-tag|version|spec&gt;
  • --timeout <seconds>
  • --yes

子指令:

  • update status
  • update wizard

update status 選項:

  • --json
  • --timeout <seconds>

update wizard 選項:

  • --timeout <seconds>

備註:

  • openclaw --update 會重寫為 openclaw update。

建立並驗證 OpenClaw 狀態的本地備份封存。

子指令:

  • backup create
  • backup verify <archive>

backup create 選項:

  • --output <path>
  • --json
  • --dry-run
  • --verify
  • --only-config
  • --no-include-workspace

backup verify <archive> 選項:

  • --json

管理聊天頻道帳號(WhatsApp/Telegram/Discord/Google Chat/Slack/Mattermost (plugin)/Signal/iMessage/Microsoft Teams)。

子指令:

  • channels list:顯示已設定的頻道與認證設定檔(auth profiles)。
  • channels status:檢查 Gateway 連線能力與頻道健康狀態(當 Gateway 可連線時,--probe 會對每個帳號執行即時偵測/稽核;若無法連線,則回退至僅顯示設定摘要。若要進行更廣泛的 Gateway 健康偵測,請使用 openclaw health 或 openclaw status --deep)。
  • 小撇步:當 channels status 偵測到常見的設定錯誤時,會印出警告並提供修復建議(然後引導你使用 openclaw doctor)。
  • channels logs:顯示 Gateway 日誌檔案中最近的頻道日誌。
  • channels add:未傳入 flags 時會進入精靈引導式設定;傳入 flags 則切換為非互動模式。
    • 當你在仍使用單一帳號頂層設定的頻道中新增非預設帳號時,OpenClaw 會在寫入新帳號前,將帳號範圍的值提升到頻道帳號映射中。大多數頻道使用 accounts.default;Matrix 則可以保留現有的匹配名稱或預設目標。
    • 非互動模式的 channels add 不會自動建立或升級綁定(bindings);僅限頻道的綁定將繼續匹配預設帳號。
  • channels remove:預設為停用;傳入 --delete 可直接移除設定條目而不顯示提示。
  • channels login:互動式頻道登入(僅限 WhatsApp Web)。
  • channels logout:登出頻道工作階段(若支援)。

常用選項:

  • --channel <name>:whatsapp|telegram|discord|googlechat|slack|mattermost|signal|imessage|msteams
  • --account <id>:頻道帳號 id(預設為 default)
  • --name <label>:帳號的顯示名稱

channels login 選項:

  • --channel <channel>(預設為 whatsapp;支援 whatsapp/web)
  • --account <id>
  • --verbose

channels logout 選項:

  • --channel <channel>(預設為 whatsapp)
  • --account <id>

channels list 選項:

  • --no-usage:跳過模型供應商的用量/配額快照(僅限 OAuth/API 支援)。
  • --json:輸出 JSON(除非設定了 --no-usage,否則包含用量)。

channels status 選項:

  • --probe
  • --timeout <ms>
  • --json

channels capabilities 選項:

  • --channel <name>
  • --account <id>(僅在設定了 --channel 時有效)
  • --target <dest>
  • --timeout <ms>
  • --json

channels resolve 選項:

  • <entries...>
  • --channel <name>
  • --account <id>
  • --kind &lt;auto|user|group&gt;
  • --json

channels logs 選項:

  • --channel &lt;name|all&gt;(預設為 all)
  • --lines <n>(預設為 200)
  • --json

備註:

  • channels login 支援 --verbose。
  • channels capabilities --account 僅在設定了 --channel 時生效。
  • channels status --probe 可以顯示傳輸狀態以及偵測/稽核結果,例如 works、probe failed、audit ok 或 audit failed(視頻道支援程度而定)。

更多細節:/concepts/oauth

範例:

Terminal window
openclaw channels add --channel telegram --account alerts --name "Alerts Bot" --token $TELEGRAM_BOT_TOKEN
openclaw channels add --channel discord --account work --name "Work Bot" --token $DISCORD_BOT_TOKEN
openclaw channels remove --channel discord --account work --delete
openclaw channels status --probe
openclaw status --deep

查詢支援目錄服務頻道的自己、同伴和群組 ID。請參閱 openclaw directory。

常用選項:

  • --channel <name>
  • --account <id>
  • --json

子指令:

  • directory self
  • directory peers list [--query <text>] [--limit <n>]
  • directory groups list [--query <text>] [--limit <n>]
  • directory groups members --group-id <id> [--limit <n>]

列出並檢查可用的技能以及就緒資訊。

子指令:

  • skills search [query...]:搜尋 ClawHub 技能。
  • skills search --limit <n> --json:限制搜尋結果數量或輸出機器可讀格式。
  • skills install <slug>:從 ClawHub 安裝技能到目前的工作區。
  • skills install <slug> --version <version>:安裝特定的 ClawHub 版本。
  • skills install <slug> --force:覆寫現有的工作區技能資料夾。
  • skills update &lt;slug|--all&gt;:更新追蹤的 ClawHub 技能。
  • skills list:列出技能(無子指令時的預設行為)。
  • skills list --json:在標準輸出(stdout)顯示機器可讀的技能清單。
  • skills list --verbose:在表格中包含缺失的需求。
  • skills info <name>:顯示單一技能的詳細資訊。
  • skills info <name> --json:在標準輸出顯示機器可讀的詳細資訊。
  • skills check:就緒與缺失需求的摘要。
  • skills check --json:在標準輸出顯示機器可讀的就緒狀態。

選項:

  • --eligible:僅顯示已就緒的技能。
  • --json:輸出 JSON(無樣式)。
  • -v, --verbose:包含缺失需求的詳細資訊。

小撇步:使用 openclaw skills search、openclaw skills install 和 openclaw skills update 來管理 ClawHub 支援的技能。

核准跨頻道的私訊(DM)配對請求。

子指令:

  • pairing list [channel] [--channel <channel>] [--account <id>] [--json]
  • pairing approve <channel> <code> [--account <id>] [--notify]
  • pairing approve --channel <channel> [--account <id>] <code> [--notify]

備註:

  • 如果只設定了一個支援配對的頻道,也可以直接使用 pairing approve <code>。
  • list 和 approve 都支援多帳號頻道的 --account <id> 選項。

管理 Gateway 裝置配對項目與各個角色的裝置 token。

子指令:

  • devices list [--json]
  • devices approve [requestId] [--latest]
  • devices reject <requestId>
  • devices remove <deviceId>
  • devices clear --yes [--pending]
  • devices rotate --device <id> --role <role> [--scope <scope...>]
  • devices revoke --device <id> --role <role>

備註:

  • 當無法直接使用配對範圍時,devices list 和 devices approve 可以回退到本地 loopback 上的本地配對檔案。
  • devices approve 在核發 token 前需要明確的請求 ID;省略 requestId 或傳入 --latest 僅會預覽最新的待處理請求。
  • 使用儲存的 token 重新連線時會重複使用該 token 快取的已核准範圍;使用 devices rotate --scope ... 則會更新該儲存範圍,供未來重新連線時使用。
  • devices rotate 和 devices revoke 會回傳 JSON 資料。

根據目前的 Gateway 設定產生行動裝置配對 QR code 與設定碼。請參閱 openclaw qr。

選項:

  • --remote
  • --url <url>
  • --public-url <url>
  • --token <token>
  • --password <password>
  • --setup-code-only
  • --no-ascii
  • --json

備註:

  • --token 與 --password 互斥。
  • 設定碼包含一個短效的引導(bootstrap)token,而非共享的 Gateway token/密碼。
  • 內建的引導移交會將主節點 token 保持在 scopes: []。
  • 任何移交的操作員(operator)引導 token 都會被限制在 operator.approvals、operator.read、operator.talk.secrets 與 operator.write 範圍內。
  • 引導範圍檢查帶有角色前綴,因此操作員許可清單僅滿足操作員請求;非操作員角色仍需在其自身角色前綴下的範圍。
  • --remote 可以使用 gateway.remote.url 或啟用的 Tailscale Serve/Funnel URL。
  • 掃描後,使用 openclaw devices list / openclaw devices approve <requestId> 核准請求。

舊版別名命名空間。目前支援 openclaw clawbot qr,會映射到 openclaw qr。

管理內部 Agent hooks。

子指令:

  • hooks list
  • hooks info <name>
  • hooks check
  • hooks enable <name>
  • hooks disable <name>
  • hooks install <path-or-spec>(openclaw plugins install 的棄用別名)
  • hooks update [id](openclaw plugins update 的棄用別名)

常用選項:

  • --json
  • --eligible
  • -v, --verbose

備註:

  • 由外掛(plugin)管理的 hooks 無法透過 openclaw hooks 啟用或停用;請改為啟用或停用所屬的外掛。
  • hooks install 和 hooks update 仍可作為相容性別名使用,但會印出棄用警告並轉發至外掛指令。

Webhook 輔助工具。目前內建功能為 Gmail Pub/Sub 設定與執行器:

  • webhooks gmail setup
  • webhooks gmail run

Gmail Pub/Sub hook 設定與執行器。請參閱 Gmail Pub/Sub。

子指令:

  • webhooks gmail setup(需要 --account <email>;支援 --project, --topic, --subscription, --label, --hook-url, --hook-token, --push-token, --bind, --port, --path, --include-body, --max-bytes, --renew-minutes, --tailscale, --tailscale-path, --tailscale-target, --push-endpoint, --json)
  • webhooks gmail run(針對相同 flags 的執行階段覆寫)

備註:

  • setup 設定 Gmail 監控以及面向 OpenClaw 的推送路徑。
  • run 啟動本地 Gmail 監控/更新迴圈,並可選擇執行階段覆寫。

廣域發現 DNS 輔助工具(CoreDNS + Tailscale)。目前內建功能:

  • dns setup [--domain <domain>] [--apply]

廣域發現 DNS 輔助工具(CoreDNS + Tailscale)。請參閱 /gateway/discovery。

選項:

  • --domain <domain>
  • --apply:安裝/更新 CoreDNS 設定(需要 sudo;僅限 macOS)。

備註:

  • 若不帶 --apply,這是一個規劃輔助工具,會印出建議的 OpenClaw + Tailscale DNS 設定。
  • --apply 目前僅支援使用 Homebrew 安裝 CoreDNS 的 macOS。

統一的對外訊息發送與頻道操作。

請參閱:/cli/message

子指令:

  • message send|poll|react|reactions|read|edit|delete|pin|unpin|pins|permissions|search|timeout|kick|ban
  • message thread &lt;create|list|reply&gt;
  • message emoji &lt;list|upload&gt;
  • message sticker &lt;send|upload&gt;
  • message role &lt;info|add|remove&gt;
  • message channel &lt;info|list&gt;
  • message member info
  • message voice status
  • message event &lt;list|create&gt;

範例:

  • openclaw message send --target +15555550123 --message "Hi"
  • openclaw message poll --channel discord --target channel:123 --poll-question "要吃點心嗎?" --poll-option Pizza --poll-option Sushi

透過 Gateway(或使用 --local 嵌入式)執行一次 Agent 回合。

至少傳入一個工作階段選擇器:--to、--session-id 或 --agent。

必要項:

  • -m, --message <text>

選項:

  • -t, --to <dest>(用於工作階段金鑰與選用的遞送)
  • --session-id <id>
  • --agent <id>(Agent id;會覆寫路由綁定)
  • --thinking &lt;off|minimal|low|medium|high|xhigh&gt;(供應商支援程度不一;在 CLI 層級不受模型限制)
  • --verbose &lt;on|off&gt;
  • --channel <channel>(遞送頻道;省略則使用主工作階段頻道)
  • --reply-to <target>(遞送目標覆寫,與工作階段路由分開)
  • --reply-channel <channel>(遞送頻道覆寫)
  • --reply-account <id>(遞送帳號 id 覆寫)
  • --local(嵌入式執行;外掛註冊表仍會先預載)
  • --deliver
  • --json
  • --timeout <seconds>

備註:

  • 當 Gateway 請求失敗時,Gateway 模式會回退到嵌入式 Agent。
  • --local 仍會預載外掛註冊表,因此外掛提供的供應商、工具和頻道在嵌入式執行期間仍然可用。
  • --channel、--reply-channel 和 --reply-account 僅影響回覆遞送,不影響路由。

管理獨立的 Agent(工作區 + 認證 + 路由)。

執行不帶子指令的 openclaw agents 等同於 openclaw agents list。

列出已設定的 Agent。

選項:

  • --json
  • --bindings

新增一個獨立的 Agent。除非傳入 flags(或 --non-interactive),否則會執行引導精靈;在非互動模式下必須提供 --workspace。

選項:

  • --workspace <dir>
  • --model <id>
  • --agent-dir <dir>
  • --bind <channel[:accountId]>(可重複)
  • --non-interactive
  • --json

綁定規格使用 channel[:accountId]。省略 accountId 時,OpenClaw 可能會透過頻道預設值/外掛 hooks 解析帳號範圍;否則它就是一個沒有明確帳號範圍的頻道綁定。 傳入任何明確的新增 flags 都會將指令切換到非互動路徑。main 是保留字,不能用作新的 Agent id。

列出路由綁定。

選項:

  • --agent <id>
  • --json

為 Agent 新增路由綁定。

選項:

  • --agent <id>(預設為目前的預設 Agent)
  • --bind <channel[:accountId]>(可重複)
  • --json

移除 Agent 的路由綁定。

選項:

  • --agent <id>(預設為目前的預設 Agent)
  • --bind <channel[:accountId]>(可重複)
  • --all
  • --json

請使用 --all 或 --bind 其中之一,不要同時使用。

刪除 Agent 並清理其工作區與狀態。

選項:

  • --force
  • --json

備註:

  • main 無法刪除。
  • 若無 --force,則需要互動式確認。

更新 Agent 身分(名稱/主題/表情符號/大頭貼)。

選項:

  • --agent <id>
  • --workspace <dir>
  • --identity-file <path>
  • --from-identity
  • --name <name>
  • --theme <theme>
  • --emoji <emoji>
  • --avatar <value>
  • --json

備註:

  • 可以使用 --agent 或 --workspace 來選擇目標 Agent。
  • 當未提供明確的身分欄位時,指令會讀取 IDENTITY.md。

執行連接 IDE 與 Gateway 的 ACP 橋接器。

根選項:

  • --url <url>
  • --token <token>
  • --token-file <path>
  • --password <password>
  • --password-file <path>
  • --session <key>
  • --session-label <label>
  • --require-existing
  • --reset-session
  • --no-prefix-cwd
  • --provenance &lt;off|meta|meta+receipt&gt;
  • --verbose

用於橋接器除錯的互動式 ACP 用戶端。

選項:

  • --cwd <dir>
  • --server <command>
  • --server-args <args...>
  • --server-verbose
  • --verbose

請參閱 acp 以了解完整行為、安全性說明與範例。

管理儲存的 MCP 伺服器定義,並透過 MCP stdio 公開 OpenClaw 頻道。

透過 MCP stdio 公開路由的 OpenClaw 頻道對話。

選項:

  • --url <url>
  • --token <token>
  • --token-file <path>
  • --password <password>
  • --password-file <path>
  • --claude-channel-mode &lt;auto|on|off&gt;
  • --verbose

列出儲存的 MCP 伺服器定義。

選項:

  • --json

顯示單一儲存的 MCP 伺服器定義或完整的儲存 MCP 伺服器物件。

選項:

  • --json

從 JSON 物件儲存一個 MCP 伺服器定義。

移除一個儲存的 MCP 伺服器定義。

管理執行(exec)核准。別名:exec-approvals。

獲取執行核准快照與有效策略。

選項:

  • --node <node>
  • --gateway
  • --json
  • 來自 openclaw nodes 的節點 RPC 選項

使用來自檔案或標準輸入(stdin)的 JSON 替換執行核准。

選項:

  • --node <node>
  • --gateway
  • --file <path>
  • --stdin
  • --json
  • 來自 openclaw nodes 的節點 RPC 選項

編輯每個 Agent 的執行許可清單。

選項:

  • --node <node>
  • --gateway
  • --agent <id>(預設為 *)
  • --json
  • 來自 openclaw nodes 的節點 RPC 選項

顯示連結的工作階段健康狀態與最近的接收者。

選項:

  • --json
  • --all(完整診斷;唯讀,可直接貼上)
  • --deep(要求 Gateway 進行即時健康偵測,包括支援的頻道偵測)
  • --usage(顯示模型供應商用量/配額)
  • --timeout <ms>
  • --verbose
  • --debug(--verbose 的別名)

備註:

  • 概覽包含 Gateway 與節點主機服務狀態(若可用)。
  • --usage 會將供應商用量視窗標準化顯示為 剩餘 X%。

當 OAuth/API 憑證可用時,OpenClaw 可以顯示供應商的用量/配額。

顯示位置:

  • /status(可用時會增加一行簡短的供應商用量)
  • openclaw status --usage(印出完整的供應商細目)
  • macOS 選單列(Context 下的 Usage 區段)

備註:

  • 數據直接來自供應商的用量端點(非估計值)。
  • 人類可讀的輸出在各供應商間標準化為 剩餘 X%。
  • 目前支援用量視窗的供應商:Anthropic, GitHub Copilot, Gemini CLI, OpenAI Codex, MiniMax, Xiaomi, 與 z.ai。
  • MiniMax 備註:原始的 usage_percent / usagePercent 代表剩餘配額,因此 OpenClaw 在顯示前會將其反轉;若存在基於次數的欄位則優先使用。model_remains 回應偏好聊天模型條目,必要時從時間戳記推導視窗標籤,並在方案標籤中包含模型名稱。
  • 用量認證在可用時來自供應商特定的 hooks;否則 OpenClaw 會回退到匹配來自認證設定檔、環境變數或設定中的 OAuth/API-key 憑證。若皆無法解析,則隱藏用量。
  • 詳細資訊:請參閱 用量追蹤。

從執行中的 Gateway 獲取健康狀態。

選項:

  • --json
  • --timeout <ms>
  • --verbose(強制進行即時偵測並印出 Gateway 連線細節)
  • --debug(--verbose 的別名)

備註:

  • 預設的 health 可能回傳最新的快取 Gateway 快照。
  • health --verbose 會強制進行即時偵測,並展開所有已設定帳號與 Agent 的人類可讀輸出。

列出儲存的對話工作階段。

選項:

  • --json
  • --verbose
  • --store <path>
  • --active <minutes>
  • --agent <id>(按 Agent 過濾工作階段)
  • --all-agents(顯示所有 Agent 的工作階段)

子指令:

  • sessions cleanup — 移除過期或孤立的工作階段

備註:

  • sessions cleanup 也支援 --fix-missing 來清理逐字稿檔案已遺失的條目。

重設本地 config 或狀態(保留已安裝的 CLI)。

選項:

  • --scope &lt;config|config+creds+sessions|full&gt;
  • --yes
  • --non-interactive
  • --dry-run

注意:

  • --non-interactive 需要搭配 --scope 和 --yes。

解除安裝 Gateway 服務與本地數據(保留 CLI)。

選項:

  • --service
  • --state
  • --workspace
  • --app
  • --all
  • --yes
  • --non-interactive
  • --dry-run

注意:

  • --non-interactive 需要 --yes 以及明確的範圍(或使用 --all)。
  • --all 會同時移除服務、狀態、工作區和 App。

列出並管理不同 Agent 之間的 background task 執行情況。

  • tasks list — 顯示執行中與最近的 task 執行記錄
  • tasks show <id> — 顯示特定 task 執行的詳細資訊
  • tasks notify <id> — 更改 task 執行的通知策略
  • tasks cancel <id> — 取消執行中的 task
  • tasks audit — 找出營運問題(過期、遺失、交付失敗)
  • tasks maintenance [--apply] [--json] — 預覽或執行 task 與 TaskFlow 的清理/對帳(ACP/subagent 子會話、啟動中的 cron job、執行中的 CLI)
  • tasks flow list — 列出執行中與最近的 Task Flow 流程
  • tasks flow show <lookup> — 透過 id 或 lookup key 檢查 flow
  • tasks flow cancel <lookup> — 取消執行中的 flow 及其活動中的 task

舊版文件的捷徑。Flow 命令現在位於 openclaw tasks flow 下:

  • tasks flow list [--json]
  • tasks flow show <lookup>
  • tasks flow cancel <lookup>

執行 WebSocket Gateway。

選項:

  • --port <port>
  • --bind &lt;loopback|tailnet|lan|auto|custom&gt;
  • --token <token>
  • --auth &lt;token|password&gt;
  • --password <password>
  • --password-file <path>
  • --tailscale &lt;off|serve|funnel&gt;
  • --tailscale-reset-on-exit
  • --allow-unconfigured
  • --dev
  • --reset(重設開發 config + credentials + sessions + workspace)
  • --force(強制關閉連接埠上現有的 listener)
  • --verbose
  • --cli-backend-logs
  • --ws-log &lt;auto|full|compact&gt;
  • --compact(--ws-log compact 的別名)
  • --raw-stream
  • --raw-stream-path <path>

管理 Gateway 服務 (launchd/systemd/schtasks)。

子命令:

  • gateway status(預設會探測 Gateway RPC)
  • gateway install(安裝服務)
  • gateway uninstall
  • gateway start
  • gateway stop
  • gateway restart

注意:

  • gateway status 預設會使用服務解析出的 port/config 來探測 Gateway RPC(可用 --url/--token/--password 覆蓋)。
  • gateway status 支援 --no-probe、--deep、--require-rpc 和用於腳本的 --json。
  • gateway status 在偵測到舊版或其他額外的 Gateway 服務時也會一併顯示(--deep 會加入系統級掃描)。以 Profile 命名的 OpenClaw 服務會被視為一等公民,不會被標記為「額外」。
  • 即使本地 CLI config 遺失或無效,gateway status 仍可用於診斷。
  • gateway status 會印出解析後的檔案日誌路徑、CLI 與服務的 config 路徑/有效性快照,以及解析後的探測目標 URL。
  • 如果當前命令路徑中未解析 Gateway 驗證的 SecretRefs,只有在探測連線/驗證失敗時,gateway status --json 才會回報 rpc.authWarning(探測成功時會隱藏警告)。
  • 在 Linux systemd 安裝中,token 偏移檢查會同時包含 Environment= 和 EnvironmentFile= 單位來源。
  • gateway install|uninstall|start|stop|restart 支援用於腳本的 --json(預設輸出仍保持易於閱讀)。
  • gateway install 預設使用 Node runtime;不建議使用 bun(會有 WhatsApp/Telegram 的 bug)。
  • gateway install 選項:--port、--runtime、--token、--force、--json。

Gateway 服務管理命令的舊版別名。請參閱 /cli/daemon。

子命令:

  • daemon status
  • daemon install
  • daemon uninstall
  • daemon start
  • daemon stop
  • daemon restart

常用選項:

  • status: --url, --token, --password, --timeout, --no-probe, --require-rpc, --deep, --json
  • install: --port, --runtime &lt;node|bun&gt;, --token, --force, --json
  • uninstall|start|stop|restart: --json

透過 RPC 追蹤 Gateway 檔案日誌。

選項:

  • --limit <n>: 要回傳的日誌行數上限
  • --max-bytes <n>: 從日誌檔案讀取的位元組上限
  • --follow: 追蹤日誌檔案(類似 tail -f)
  • --interval <ms>: 追蹤時的輪詢間隔(毫秒)
  • --local-time: 以本地時間顯示時間戳記
  • --json: 輸出以行分隔的 JSON
  • --plain: 停用結構化格式
  • --no-color: 停用 ANSI 顏色
  • --url <url>: 明確指定 Gateway WebSocket URL
  • --token <token>: Gateway token
  • --timeout <ms>: Gateway RPC 超時時間
  • --expect-final: 需要時等待最終回應

範例:

Terminal window
openclaw logs --follow
openclaw logs --limit 200
openclaw logs --plain
openclaw logs --json
openclaw logs --no-color

注意:

  • 如果你傳入了 --url,CLI 不會自動套用 config 或環境變數中的 credentials。
  • 本地 loopback 配對失敗時會退而使用配置的本地日誌檔案;但明確指定 --url 的目標則不會。

Gateway CLI 輔助工具(RPC 子命令請使用 --url、--token、--password、--timeout、--expect-final)。 當你傳入 --url 時,CLI 不會自動套用 config 或環境變數中的 credentials。 請明確包含 --token 或 --password。缺少明確的 credentials 將會報錯。

子命令:

  • gateway call <method> [--params <json>] [--url <url>] [--token <token>] [--password <password>] [--timeout <ms>] [--expect-final] [--json]
  • gateway health
  • gateway status
  • gateway probe
  • gateway discover
  • gateway install|uninstall|start|stop|restart
  • gateway run

注意:

  • gateway status --deep 會加入系統級服務掃描。使用 gateway probe、health --verbose 或頂層的 status --deep 來獲取更深層的 runtime 探測細節。

常用 RPC:

  • config.schema.lookup(檢查單個 config 子樹,包含淺層 schema 節點、匹配的 hint 元數據以及直接子項摘要)
  • config.get(讀取當前 config 快照 + hash)
  • config.set(驗證 + 寫入完整 config;使用 baseHash 進行樂觀並行控制)
  • config.apply(驗證 + 寫入 config + 重啟 + 喚醒)
  • config.patch(合併部分更新 + 重啟 + 喚醒)
  • update.run(執行更新 + 重啟 + 喚醒)

提示:直接呼叫 config.set/config.apply/config.patch 時,如果 config 已存在,請傳入來自 config.get 的 baseHash。 提示:對於部分編輯,請先用 config.schema.lookup 檢查,並優先使用 config.patch。 提示:這些 config 寫入 RPC 會預先檢查提交的 config payload 中 SecretRef 是否可解析,如果提交的 ref 無法解析,則會拒絕寫入。 提示:僅限擁有者使用的 gateway runtime 工具仍然拒絕重寫 tools.exec.ask 或 tools.exec.security;舊版的 tools.bash.* 別名會正規化為相同的受保護 exec 路徑。

關於 fallback 行為和掃描策略,請參考 /concepts/models。

Anthropic 註記:Anthropic 團隊告訴我們,OpenClaw 風格的 Claude CLI 用法現在再次被允許,因此除非 Anthropic 發布新政策,否則 OpenClaw 會將 Claude CLI 複用和 claude -p 用法視為此整合的認可方式。在正式環境中,建議你優先使用 Anthropic API key 或其他支援訂閱模式的供應商,例如 OpenAI Codex、Alibaba Cloud Model Studio Coding Plan、MiniMax Coding Plan 或 Z.AI / GLM Coding Plan。

Anthropic setup-token 仍然是支援的 token 驗證路徑,但 OpenClaw 現在在可用的情況下會優先使用 Claude CLI 複用和 claude -p。

openclaw models 是 models status 的別名。

根選項:

  • --status-json (models status --json 的別名)
  • --status-plain (models status --plain 的別名)

選項:

  • --all
  • --local
  • --provider <name>
  • --json
  • --plain

選項:

  • --json
  • --plain
  • --check (結束代碼 1=過期/缺失, 2=即將過期)
  • --probe (對已設定的驗證設定檔進行即時探測)
  • --probe-provider <name>
  • --probe-profile <id> (可重複或以逗號分隔)
  • --probe-timeout <ms>
  • --probe-concurrency <n>
  • --probe-max-tokens <n>
  • --agent <id>

內容一律包含驗證概覽和驗證庫中設定檔的 OAuth 到期狀態。 --probe 會執行即時請求(可能會消耗 token 並觸發速率限制)。 探測結果的列可能來自驗證設定檔、環境變數憑證或 models.json。 探測狀態預計會有 ok, auth, rate_limit, billing, timeout, format, unknown, 和 no_model。 當明確的 auth.order.<provider> 遺漏了某個已儲存的設定檔時,探測會回報 excluded_by_auth_order 而不是靜默嘗試該設定檔。

設定 agents.defaults.model.primary。

設定 agents.defaults.imageModel.primary。

選項:

  • list: --json, --plain
  • add <alias> <model>
  • remove <alias>

選項:

  • list: --json, --plain
  • add <model>
  • remove <model>
  • clear

models image-fallbacks list|add|remove|clear

Section titled “models image-fallbacks list|add|remove|clear”

選項:

  • list: --json, --plain
  • add <model>
  • remove <model>
  • clear

選項:

  • --min-params <b>
  • --max-age-days <days>
  • --provider <name>
  • --max-candidates <n>
  • --timeout <ms>
  • --concurrency <n>
  • --no-probe
  • --yes
  • --no-input
  • --set-default
  • --set-image
  • --json

models auth add|login|login-github-copilot|setup-token|paste-token

Section titled “models auth add|login|login-github-copilot|setup-token|paste-token”

選項:

  • add: 互動式驗證小幫手 (供應商驗證流程或貼上 token)
  • login: --provider <name>, --method <method>, --set-default
  • login-github-copilot: GitHub Copilot OAuth 登入流程 (--yes)
  • setup-token: --provider <name>, --yes
  • paste-token: --provider <name>, --profile-id <id>, --expires-in <duration>

備註:

  • setup-token 和 paste-token 是針對提供 token 驗證方式的供應商所設計的通用 token 指令。
  • setup-token 需要互動式 TTY 並執行供應商的 token 驗證方法。
  • paste-token 會提示輸入 token 值,若省略 --profile-id,則預設為驗證設定檔 ID <provider>:manual。
  • Anthropic setup-token / paste-token 仍然是支援的 OpenClaw token 路徑,但 OpenClaw 現在在可用的情況下會優先使用 Claude CLI 複用和 claude -p。

選項:

  • get: --provider <name>, --agent <id>, --json
  • set: --provider <name>, --agent <id>, <profileIds...>
  • clear: --provider <name>, --agent <id>

將系統事件加入隊列,並可選擇觸發 heartbeat (Gateway RPC)。

必要參數:

  • --text <text>

選項:

  • --mode &lt;now|next-heartbeat&gt;
  • --json
  • --url, --token, --timeout, --expect-final

Heartbeat 控制項 (Gateway RPC)。

選項:

  • --json
  • --url, --token, --timeout, --expect-final

列出系統 presence 項目 (Gateway RPC)。

選項:

  • --json
  • --url, --token, --timeout, --expect-final

管理排程任務 (Gateway RPC)。請參考 /automation/cron-jobs。

子指令:

  • cron status [--json]
  • cron list [--all] [--json] (預設為表格輸出;使用 --json 取得原始資料)
  • cron add (別名:create;需要 --name 且必須從 --at | --every | --cron 中擇一使用,並搭配 --system-event | --message 其中一個 payload)
  • cron edit <id> (修改欄位)
  • cron rm <id> (別名:remove, delete)
  • cron enable <id>
  • cron disable <id>
  • cron runs --id <id> [--limit <n>]
  • cron run <id> [--due]

所有 cron 指令都支援 --url, --token, --timeout, --expect-final。

cron add|edit --model ... 會為該任務使用你選定的允許模型。如果你選用的模型不被允許,cron 會發出警告並退而使用該 agent 的預設模型。已設定的 fallback 鏈依然有效,但如果只是單純覆蓋模型而沒有明確指定每個任務的 fallback 列表,系統不再會自動將 agent 的主要模型當作隱藏的額外重試目標。

node 會執行一個 headless node host 或將其作為背景服務管理。請參考 openclaw node。

子指令:

  • node run --host <gateway-host> --port 18789
  • node status
  • node install [--host &lt;gateway-host&gt;] [--port &lt;port&gt;] [--tls] [--tls-fingerprint &lt;sha256&gt;] [--node-id &lt;id&gt;] [--display-name &lt;name&gt;] [--runtime &lt;node|bun&gt;] [--force]
  • node uninstall
  • node stop
  • node restart

認證說明:

  • node 會從環境變數或設定檔解析 gateway 認證(不支援 --token/--password 參數):優先讀取 OPENCLAW_GATEWAY_TOKEN / OPENCLAW_GATEWAY_PASSWORD,接著是 gateway.auth.*。在 local 模式下,node host 會刻意忽略 gateway.remote.*;在 gateway.mode=remote 時,gateway.remote.* 則會依照遠端優先順序規則參與運作。
  • Node-host 的認證解析只會採用 OPENCLAW_GATEWAY_* 環境變數。

nodes 負責與 Gateway 溝通並操作已配對的 nodes。詳細資訊請參考 /nodes。

常用選項:

  • --url, --token, --timeout, --json

子命令:

Terminal window
nodes status [--connected] [--last-connected <duration>]
nodes describe --node &lt;id|name|ip&gt;
nodes list [--connected] [--last-connected <duration>]
nodes pending
nodes approve <requestId>
nodes reject <requestId>
nodes rename --node &lt;id|name|ip&gt; --name <displayName>
nodes invoke --node &lt;id|name|ip&gt; --command <command> [--params <json>] [--invoke-timeout <ms>] [--idempotency-key <key>]
nodes notify --node &lt;id|name|ip&gt; [--title <text>] [--body <text>] [--sound <name>] [--priority &lt;passive|active|timeSensitive&gt;] [--delivery &lt;system|overlay|auto&gt;] [--invoke-timeout <ms>]

(僅限 Mac)

相機 (Camera):

Terminal window
nodes camera list --node &lt;id|name|ip&gt;
nodes camera snap --node &lt;id|name|ip&gt; [--facing front|back|both] [--device-id <id>] [--max-width <px>] [--quality <0-1>] [--delay-ms <ms>] [--invoke-timeout <ms>]
nodes camera clip --node &lt;id|name|ip&gt; [--facing front|back] [--device-id <id>] [--duration &lt;ms|10s|1m&gt;] [--no-audio] [--invoke-timeout <ms>]

畫布與螢幕 (Canvas + screen):

Terminal window
nodes canvas snapshot --node &lt;id|name|ip&gt; [--format png|jpg|jpeg] [--max-width <px>] [--quality <0-1>] [--invoke-timeout <ms>]
nodes canvas present --node &lt;id|name|ip&gt; [--target <urlOrPath>] [--x <px>] [--y <px>] [--width <px>] [--height <px>] [--invoke-timeout <ms>]
nodes canvas hide --node &lt;id|name|ip&gt; [--invoke-timeout <ms>]
nodes canvas navigate <url> --node &lt;id|name|ip&gt; [--invoke-timeout <ms>]
nodes canvas eval [<js>] --node &lt;id|name|ip&gt; [--js <code>] [--invoke-timeout <ms>]
nodes canvas a2ui push --node &lt;id|name|ip&gt; (--jsonl <path> | --text <text>) [--invoke-timeout <ms>]
nodes canvas a2ui reset --node &lt;id|name|ip&gt; [--invoke-timeout <ms>]
nodes screen record --node &lt;id|name|ip&gt; [--screen <index>] [--duration &lt;ms|10s&gt;] [--fps <n>] [--no-audio] [--out <path>] [--invoke-timeout <ms>]

位置 (Location):

Terminal window
nodes location get --node &lt;id|name|ip&gt; [--max-age <ms>] [--accuracy &lt;coarse|balanced|precise&gt;] [--location-timeout <ms>] [--invoke-timeout <ms>]

Browser 控制 CLI(專用於 Chrome/Brave/Edge/Chromium)。請參考 openclaw browser 和 Browser tool。

常用選項:

  • --url, --token, --timeout, --expect-final, --json
  • --browser-profile <name>

管理:

Terminal window
browser status
browser start
browser stop
browser reset-profile
browser tabs
browser open <url>
browser focus <targetId>
browser close [targetId]
browser profiles
browser create-profile --name <name> [--color <hex>] [--cdp-url <url>] [--driver existing-session] [--user-data-dir <path>]
browser delete-profile --name <name>

檢查:

Terminal window
browser screenshot [targetId] [--full-page] [--ref <ref>] [--element <selector>] [--type png|jpeg]
browser snapshot [--format aria|ai] [--target-id <id>] [--limit <n>] [--interactive] [--compact] [--depth <n>] [--selector <sel>] [--out <path>]

操作:

Terminal window
browser navigate <url> [--target-id <id>]
browser resize <width> <height> [--target-id <id>]
browser click <ref> [--double] [--button &lt;left|right|middle&gt;] [--modifiers <csv>] [--target-id <id>]
browser type <ref> <text> [--submit] [--slowly] [--target-id <id>]
browser press <key> [--target-id <id>]
browser hover <ref> [--target-id <id>]
browser drag <startRef> <endRef> [--target-id <id>]
browser select <ref> <values...> [--target-id <id>]
browser upload <paths...> [--ref <ref>] [--input-ref <ref>] [--element <selector>] [--target-id <id>] [--timeout-ms <ms>]
browser fill [--fields <json>] [--fields-file <path>] [--target-id <id>]
browser dialog --accept|--dismiss [--prompt <text>] [--target-id <id>] [--timeout-ms <ms>]
browser wait [--time <ms>] [--text <value>] [--text-gone <value>] [--target-id <id>]
browser evaluate --fn <code> [--ref <ref>] [--target-id <id>]
browser console [--level &lt;error|warn|info&gt;] [--target-id <id>]
browser pdf [--target-id <id>]

這是由外掛提供的語音通話工具。只有在你安裝並啟用了 voice-call 外掛時才會顯示。請參考 openclaw voicecall。

常用指令:

  • voicecall call --to <phone> --message <text> [--mode notify|conversation]
  • voicecall start --to <phone> [--message <text>] [--mode notify|conversation]
  • voicecall continue --call-id <id> --message <text>
  • voicecall speak --call-id <id> --message <text>
  • voicecall end --call-id <id>
  • voicecall status --call-id <id>
  • voicecall tail [--file <path>] [--since <n>] [--poll <ms>]
  • voicecall latency [--file <path>] [--last <n>]
  • voicecall expose [--mode off|serve|funnel] [--path <path>] [--port <port>] [--serve-path <path>]

搜尋即時的 OpenClaw 文檔索引。

搜尋即時文檔索引。

開啟連接到 Gateway 的終端介面 (TUI)。

選項:

  • --url <url>
  • --token <token>
  • --password <password>
  • --session <key>
  • --deliver
  • --thinking <level>
  • --message <text>
  • --timeout-ms <ms> (預設為 agents.defaults.timeoutSeconds)
  • --history-limit <n>
OpenClaw

OpenClaw Expert

還是卡住了?

如果這篇文件沒有解決你的情境,直接問 OpenClaw Expert,拿到可執行步驟。