OpenClaw CLI 命令速查手冊(中文注釋+示例版)
發(fā)布時間:2026-03-26 10:26:38 作者:小空霸kongba007
我要評論
本文檔提供了OpenClaw CLI命令的速查手冊,包含初始化配置、診斷維護(hù)和網(wǎng)關(guān)管理三大類命令,文中介紹的非常詳細(xì),對大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧
下面我把它整理成更適合查閱的 Markdown 表格版命令參考。
我按這幾個字段來列:
- 命令
- 子命令
- 常用參數(shù)
- 中文備注
- 例子
- 詳細(xì)用途
這份表是基于你貼出來的 OpenClaw zsh completion 命令樹整理的,所以它適合作為一份 CLI 使用速查表。
1. 初始化 / 配置 / 診斷
| 命令 | 子命令 | 常用參數(shù) | 中文備注 | 例子 | 詳細(xì)用途 |
|---|---|---|---|---|---|
| openclaw setup | - | --workspace --wizard --non-interactive | 初始化本地 OpenClaw 目錄和默認(rèn)工作區(qū) | openclaw setup --workspace ~/.openclaw/workspace | 創(chuàng)建 ~/.openclaw/openclaw.json 和默認(rèn) workspace,適合第一次手動初始化 |
| openclaw onboard | - | --workspace --flow --mode --gateway-port --install-daemon --skip-channels | 首次引導(dǎo)向?qū)?/td> | openclaw onboard --flow quickstart --mode local | 一站式完成網(wǎng)關(guān)、模型、工作區(qū)、技能、渠道的初始配置 |
| openclaw configure | - | --section | 分區(qū)配置向?qū)?/td> | openclaw configure --section gateway --section channels | 只修改某一部分配置,而不是全量重跑 onboarding |
| openclaw config | get | --json | 讀取配置項 | openclaw config get channels.feishu.enabled | 按點路徑讀取配置值 |
| openclaw config | set | --json | 設(shè)置配置項 | openclaw config set channels.feishu.enabled true --json | 修改某個配置字段,通常直接寫入 openclaw.json |
| openclaw config | unset | - | 刪除配置項 | openclaw config unset channels.feishu.allowFrom | 刪除某個字段,讓配置回退默認(rèn)行為 |
| openclaw doctor | - | --repair --fix --force --deep | 健康檢查與修復(fù) | openclaw doctor --repair | 檢查網(wǎng)關(guān)、配置、渠道、服務(wù)是否異常,并嘗試修復(fù) |
| openclaw dashboard | - | --no-open | 打開控制臺 | openclaw dashboard | 打開控制 UI,用瀏覽器查看運行狀態(tài) |
| openclaw reset | - | --scope --yes --dry-run | 重置本地狀態(tài) | openclaw reset --scope config+creds+sessions --yes | 清空配置、憑據(jù)、會話,適合重新初始化 |
| openclaw uninstall | - | --service --state --workspace --all | 卸載 OpenClaw 本地環(huán)境 | openclaw uninstall --all --yes | 刪除服務(wù)、狀態(tài)、工作區(qū),但 CLI 本體可能仍保留 |
2. Gateway / Daemon / 日志
| 命令 | 子命令 | 常用參數(shù) | 中文備注 | 例子 | 詳細(xì)用途 |
|---|---|---|---|---|---|
| openclaw gateway | run | --port --bind --token --auth --verbose --dev | 前臺運行 Gateway | openclaw gateway run --port 18789 --verbose | 啟動 WebSocket Gateway,負(fù)責(zé) sessions、routing、channels |
| openclaw gateway | status | --json --deep --timeout | 查看網(wǎng)關(guān)狀態(tài) | openclaw gateway status --json | 查看 Gateway 是否運行、是否可探測 |
| openclaw gateway | install | --port --runtime --token | 安裝后臺服務(wù) | openclaw gateway install --port 18789 | 把 Gateway 安裝成 launchd/systemd/schtasks 服務(wù) |
| openclaw gateway | start | --json | 啟動后臺服務(wù) | openclaw gateway start | 啟動已安裝的 Gateway 服務(wù) |
| openclaw gateway | stop | --json | 停止后臺服務(wù) | openclaw gateway stop | 停止 Gateway 服務(wù) |
| openclaw gateway | restart | --json | 重啟后臺服務(wù) | openclaw gateway restart | 修改配置后常用來重啟服務(wù) |
| openclaw gateway | call | --params --json | 調(diào)用 Gateway RPC | openclaw gateway call some.method --params '{"foo":"bar"}' --json | 直接調(diào)用內(nèi)部 RPC,適合調(diào)試 |
| openclaw gateway | health | --json | 獲取健康信息 | openclaw gateway health --json | 查看運行健康狀態(tài) |
| openclaw gateway | probe | --url --token --json | 探測本地/遠(yuǎn)程 Gateway | openclaw gateway probe --json | 綜合檢查網(wǎng)關(guān)可達(dá)性、探測能力 |
| openclaw gateway | discover | --json | 發(fā)現(xiàn) Gateway | openclaw gateway discover --json | 通過 Bonjour 等方式發(fā)現(xiàn)可連接網(wǎng)關(guān) |
| openclaw daemon | status | --json | 查看后臺服務(wù)狀態(tài) | openclaw daemon status | 關(guān)注系統(tǒng)服務(wù)安裝/運行情況 |
| openclaw daemon | install | --port --runtime | 安裝后臺服務(wù) | openclaw daemon install --port 18789 | 與 gateway install 類似,更偏服務(wù)管理 |
| openclaw daemon | start | --json | 啟動服務(wù) | openclaw daemon start | 啟動后臺 Gateway |
| openclaw daemon | stop | --json | 停止服務(wù) | openclaw daemon stop | 停止后臺 Gateway |
| openclaw daemon | restart | --json | 重啟服務(wù) | openclaw daemon restart | 配置更新后重啟 |
| openclaw logs | - | --follow --limit --json --plain | 查看日志 | openclaw logs --follow | 實時查看 Gateway 文件日志,是排障核心命令 |
3. 渠道 / 飛書 / 配對
| 命令 | 子命令 | 常用參數(shù) | 中文備注 | 例子 | 詳細(xì)用途 |
|---|---|---|---|---|---|
| openclaw channels | list | --json | 列出已配置渠道 | openclaw channels list --json | 查看 Telegram、Feishu、Slack 等賬號是否已配置 |
| openclaw channels | status | --probe --json | 查看渠道狀態(tài) | openclaw channels status --probe --json | 檢查憑據(jù)、連接狀態(tài)是否正常 |
| openclaw channels | capabilities | --channel --account --json | 查看渠道能力 | openclaw channels capabilities --channel feishu --json | 查看該渠道支持哪些消息能力 |
| openclaw channels | resolve | --channel --account --kind --json | 名稱解析為 ID | openclaw channels resolve --channel feishu --kind user "張三" | 把用戶/群名稱解析成內(nèi)部目標(biāo) ID |
| openclaw channels | logs | --channel --lines --json | 查看渠道日志 | openclaw channels logs --channel feishu --lines 200 | 專門看某個渠道的日志片段 |
| openclaw channels | add | --channel --account --name --token --bot-token --app-token | 添加或更新渠道 | openclaw channels add --channel feishu --account main | 為某渠道寫入賬號配置,飛書、Telegram、Slack 都走這里 |
| openclaw channels | remove | --channel --account --delete | 移除渠道 | openclaw channels remove --channel feishu --account main --delete | 停用或刪除某個渠道賬號 |
| openclaw channels | login | --channel --account | 渠道登錄 | openclaw channels login --channel whatsapp | 某些渠道需要登錄鏈接 |
| openclaw channels | logout | --channel --account | 渠道登出 | openclaw channels logout --channel whatsapp | 斷開登錄會話 |
| openclaw pairing | list | --channel --json | 查看待審批配對 | openclaw pairing list --channel feishu --json | 對 dmPolicy=pairing 的渠道,列出待審批用戶 |
| openclaw pairing | approve | --channel --notify | 批準(zhǔn)配對 | openclaw pairing approve ABC123 --channel feishu --notify | 批準(zhǔn)某個飛書用戶,讓其后續(xù)消息進(jìn)入正常 Agent 鏈路 |
4. 消息操作
| 命令 | 子命令 | 常用參數(shù) | 中文備注 | 例子 | 詳細(xì)用途 |
|---|---|---|---|---|---|
| openclaw message | send | --message/-m --target/-t --channel --account --media --reply-to | 發(fā)送消息 | openclaw message send -m "hello" -t user_xxx --channel feishu | 向某個渠道目標(biāo)發(fā)送消息 |
| openclaw message | broadcast | --targets --message --channel | 批量廣播 | openclaw message broadcast --channel feishu --targets u1,u2 --message "通知" | 向多個目標(biāo)一次性發(fā)消息 |
| openclaw message | poll | --poll-question --poll-option | 發(fā)起投票 | openclaw message poll --channel discord --target 123 --poll-question "吃什么" --poll-option 火鍋 --poll-option 燒烤 | 某些渠道支持原生投票 |
| openclaw message | read | --target --channel --limit --before --after | 讀最近消息 | openclaw message read --channel feishu --target user_xxx --limit 20 | 拉取目標(biāo)最近消息記錄 |
| openclaw message | edit | --message-id --message | 編輯消息 | openclaw message edit --channel discord --message-id 123 --message "修正版" | 修改已發(fā)送消息 |
| openclaw message | delete | --message-id | 刪除消息 | openclaw message delete --channel discord --message-id 123 | 刪除指定消息 |
| openclaw message | react | --message-id --emoji --remove | 添加/移除反應(yīng) | openclaw message react --channel slack --message-id 123 --emoji ?? | 對消息加 emoji reaction |
| openclaw message | reactions | --message-id --limit | 查看反應(yīng) | openclaw message reactions --channel slack --message-id 123 | 列出某條消息的反應(yīng)詳情 |
| openclaw message | pin | --message-id | 置頂消息 | openclaw message pin --channel discord --target chan_xxx --message-id 123 | 把消息置頂 |
| openclaw message | unpin | --message-id | 取消置頂 | openclaw message unpin --channel discord --target chan_xxx --message-id 123 | 取消置頂 |
| openclaw message | pins | --limit | 查看置頂列表 | openclaw message pins --channel discord --target chan_xxx | 列出當(dāng)前頻道置頂 |
| openclaw message | search | --query --channel-id --author-id | 搜索消息 | openclaw message search --channel discord --query "error" | 按關(guān)鍵字檢索消息 |
| openclaw message | permissions | --target --channel | 查看權(quán)限 | openclaw message permissions --channel discord --target channel:123 | 查看機(jī)器人在該目標(biāo)上的權(quán)限 |
| openclaw message | thread create | --thread-name --message | 新建線程 | openclaw message thread create --channel discord --target chan_xxx --thread-name "討論" | 創(chuàng)建討論線程 |
| openclaw message | thread list | --channel-id --limit | 列線程 | openclaw message thread list --channel discord --channel-id 123 | 查看頻道線程 |
| openclaw message | thread reply | --message --reply-to | 在線程中回復(fù) | openclaw message thread reply --channel discord --target thread_xxx --message "收到" | 往線程里發(fā)送消息 |
| openclaw message | emoji list | --guild-id | 列表情 | openclaw message emoji list --channel discord --guild-id 123 | 查看服務(wù)器表情 |
| openclaw message | emoji upload | --emoji-name --media | 上傳表情 | openclaw message emoji upload --channel discord --guild-id 123 --emoji-name ok --media ./ok.png | 上傳自定義表情 |
| openclaw message | sticker send | --sticker-id | 發(fā)貼紙 | openclaw message sticker send --channel discord --target chan_xxx --sticker-id 123 | 發(fā)送貼紙 |
| openclaw message | sticker upload | --sticker-name --media | 上傳貼紙 | openclaw message sticker upload --channel discord --guild-id 123 --sticker-name wow --media ./wow.png | 上傳貼紙資源 |
| openclaw message | channel info | --target | 頻道信息 | openclaw message channel info --channel discord --target chan_xxx | 查看頻道詳情 |
| openclaw message | channel list | --guild-id | 列頻道 | openclaw message channel list --channel discord --guild-id 123 | 列出服務(wù)器頻道 |
| openclaw message | member info | --user-id --guild-id | 成員信息 | openclaw message member info --channel discord --guild-id 123 --user-id 456 | 查看成員信息 |
| openclaw message | voice status | --guild-id --user-id | 語音狀態(tài) | openclaw message voice status --channel discord --guild-id 123 --user-id 456 | 查看某成員語音狀態(tài) |
| openclaw message | event list | --guild-id | 列活動 | openclaw message event list --channel discord --guild-id 123 | 查看計劃活動 |
| openclaw message | event create | --event-name --start-time | 建活動 | openclaw message event create --channel discord --guild-id 123 --event-name "周會" --start-time 2026-03-12T10:00:00 | 創(chuàng)建活動事件 |
| openclaw message | timeout | --guild-id --user-id --duration-min | 禁言成員 | openclaw message timeout --channel discord --guild-id 123 --user-id 456 --duration-min 10 | 對成員進(jìn)行超時禁言 |
| openclaw message | kick | --guild-id --user-id | 移出成員 | openclaw message kick --channel discord --guild-id 123 --user-id 456 | 踢出成員 |
| openclaw message | ban | --guild-id --user-id | 封禁成員 | openclaw message ban --channel discord --guild-id 123 --user-id 456 | 封禁成員 |
5. Agent / Agents / Sessions
| 命令 | 子命令 | 常用參數(shù) | 中文備注 | 例子 | 詳細(xì)用途 |
|---|---|---|---|---|---|
| openclaw agent | - | --message/-m --to/-t --agent --channel --deliver --local --thinking --json | 手動跑一輪 agent | openclaw agent -m "hello" --agent main --channel feishu --deliver | 不依賴外部入站消息,直接觸發(fā)一個 agent turn |
| openclaw agents | list | --json --bindings | 列出 agent | openclaw agents list --bindings --json | 查看有哪些 agent,以及它們的路由綁定 |
| openclaw agents | add | --workspace --model --agent-dir --bind | 新增 agent | openclaw agents add helper --workspace ~/helper-ws --model openai/gpt-4.1 | 新增隔離 agent,可指定獨立 workspace |
| openclaw agents | set-identity | --agent --name --theme --emoji --avatar | 設(shè)置 agent 身份 | openclaw agents set-identity --agent main --name "Lobster" --emoji "??" | 更新 agent 的名稱、形象、主題 |
| openclaw agents | delete | --force --json | 刪除 agent | openclaw agents delete helper --force | 刪除某個 agent 及其狀態(tài) |
| openclaw sessions | - | --json --store --active | 查看會話 | openclaw sessions --json --active 60 | 查看最近活躍 session,研究路由和會話落盤很有用 |
6. Memory / Models / System
| 命令 | 子命令 | 常用參數(shù) | 中文備注 | 例子 | 詳細(xì)用途 |
|---|---|---|---|---|---|
| openclaw memory | status | --agent --json --deep | 查看記憶索引狀態(tài) | openclaw memory status --agent main --json | 看 memory 是否已建立索引 |
| openclaw memory | index | --agent --force | 重建記憶索引 | openclaw memory index --agent main --force | 強(qiáng)制重建記憶庫索引 |
| openclaw memory | search | --agent --max-results --min-score --json | 搜索記憶 | openclaw memory search "飛書配置" --agent main --json | 在記憶文件中檢索相關(guān)內(nèi)容 |
| openclaw models | list | --all --local --provider --json | 列模型 | openclaw models list --provider openai --json | 查看當(dāng)前模型目錄 |
| openclaw models | status | --json --probe --agent | 查看模型狀態(tài) | openclaw models status --probe --json | 檢查 provider 認(rèn)證、默認(rèn)模型、可用性 |
| openclaw models | set | - | 設(shè)置默認(rèn)模型 | openclaw models set openai/gpt-4.1 | 把默認(rèn)對話模型切換成指定模型 |
| openclaw models | set-image | - | 設(shè)置圖片模型 | openclaw models set-image openai/gpt-image-1 | 配置默認(rèn)圖像模型 |
| openclaw models | aliases list | --json | 查看別名 | openclaw models aliases list --json | 查看模型別名表 |
| openclaw models | fallbacks list | --json | 查看回退模型 | openclaw models fallbacks list --json | 查看主模型失敗時的回退鏈 |
| openclaw models | scan | --provider --set-default --json | 掃描候選模型 | openclaw models scan --provider openrouter --set-default --json | 自動發(fā)現(xiàn)可用模型并設(shè)置默認(rèn)值 |
| openclaw models | auth add | - | 增加認(rèn)證 | openclaw models auth add | 交互式添加 provider 認(rèn)證 |
| openclaw models | auth login | --provider --method | 登錄 provider | openclaw models auth login --provider google-gemini-cli | 跑 provider 自帶登錄流程 |
| openclaw models | auth setup-token | --provider | 初始化 token | openclaw models auth setup-token --provider anthropic | 用 CLI 協(xié)助建立 token |
| openclaw models | auth paste-token | --provider --profile-id | 粘貼 token | openclaw models auth paste-token --provider openai | 手動把 token 寫入認(rèn)證配置 |
| openclaw system | event | --text --mode --json | 注入系統(tǒng)事件 | openclaw system event --text "重新加載人格" --mode now | 向主 session 注入一條系統(tǒng)事件 |
| openclaw system | heartbeat last | --json | 查看最后心跳 | openclaw system heartbeat last --json | 查看最近一次心跳事件 |
| openclaw system | heartbeat enable | --json | 開啟心跳 | openclaw system heartbeat enable | 打開系統(tǒng)心跳機(jī)制 |
| openclaw system | heartbeat disable | --json | 關(guān)閉心跳 | openclaw system heartbeat disable | 關(guān)閉系統(tǒng)心跳 |
| openclaw system | presence | --json | 查看 presence | openclaw system presence --json | 查看系統(tǒng) presence 條目 |
7. Cron / Hooks / Plugins / Skills
| 命令 | 子命令 | 常用參數(shù) | 中文備注 | 例子 | 詳細(xì)用途 |
|---|---|---|---|---|---|
| openclaw cron | status | --json | 查看調(diào)度器狀態(tài) | openclaw cron status --json | 查看 cron 子系統(tǒng)是否運行 |
| openclaw cron | list | --all --json | 列任務(wù) | openclaw cron list --all --json | 查看當(dāng)前定時任務(wù) |
| openclaw cron | add | --name --message --every --cron --agent --announce | 添加任務(wù) | openclaw cron add --name morning --every 1d --message "早報" --agent main | 周期性觸發(fā) agent 或系統(tǒng)事件 |
| openclaw cron | rm | --json | 刪除任務(wù) | openclaw cron rm <job-id> | 刪除定時任務(wù) |
| openclaw cron | enable | - | 啟用任務(wù) | openclaw cron enable <job-id> | 啟用某個已禁用任務(wù) |
| openclaw cron | disable | - | 禁用任務(wù) | openclaw cron disable <job-id> | 暫停某個任務(wù) |
| openclaw cron | runs | --id --limit | 查看運行歷史 | openclaw cron runs --id <job-id> --limit 20 | 查看任務(wù)執(zhí)行記錄 |
| openclaw cron | run | --due | 立即執(zhí)行 | openclaw cron run --id <job-id> | 手動調(diào)試執(zhí)行某任務(wù) |
| openclaw cron | edit | --name --message --every --enable | 編輯任務(wù) | openclaw cron edit <job-id> --every 2h --enable | 修改任務(wù)計劃、消息、目標(biāo) |
| openclaw hooks | list | --eligible --json --verbose | 列 hooks | openclaw hooks list --verbose | 查看可用和已安裝 hooks |
| openclaw hooks | info | --json | hook 詳情 | openclaw hooks info my-hook --json | 查看某個 hook 詳細(xì)信息 |
| openclaw hooks | check | --json | 檢查 hook | openclaw hooks check --json | 看是否滿足依賴和啟用條件 |
| openclaw hooks | enable | - | 啟用 hook | openclaw hooks enable my-hook | 讓 hook 進(jìn)入運行狀態(tài) |
| openclaw hooks | disable | - | 禁用 hook | openclaw hooks disable my-hook | 停止 hook 生效 |
| openclaw hooks | install | --link | 安裝 hook | openclaw hooks install ./my-hook-pack --link | 安裝本地 hook 包 |
| openclaw hooks | update | --all --dry-run | 更新 hooks | openclaw hooks update --all | 更新已安裝 hooks |
| openclaw plugins | list | --json --enabled --verbose | 列插件 | openclaw plugins list --enabled | 查看插件目錄及啟用情況 |
| openclaw plugins | info | --json | 插件詳情 | openclaw plugins info feishu --json | 查看某插件元信息 |
| openclaw plugins | enable | - | 啟用插件 | openclaw plugins enable feishu | 在配置中啟用插件 |
| openclaw plugins | disable | - | 禁用插件 | openclaw plugins disable feishu | 在配置中禁用插件 |
| openclaw plugins | install | --link | 安裝插件 | openclaw plugins install ./plugin-dir --link | 安裝本地或 npm 插件 |
| openclaw plugins | uninstall | --force --dry-run | 卸載插件 | openclaw plugins uninstall feishu --force | 卸載某插件 |
| openclaw plugins | update | --all --dry-run | 更新插件 | openclaw plugins update --all | 更新已安裝插件 |
| openclaw plugins | doctor | - | 檢查插件問題 | openclaw plugins doctor | 診斷插件加載異常 |
| openclaw skills | list | --json --eligible --verbose | 列技能 | openclaw skills list --eligible | 查看可用 skills |
| openclaw skills | info | --json | 技能詳情 | openclaw skills info browser --json | 查看某個 skill 的元信息 |
| openclaw skills | check | --json | 檢查技能 | openclaw skills check --json | 看哪些 skills 缺依賴、哪些可直接用 |
8. Browser / Nodes / Devices / Node / Sandbox / TUI
這一組命令非常多,我給你列最常用、最有代表性的。
| 命令 | 子命令 | 常用參數(shù) | 中文備注 | 例子 | 詳細(xì)用途 |
|---|---|---|---|---|---|
| openclaw browser | status | --json | 瀏覽器狀態(tài) | openclaw browser status --json | 查看 OpenClaw 專用瀏覽器是否運行 |
| openclaw browser | start | - | 啟動瀏覽器 | openclaw browser start | 啟動專用瀏覽器環(huán)境 |
| openclaw browser | stop | - | 停止瀏覽器 | openclaw browser stop | 停掉瀏覽器進(jìn)程 |
| openclaw browser | tabs | - | 列出標(biāo)簽頁 | openclaw browser tabs | 查看當(dāng)前所有打開頁面 |
| openclaw browser | open | - | 打開網(wǎng)址 | openclaw browser open https://example.com | 新開一個標(biāo)簽頁 |
| openclaw browser | navigate | --target-id | 跳轉(zhuǎn)頁面 | openclaw browser navigate https://openai.com | 當(dāng)前標(biāo)簽頁跳轉(zhuǎn) |
| openclaw browser | screenshot | --full-page --type | 截圖 | openclaw browser screenshot --full-page | 獲取當(dāng)前頁面截圖 |
| openclaw browser | snapshot | --format --limit | 頁面結(jié)構(gòu)快照 | openclaw browser snapshot --format ai | 讀取頁面結(jié)構(gòu),適合自動化 |
| openclaw browser | click | --target-id | 點擊元素 | openclaw browser click REF_12 | 根據(jù)快照 ref 點擊頁面元素 |
| openclaw browser | type | --submit --slowly | 輸入文字 | openclaw browser type REF_8 "hello" --submit | 給輸入框填內(nèi)容 |
| openclaw browser | --target-id | 導(dǎo)出 PDF | openclaw browser pdf | 保存頁面為 PDF | |
| openclaw browser | console | --level | 控制臺日志 | openclaw browser console --level error | 查看頁面 JS 錯路徑讀取配置值 |
| openclaw config | set | --json | 設(shè)置配置項 | openclaw config set channels.feishu.enabled true --json | 修改某個配置字段,通常直接寫入 openclaw.json |
| openclaw config | unset | - | 刪除配置項 | openclaw config unset channels.feishu.allowFrom | 刪除某個字段,讓配置回退默認(rèn)行為 |
| openclaw doctor | - | --repair --fix --force --deep | 健康檢查與修復(fù) | openclaw doctor --repair | 檢查網(wǎng)關(guān)、配置、渠道、服務(wù)是否異常,并嘗試修復(fù) |
| openclaw dashboard | - | --no-open | 打開控制臺 | openclaw dashboard | 打開控制 UI,用瀏覽器查看運行狀態(tài) |
| openclaw reset | - | --scope --yes --dry-run | 重置本地狀態(tài) | openclaw reset --scope config+creds+sessions --yes | 清空配置、憑據(jù)、會話,適合重新初始化 |
| openclaw uninstall | - | --service --state --workspace --all | 卸載 OpenClaw 本地環(huán)境 | openclaw uninstall --all --yes | 刪除服務(wù)、狀態(tài)、工作區(qū),但 CLI 本體可能仍保留 |
2. Gateway / Daemon / 日志
| 命令 | 子命令 | 常用參數(shù) | 中文備注 | 例子 | 詳細(xì)用途 |
|---|---|---|---|---|---|
| openclaw gateway | run | --port --bind --token --auth --verbose --dev | 前臺運行 Gateway | openclaw gateway run --port 18789 --verbose | 啟動 WebSocket Gateway,負(fù)責(zé) sessions、routing、channels |
| openclaw gateway | status | --json --deep --timeout | 查看網(wǎng)關(guān)狀態(tài) | openclaw gateway status --json | 查看 Gateway 是否運行、是否可探測 |
| openclaw gateway | install | --port --runtime --token | 安裝后臺服務(wù) | openclaw gateway install --port 18789 | 把 Gateway 安裝成 launchd/systemd/schtasks 服務(wù) |
| openclaw gateway | start | --json | 啟動后臺服務(wù) | openclaw gateway start | 啟動已安裝的 Gateway 服務(wù) |
| openclaw gateway | stop | --json | 停止后臺服務(wù) | openclaw gateway stop | 停止 Gateway 服務(wù) |
| openclaw gateway | restart | --json | 重啟后臺服務(wù) | openclaw gateway restart | 修改配置后常用來重啟服務(wù) |
| openclaw gateway | call | --params --json | 調(diào)用 Gateway RPC | openclaw gateway call some.method --params '{"foo":"bar"}' --json | 直接調(diào)用內(nèi)部 RPC,適合調(diào)試 |
| openclaw gateway | health | --json | 獲取健康信息 | openclaw gateway health --json | 查看運行健康狀態(tài) |
| openclaw gateway | probe | --url --token --json | 探測本地/遠(yuǎn)程 Gateway | openclaw gateway probe --json | 綜合檢查網(wǎng)關(guān)可達(dá)性、探測能力 |
| openclaw gateway | discover | --json | 發(fā)現(xiàn) Gateway | openclaw gateway discover --json | 通過 Bonjour 等方式發(fā)現(xiàn)可連接網(wǎng)關(guān) |
| openclaw daemon | status | --json | 查看后臺服務(wù)狀態(tài) | openclaw daemon status | 關(guān)注系統(tǒng)服務(wù)安裝/運行情況 |
| openclaw daemon | install | --port --runtime | 安裝后臺服務(wù) | openclaw daemon install --port 18789 | 與 gateway install 類似,更偏服務(wù)管理 |
| openclaw daemon | start | --json | 啟動服務(wù) | openclaw daemon start | 啟動后臺 Gateway |
| openclaw daemon | stop | --json | 停止服務(wù) | openclaw daemon stop | 停止后臺 Gateway |
| openclaw daemon | restart | --json | 重啟服務(wù) | openclaw daemon restart | 配置更新后重啟 |
| openclaw logs | - | --follow --limit --json --plain | 查看日志 | openclaw logs --follow | 實時查看 Gateway 文件日志,是排障核心命令 |
3. 渠道 / 飛書 / 配對
| 命令 | 子命令 | 常用參數(shù) | 中文備注 | 例子 | 詳細(xì)用途 |
|---|---|---|---|---|---|
| openclaw channels | list | --json | 列出已配置渠道 | openclaw channels list --json | 查看 Telegram、Feishu、Slack 等賬號是否已配置 |
| openclaw channels | status | --probe --json | 查看渠道狀態(tài) | openclaw channels status --probe --json | 檢查憑據(jù)、連接狀態(tài)是否正常 |
| openclaw channels | capabilities | --channel --account --json | 查看渠道能力 | openclaw channels capabilities --channel feishu --json | 查看該渠道支持哪些消息能力 |
| openclaw channels | resolve | --channel --account --kind --json | 名稱解析為 ID | openclaw channels resolve --channel feishu --kind user "張三" | 把用戶/群名稱解析成內(nèi)部目標(biāo) ID |
| openclaw channels | logs | --channel --lines --json | 查看渠道日志 | openclaw channels logs --channel feishu --lines 200 | 專門看某個渠道的日志片段 |
| openclaw channels | add | --channel --account --name --token --bot-token --app-token | 添加或更新渠道 | openclaw channels add --channel feishu --account main | 為某渠道寫入賬號配置,飛書、Telegram、Slack 都走這里 |
| openclaw channels | remove | --channel --account --delete | 移除渠道 | openclaw channels remove --channel feishu --account main --delete | 停用或刪除某個渠道賬號 |
| openclaw channels | login | --channel --account | 渠道登錄 | openclaw channels login --channel whatsapp | 某些渠道需要登錄鏈接 |
| openclaw channels | logout | --channel --account | 渠道登出 | openclaw channels logout --channel whatsapp | 斷開登錄會話 |
| openclaw pairing | list | --channel --json | 查看待審批配對 | openclaw pairing list --channel feishu --json | 對 dmPolicy=pairing 的渠道,列出待審批用戶 |
| openclaw pairing | approve | --channel --notify | 批準(zhǔn)配對 | openclaw pairing approve ABC123 --channel feishu --notify | 批準(zhǔn)某個飛書用戶,讓其后續(xù)消息進(jìn)入正常 Agent 鏈路 |
4. 消息操作
| 命令 | 子命令 | 常用參數(shù) | 中文備注 | 例子 | 詳細(xì)用途 |
|---|---|---|---|---|---|
| openclaw message | send | --message/-m --target/-t --channel --account --media --reply-to | 發(fā)送消息 | openclaw message send -m "hello" -t user_xxx --channel feishu | 向某個渠道目標(biāo)發(fā)送消息 |
| openclaw message | broadcast | --targets --message --channel | 批量廣播 | openclaw message broadcast --channel feishu --targets u1,u2 --message "通知" | 向多個目標(biāo)一次性發(fā)消息 |
| openclaw message | poll | --poll-question --poll-option | 發(fā)起投票 | openclaw message poll --channel discord --target 123 --poll-question "吃什么" --poll-option 火鍋 --poll-option 燒烤 | 某些渠道支持原生投票 |
| openclaw message | read | --target --channel --limit --before --after | 讀最近消息 | openclaw message read --channel feishu --target user_xxx --limit 20 | 拉取目標(biāo)最近消息記錄 |
| openclaw message | edit | --message-id --message | 編輯消息 | openclaw message edit --channel discord --message-id 123 --message "修正版" | 修改已發(fā)送消息 |
| openclaw message | delete | --message-id | 刪除消息 | openclaw message delete --channel discord --message-id 123 | 刪除指定消息 |
| openclaw message | react | --message-id --emoji --remove | 添加/移除反應(yīng) | openclaw message react --channel slack --message-id 123 --emoji ?? | 對消息加 emoji reaction |
| openclaw message | reactions | --message-id --limit | 查看反應(yīng) | openclaw message reactions --channel slack --message-id 123 | 列出某條消息的反應(yīng)詳情 |
| openclaw message | pin | --message-id | 置頂消息 | openclaw message pin --channel discord --target chan_xxx --message-id 123 | 把消息置頂 |
| openclaw message | unpin | --message-id | 取消置頂 | openclaw message unpin --channel discord --target chan_xxx --message-id 123 | 取消置頂 |
| openclaw message | pins | --limit | 查看置頂列表 | openclaw message pins --channel discord --target chan_xxx | 列出當(dāng)前頻道置頂 |
| openclaw message | search | --query --channel-id --author-id | 搜索消息 | openclaw message search --channel discord --query "error" | 按關(guān)鍵字檢索消息 |
| openclaw message | permissions | --target --channel | 查看權(quán)限 | openclaw message permissions --channel discord --target channel:123 | 查看機(jī)器人在該目標(biāo)上的權(quán)限 |
| openclaw message | thread create | --thread-name --message | 新建線程 | openclaw message thread create --channel discord --target chan_xxx --thread-name "討論" | 創(chuàng)建討論線程 |
| openclaw message | thread list | --channel-id --limit | 列線程 | openclaw message thread list --channel discord --channel-id 123 | 查看頻道線程 |
| openclaw message | thread reply | --message --reply-to | 在線程中回復(fù) | openclaw message thread reply --channel discord --target thread_xxx --message "收到" | 往線程里發(fā)送消息 |
| openclaw message | emoji list | --guild-id | 列表情 | openclaw message emoji list --channel discord --guild-id 123 | 查看服務(wù)器表情 |
| openclaw message | emoji upload | --emoji-name --media | 上傳表情 | openclaw message emoji upload --channel discord --guild-id 123 --emoji-name ok --media ./ok.png | 上傳自定義表情 |
| openclaw message | sticker send | --sticker-id | 發(fā)貼紙 | openclaw message sticker send --channel discord --target chan_xxx --sticker-id 123 | 發(fā)送貼紙 |
| openclaw message | sticker upload | --sticker-name --media | 上傳貼紙 | openclaw message sticker upload --channel discord --guild-id 123 --sticker-name wow --media ./wow.png | 上傳貼紙資源 |
| openclaw message | channel info | --target | 頻道信息 | openclaw message channel info --channel discord --target chan_xxx | 查看頻道詳情 |
| openclaw message | channel list | --guild-id | 列頻道 | openclaw message channel list --channel discord --guild-id 123 | 列出服務(wù)器頻道 |
| openclaw message | member info | --user-id --guild-id | 成員信息 | openclaw message member info --channel discord --guild-id 123 --user-id 456 | 查看成員信息 |
| openclaw message | voice status | --guild-id --user-id | 語音狀態(tài) | openclaw message voice status --channel discord --guild-id 123 --user-id 456 | 查看某成員語音狀態(tài) |
| openclaw message | event list | --guild-id | 列活動 | openclaw message event list --channel discord --guild-id 123 | 查看計劃活動 |
| openclaw message | event create | --event-name --start-time | 建活動 | openclaw message event create --channel discord --guild-id 123 --event-name "周會" --start-time 2026-03-12T10:00:00 | 創(chuàng)建活動事件 |
| openclaw message | timeout | --guild-id --user-id --duration-min | 禁言成員 | openclaw message timeout --channel discord --guild-id 123 --user-id 456 --duration-min 10 | 對成員進(jìn)行超時禁言 |
| openclaw message | kick | --guild-id --user-id | 移出成員 | openclaw message kick --channel discord --guild-id 123 --user-id 456 | 踢出成員 |
| openclaw message | ban | --guild-id --user-id | 封禁成員 | openclaw message ban --channel discord --guild-id 123 --user-id 456 | 封禁成員 |
5. Agent / Agents / Sessions
| 命令 | 子命令 | 常用參數(shù) | 中文備注 | 例子 | 詳細(xì)用途 |
|---|---|---|---|---|---|
| openclaw agent | - | --message/-m --to/-t --agent --channel --deliver --local --thinking --json | 手動跑一輪 agent | openclaw agent -m "hello" --agent main --channel feishu --deliver | 不依賴外部入站消息,直接觸發(fā)一個 agent turn |
| openclaw agents | list | --json --bindings | 列出 agent | openclaw agents list --bindings --json | 查看有哪些 agent,以及它們的路由綁定 |
| openclaw agents | add | --workspace --model --agent-dir --bind | 新增 agent | openclaw agents add helper --workspace ~/helper-ws --model openai/gpt-4.1 | 新增隔離 agent,可指定獨立 workspace |
| openclaw agents | set-identity | --agent --name --theme --emoji --avatar | 設(shè)置 agent 身份 | openclaw agents set-identity --agent main --name "Lobster" --emoji "??" | 更新 agent 的名稱、形象、主題 |
| openclaw agents | delete | --force --json | 刪除 agent | openclaw agents delete helper --force | 刪除某個 agent 及其狀態(tài) |
| openclaw sessions | - | --json --store --active | 查看會話 | openclaw sessions --json --active 60 | 查看最近活躍 session,研究路由和會話落盤很有用 |
6. Memory / Models / System
| 命令 | 子命令 | 常用參數(shù) | 中文備注 | 例子 | 詳細(xì)用途 |
|---|---|---|---|---|---|
| openclaw memory | status | --agent --json --deep | 查看記憶索引狀態(tài) | openclaw memory status --agent main --json | 看 memory 是否已建立索引 |
| openclaw memory | index | --agent --force | 重建記憶索引 | openclaw memory index --agent main --force | 強(qiáng)制重建記憶庫索引 |
| openclaw memory | search | --agent --max-results --min-score --json | 搜索記憶 | openclaw memory search "飛書配置" --agent main --json | 在記憶文件中檢索相關(guān)內(nèi)容 |
| openclaw models | list | --all --local --provider --json | 列模型 | openclaw models list --provider openai --json | 查看當(dāng)前模型目錄 |
| openclaw models | status | --json --probe --agent | 查看模型狀態(tài) | openclaw models status --probe --json | 檢查 provider 認(rèn)證、默認(rèn)模型、可用性 |
| openclaw models | set | - | 設(shè)置默認(rèn)模型 | openclaw models set openai/gpt-4.1 | 把默認(rèn)對話模型切換成指定模型 |
| openclaw models | set-image | - | 設(shè)置圖片模型 | openclaw models set-image openai/gpt-image-1 | 配置默認(rèn)圖像模型 |
| openclaw models | aliases list | --json | 查看別名 | openclaw models aliases list --json | 查看模型別名表 |
| openclaw models | fallbacks list | --json | 查看回退模型 | openclaw models fallbacks list --json | 查看主模型失敗時的回退鏈 |
| openclaw models | scan | --provider --set-default --json | 掃描候選模型 | openclaw models scan --provider openrouter --set-default --json | 自動發(fā)現(xiàn)可用模型并設(shè)置默認(rèn)值 |
| openclaw models | auth add | - | 增加認(rèn)證 | openclaw models auth add | 交互式添加 provider 認(rèn)證 |
| openclaw models | auth login | --provider --method | 登錄 provider | openclaw models auth login --provider google-gemini-cli | 跑 provider 自帶登錄流程 |
| openclaw models | auth setup-token | --provider | 初始化 token | openclaw models auth setup-token --provider anthropic | 用 CLI 協(xié)助建立 token |
| openclaw models | auth paste-token | --provider --profile-id | 粘貼 token | openclaw models auth paste-token --provider openai | 手動把 token 寫入認(rèn)證配置 |
| openclaw system | event | --text --mode --json | 注入系統(tǒng)事件 | openclaw system event --text "重新加載人格" --mode now | 向主 session 注入一條系統(tǒng)事件 |
| openclaw system | heartbeat last | --json | 查看最后心跳 | openclaw system heartbeat last --json | 查看最近一次心跳事件 |
| openclaw system | heartbeat enable | --json | 開啟心跳 | openclaw system heartbeat enable | 打開系統(tǒng)心跳機(jī)制 |
| openclaw system | heartbeat disable | --json | 關(guān)閉心跳 | openclaw system heartbeat disable | 關(guān)閉系統(tǒng)心跳 |
| openclaw system | presence | --json | 查看 presence | openclaw system presence --json | 查看系統(tǒng) presence 條目 |
7. Cron / Hooks / Plugins / Skills
| 命令 | 子命令 | 常用參數(shù) | 中文備注 | 例子 | 詳細(xì)用途 |
|---|---|---|---|---|---|
| openclaw cron | status | --json | 查看調(diào)度器狀態(tài) | openclaw cron status --json | 查看 cron 子系統(tǒng)是否運行 |
| openclaw cron | list | --all --json | 列任務(wù) | openclaw cron list --all --json | 查看當(dāng)前定時任務(wù) |
| openclaw cron | add | --name --message --every --cron --agent --announce | 添加任務(wù) | openclaw cron add --name morning --every 1d --message "早報" --agent main | 周期性觸發(fā) agent 或系統(tǒng)事件 |
| openclaw cron | rm | --json | 刪除任務(wù) | openclaw cron rm <job-id> | 刪除定時任務(wù) |
| openclaw cron | enable | - | 啟用任務(wù) | openclaw cron enable <job-id> | 啟用某個已禁用任務(wù) |
| openclaw cron | disable | - | 禁用任務(wù) | openclaw cron disable <job-id> | 暫停某個任務(wù) |
| openclaw cron | runs | --id --limit | 查看運行歷史 | openclaw cron runs --id <job-id> --limit 20 | 查看任務(wù)執(zhí)行記錄 |
| openclaw cron | run | --due | 立即執(zhí)行 | openclaw cron run --id <job-id> | 手動調(diào)試執(zhí)行某任務(wù) |
| openclaw cron | edit | --name --message --every --enable | 編輯任務(wù) | openclaw cron edit <job-id> --every 2h --enable | 修改任務(wù)計劃、消息、目標(biāo) |
| openclaw hooks | list | --eligible --json --verbose | 列 hooks | openclaw hooks list --verbose | 查看可用和已安裝 hooks |
| openclaw hooks | info | --json | hook 詳情 | openclaw hooks info my-hook --json | 查看某個 hook 詳細(xì)信息 |
| openclaw hooks | check | --json | 檢查 hook | openclaw hooks check --json | 看是否滿足依賴和啟用條件 |
| openclaw hooks | enable | - | 啟用 hook | openclaw hooks enable my-hook | 讓 hook 進(jìn)入運行狀態(tài) |
| openclaw hooks | disable | - | 禁用 hook | openclaw hooks disable my-hook | 停止 hook 生效 |
| openclaw hooks | install | --link | 安裝 hook | openclaw hooks install ./my-hook-pack --link | 安裝本地 hook 包 |
| openclaw hooks | update | --all --dry-run | 更新 hooks | openclaw hooks update --all | 更新已安裝 hooks |
| openclaw plugins | list | --json --enabled --verbose | 列插件 | openclaw plugins list --enabled | 查看插件目錄及啟用情況 |
| openclaw plugins | info | --json | 插件詳情 | openclaw plugins info feishu --json | 查看某插件元信息 |
| openclaw plugins | enable | - | 啟用插件 | openclaw plugins enable feishu | 在配置中啟用插件 |
| openclaw plugins | disable | - | 禁用插件 | openclaw plugins disable feishu | 在配置中禁用插件 |
| openclaw plugins | install | --link | 安裝插件 | openclaw plugins install ./plugin-dir --link | 安裝本地或 npm 插件 |
| openclaw plugins | uninstall | --force --dry-run | 卸載插件 | openclaw plugins uninstall feishu --force | 卸載某插件 |
| openclaw plugins | update | --all --dry-run | 更新插件 | openclaw plugins update --all | 更新已安裝插件 |
| openclaw plugins | doctor | - | 檢查插件問題 | openclaw plugins doctor | 診斷插件加載異常 |
| openclaw skills | list | --json --eligible --verbose | 列技能 | openclaw skills list --eligible | 查看可用 skills |
| openclaw skills | info | --json | 技能詳情 | openclaw skills info browser --json | 查看某個 skill 的元信息 |
| openclaw skills | check | --json | 檢查技能 | openclaw skills check --json | 看哪些 skills 缺依賴、哪些可直接用 |
8. Browser / Nodes / Devices / Node / Sandbox / TUI
這一組命令非常多,我給你列最常用、最有代表性的。
| 命令 | 子命令 | 常用參數(shù) | 中文備注 | 例子 | 詳細(xì)用途 |
|---|---|---|---|---|---|
| openclaw browser | status | --json | 瀏覽器狀態(tài) | openclaw browser status --json | 查看 OpenClaw 專用瀏覽器是否運行 |
| openclaw browser | start | - | 啟動瀏覽器 | openclaw browser start | 啟動專用瀏覽器環(huán)境 |
| openclaw browser | stop | - | 停止瀏覽器 | openclaw browser stop | 停掉瀏覽器進(jìn)程 |
| openclaw browser | tabs | - | 列出標(biāo)簽頁 | openclaw browser tabs | 查看當(dāng)前所有打開頁面 |
| openclaw browser | open | - | 打開網(wǎng)址 | openclaw browser open https://example.com | 新開一個標(biāo)簽頁 |
| openclaw browser | navigate | --target-id | 跳轉(zhuǎn)頁面 | openclaw browser navigate https://openai.com | 當(dāng)前標(biāo)簽頁跳轉(zhuǎn) |
| openclaw browser | screenshot | --full-page --type | 截圖 | openclaw browser screenshot --full-page | 獲取當(dāng)前頁面截圖 |
| openclaw browser | snapshot | --format --limit | 頁面結(jié)構(gòu)快照 | openclaw browser snapshot --format ai | 讀取頁面結(jié)構(gòu),適合自動化 |
| openclaw browser | click | --target-id | 點擊元素 | openclaw browser click REF_12 | 根據(jù)快照 ref 點擊頁面元素 |
| openclaw browser | type | --submit --slowly | 輸入文字 | openclaw browser type REF_8 "hello" --submit | 給輸入框填內(nèi)容 |
| openclaw browser | --target-id | 導(dǎo)出 PDF | openclaw browser pdf | 保存頁面為 PDF | |
| openclaw browser | console | --level | 控制臺日志 | openclaw browser console --level error | 查看頁面 JS 錯誤 |
| openclaw nodes | status | --json | 節(jié)點狀態(tài) | openclaw nodes status --json | 查看已知節(jié)點連接情況 |
| openclaw nodes | pending | --json | 待審批節(jié)點 | openclaw nodes pending --json | 查看待配對節(jié)點 |
| openclaw nodes | approve | --json | 批準(zhǔn)節(jié)點 | openclaw nodes approve <node-id> | 批準(zhǔn)一個新節(jié)點接入 |
| openclaw nodes | run | --node --raw --agent | 在節(jié)點上執(zhí)行命令 | openclaw nodes run --node mac-mini --raw "ls -la" | 在遠(yuǎn)端節(jié)點執(zhí)行 shell 命令 |
| openclaw nodes | notify | --node --title --body | 本地通知 | openclaw nodes notify --node mac-mini --title "提醒" --body "任務(wù)完成" | 給節(jié)點機(jī)器發(fā)本地通知 |
| openclaw nodes | canvas snapshot | --node | 畫布快照 | openclaw nodes canvas snapshot --node mac-mini | 獲取節(jié)點上的 canvas 快照 |
| openclaw nodes | camera snap | --node | 拍照 | openclaw nodes camera snap --node iphone | 調(diào)用節(jié)點攝像頭拍照 |
| openclaw nodes | screen record | --node --duration | 錄屏 | openclaw nodes screen record --node mac-mini --duration 10s | 遠(yuǎn)程錄屏 |
| openclaw devices | list | --json | 查看設(shè)備 | openclaw devices list --json | 查看待配對和已配對設(shè)備 |
| openclaw devices | approve | --json | 批準(zhǔn)設(shè)備 | openclaw devices approve <device-id> | 允許設(shè)備接入 |
| openclaw devices | reject | --json | 拒絕設(shè)備 | openclaw devices reject <device-id> | 拒絕設(shè)備接入 |
| openclaw devices | rotate | --device --role | 輪換 token | openclaw devices rotate --device ipad --role viewer | 更新設(shè)備 token |
| openclaw devices | revoke | --device --role | 撤銷 token | openclaw devices revoke --device ipad --role viewer | 撤銷設(shè)備訪問權(quán) |
| openclaw node | run | --host --port | 運行 headless node | openclaw node run --host 127.0.0.1 --port 18789 | 啟動 headless node host |
| openclaw node | status | --json | 查看 node 狀態(tài) | openclaw node status --json | 查看本機(jī) node host 狀態(tài) |
| openclaw sandbox | list | --json --browser | 列沙箱 | openclaw sandbox list --json | 查看 agent/browser 的容器沙箱 |
| openclaw sandbox | recreate | --all --agent --session | 重建沙箱 | openclaw sandbox recreate --all --force | 刪除舊容器并重建 |
| openclaw sandbox | explain | --session --agent --json | 解釋策略 | openclaw sandbox explain --agent main --json | 看當(dāng)前 session/agent 生效的沙箱與工具策略 |
| openclaw tui | - | --url --token --session --deliver --message | 打開終端 UI | openclaw tui --session main --message "hello" | 在終端里連接 Gateway 進(jìn)行對話 |
9. DNS / Docs / Webhooks / Directory / Security / Update
| 命令 | 子命令 | 常用參數(shù) | 中文備注 | 例子 | 詳細(xì)用途 |
|---|---|---|---|---|---|
| openclaw dns | setup | --domain --apply | 配置 DNS 發(fā)現(xiàn) | openclaw dns setup --domain openclaw.internal --apply | 配置 CoreDNS / 寬域服務(wù)發(fā)現(xiàn) |
| openclaw docs | - | - | 搜索官方文檔 | openclaw docs | 直接查 OpenClaw 在線文檔 |
| openclaw webhooks | gmail setup | --account --project --topic --hook-url | 配置 Gmail webhook | openclaw webhooks gmail setup --account me@gmail.com --project my-gcp-proj | 配置 Gmail Pub/Sub 與 OpenClaw hook |
| openclaw webhooks | gmail run | --account --topic --hook-url | 運行 Gmail watch | openclaw webhooks gmail run --account me@gmail.com --topic projects/x/topics/y | 啟動 Gmail 監(jiān)聽與推送循環(huán) |
| openclaw directory | self | --channel --account --json | 查看當(dāng)前賬號 | openclaw directory self --channel feishu --json | 查詢機(jī)器人/當(dāng)前賬號自身信息 |
| openclaw directory | peers list | --query --limit | 列聯(lián)系人 | openclaw directory peers list --channel feishu --query 張 --limit 10 | 搜索聯(lián)系人/同事 |
| openclaw directory | groups list | --query --limit | 列群組 | openclaw directory groups list --channel feishu --query 產(chǎn)品 | 搜索群組 |
| openclaw directory | groups members | --group-id --limit | 列群成員 | openclaw directory groups members --channel feishu --group-id grp_xxx | 查看群成員 |
| openclaw security | audit | --deep --fix --json | 安全審計 | openclaw security audit --deep --json | 審計配置、權(quán)限和常見安全風(fēng)險 |
| openclaw update | wizard | --timeout | 交互式更新 | openclaw update wizard | 通過向?qū)Ц?OpenClaw |
| openclaw update | status | --json --timeout | 查看更新狀態(tài) | openclaw update status --json | 查看當(dāng)前版本與更新通道 |
10. 你現(xiàn)在最值得先記住的“飛書工作流命令組”
如果你現(xiàn)在的重點是 研究 OpenClaw + 飛書 的運行鏈路,建議優(yōu)先記下面這組:
| 命令 | 子命令 | 例子 | 用途 |
|---|---|---|---|
| openclaw gateway | status | openclaw gateway status | 先確認(rèn) Gateway 是否活著 |
| openclaw logs | - | openclaw logs --follow | 實時看飛書消息有沒有打進(jìn)來 |
| openclaw channels | list | openclaw channels list --json | 確認(rèn)飛書渠道已配置 |
| openclaw channels | status | openclaw channels status --probe --json | 檢查飛書連接狀態(tài) |
| openclaw pairing | list | openclaw pairing list --channel feishu | 看第一次私聊是否進(jìn)了 pairing |
| openclaw pairing | approve | openclaw pairing approve ABC123 --channel feishu --notify | 批準(zhǔn)用戶后才會進(jìn)入正常會話 |
| openclaw sessions | - | openclaw sessions --json | 看有沒有生成 session |
| openclaw agent | - | openclaw agent -m "hello" --agent main --channel feishu --deliver | 手工觸發(fā)一次 agent 運行 |
| openclaw message | send | openclaw message send -m "測試" -t user_xxx --channel feishu | 直接往飛書發(fā)消息,排除 agent 問題 |
| openclaw channels | logs | openclaw channels logs --channel feishu --lines 200 | 看飛書插件日志 |
11. 一份最實用的排障順序
你可以直接按這個順序排查:
openclaw gateway status openclaw channels list --json openclaw channels status --probe --json openclaw pairing list --channel feishu openclaw sessions --json openclaw logs --follow
這 6 條命令基本能把:
- 網(wǎng)關(guān)是否運行
- 飛書是否接通
- 用戶是否卡在 pairing
- 是否落到了 session
- 日志里是否報錯
全部串起來。
到此這篇關(guān)于OpenClaw CLI 命令速查手冊(中文注釋+示例版)的文章就介紹到這了,更多相關(guān)OpenClaw CLI 命令內(nèi)容請搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持腳本之家!
相關(guān)文章

OpenClaw常用操作命令完整速查手冊:從入門到精通的終端 CLI & 聊天指令全解析
作為 OpenClaw 生態(tài)(包括 PicoClaw、ZeroClaw、losterAI、EasyClaw 等系列開源應(yīng)用)的核心用戶,我根據(jù)開源資料和個人使用體驗整理了這份全網(wǎng)最全的命令速查手冊2026-03-09


