CLI 參考資料
openclaw 是主要的 CLI 進入點。每個核心指令都有專屬的參考頁面,或是與其別名指令一起記錄;本索引列出了指令、全域旗標,以及適用於整個 CLI 的輸出樣式規則。
根據意圖使用設定指令:
openclaw setup會建立基礎設定和工作區,而無需走過完整的引導式入門流程。openclaw onboard是針對 gateway、模型驗證、工作區、通道、技能和健康狀況的完整引導式首次執行路徑。openclaw configure會變更現有設定的目標部分,例如模型驗證、gateway、通道、外掛程式或技能。openclaw channels add會在基礎存在後設定通道帳戶;不加旗標執行以進行引導式通道設定,或加上通道特定旗標以供指令碼使用。
| 區域 | 指令 |
|---|---|
| 設定與入門 | crestodian · setup · onboard · configure · config · completion · doctor · dashboard |
| 重設與解除安裝 | backup · reset · uninstall · update |
| 訊息與代理程式 | message · agent · agents · acp · mcp |
| 健康狀況與工作階段 | status · health · sessions |
| Gateway 與日誌 | gateway · logs · system |
| 模型與推論 | models · infer · capability (infer 的別名) · memory · commitments · wiki |
| 網路與節點 | directory · nodes · devices · node |
| 執行時期與沙箱 | approvals · exec-policy (參見 approvals) · sandbox · tui · chat/terminal (tui --local 的別名) · browser |
| 自動化 | cron · tasks · hooks · webhooks |
| 探索與文件 | dns · docs |
| 配對與頻道 | pairing · qr · channels |
| 安全性和外掛程式 | security · secrets · skills · plugins · proxy |
| 舊版別名 | daemon (gateway service) · clawbot (namespace) |
| 外掛程式(選用) | path · voicecall (如果已安裝) |
| 旗標 | 用途 |
|---|---|
--dev | 隔離 ~/.openclaw-dev 下的狀態並移動預設連接埠 |
--profile <name> | 隔離 ~/.openclaw-<name> 下的狀態 |
--container <name> | 指定命名的容器以執行 |
--no-color | 停用 ANSI 顏色(也會遵守 NO_COLOR=1) |
--update | openclaw update 的簡寫(僅限原始碼安裝) |
-V, --version, -v | 列印版本並結束 |
- ANSI 顏色和進度指示器僅在 TTY 工作階段中呈現。
- OSC-8 超連結在支援的情況下會呈現為可點擊的連結;否則 CLI 會回退為純文字 URL。
--json(以及支援情況下的--plain) 會停用樣式以產生乾淨的輸出。- 長時間執行的指令會顯示進度指示器(支援時為 OSC 9;4)。
色盤的依據來源:src/terminal/palette.ts。
完整指令樹
openclaw [--dev] [--profile]
crestodian 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 path resolve find set validate emit commitments list dismiss 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 get 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 exec-policy show preset set 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 proxy start run coverage sessions query blob purge pairing list approve qr clawbot qr docs dns setup tui chat (alias: tui —local) terminal (alias: tui —local)
外掛程式可以新增額外的頂層指令(例如 `openclaw voicecall`)。聊天斜線指令
Section titled “聊天斜線指令”聊天訊息支援 /... 指令。請參閱斜線指令。
重點:
/status— 快速診斷。/trace— 作用域限於工作階段的外掛程式追蹤/除錯行。/config— 持續性的設定變更。/debug— 僅限執行時期的設定覆寫(僅存在記憶體中,不會寫入磁碟;需要commands.debug: true)。
當 OAuth/API 憑證可用時,openclaw status --usage 和控制 UI 介面會顯示供應商的使用量/配額。資料直接來自供應商的使用量端點,並正規化為 X% left。目前提供使用量視窗的供應商:Anthropic、GitHub Copilot、Gemini CLI、OpenAI Codex、MiniMax、Xiaomi 和 z.ai。
詳情請參閱使用量追蹤。