最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

OpenClaw命令速查手冊20+(核心命令 + 實戰(zhàn)示例)

  發(fā)布時間:2026-03-09 12:11:34   作者:佚名   我要評論
本文為你整理了 20+ 最常用的 OpenClaw 命令,按功能分類,并提供實戰(zhàn)示例,讓你的日常工作效率提升 5 倍

OpenClaw 是一個強(qiáng)大的 AI 助手框架,但有 40+ 核心命令,記不住怎么辦?

別擔(dān)心!本文為你整理了 20+ 最常用的 OpenClaw 命令,按功能分類,并提供實戰(zhàn)示例,讓你的日常工作效率提升 5 倍!

無論是配置管理、消息發(fā)送、技能部署,還是 Gateway 控制,都能在這里找到快速答案。

一、快速入門

1.1 查看幫助信息

# 查看所有命令
openclaw --help
# 查看版本號
openclaw --version
# 查看特定命令的幫助
openclaw <command> --help
# 示例:查看 config 命令幫助
openclaw config --help

1.2 初始化配置

# 首次安裝后初始化配置
openclaw setup
# 交互式引導(dǎo)配置(推薦新手)
openclaw onboard
#配置 + 安裝系統(tǒng)后臺服務(wù)(開機(jī)自啟)
openclaw onboard --install-daemon
# 打開控制面板
openclaw dashboard

二、配置管理命令

2.1 查看配置

# 查看完整配置
openclaw config get
# 查看特定配置項
openclaw config get models.default
openclaw config get providers.mistral.apiKey
# 查看特定部分配置
openclaw config get --section models
openclaw config get --section providers

示例輸出:

{
  "models": {
    "default": "mistral:mixtral-8x7b"
  },
  "providers": {
    "mistral": {
      "apiKey": "***REDACTED***"
    }
  }
}

2.2 設(shè)置配置

# 設(shè)置默認(rèn)模型
openclaw config set models.default mistral:mixtral-8x7b
# 設(shè)置快速模型
openclaw config set models.fast mistral:mistral-7b
# 配置 Mistral API Key
openclaw config set providers.mistral.apiKey YOUR_API_KEY_HERE
# 啟用緩存
openclaw config set cache.enabled true
openclaw config set cache.maxSize 5000

2.3 刪除配置

# 刪除特定配置項
openclaw config unset models.fast
# 重置某個節(jié)點(diǎn)
openclaw config unset models

2.4 配置向?qū)?/h3>
# 打開完整配置向?qū)?
openclaw configure
# 打開特定部分配置向?qū)?
openclaw configure --section models
openclaw configure --section providers
openclaw configure --section channels

三、Gateway 控制命令

3.1 啟動/停止 Gateway

# 啟動 Gateway(默認(rèn)端口 18789)
openclaw gateway start
# 自定義端口啟動
openclaw gateway start --port 19000
# 強(qiáng)制啟動(殺死占用進(jìn)程)
openclaw gateway start --force
# 停止 Gateway
openclaw gateway stop
# 重啟 Gateway
openclaw gateway restart
# 查看運(yùn)行狀態(tài)
openclaw gateway status

3.2 運(yùn)行時 Gateway

# 前臺運(yùn)行 Gateway(調(diào)試用)
openclaw gateway
# 開發(fā)模式運(yùn)行(隔離狀態(tài))
openclaw --dev gateway
# 查看健康狀態(tài)
openclaw health

3.3 查看日志

# 查看實時日志
openclaw logs
# 查看最近 50 行日志
openclaw logs --lines 50
# 查看錯誤日志
openclaw logs --filter error
# 持續(xù)監(jiān)控日志
openclaw logs --follow

3.4 系統(tǒng)服務(wù)管理

# 使用 systemd 管理(推薦生產(chǎn)環(huán)境)
sudo systemctl start openclaw-gateway
sudo systemctl stop openclaw-gateway
sudo systemctl restart openclaw-gateway
sudo systemctl status openclaw-gateway
# 開機(jī)自啟動
sudo systemctl enable openclaw-gateway

四、消息發(fā)送命令

4.1 發(fā)送消息

# 發(fā)送消息到當(dāng)前會話
openclaw message send --message "Hello"
# 發(fā)送到特定目標(biāo)(Telegram)
openclaw message send \
  --channel telegram \
  --target @mychat \
  --message "Hello from OpenClaw"
# 發(fā)送到特定目標(biāo)(WhatsApp)
openclaw message send \
  --channel whatsapp \
  --target +8613800138000 \
  --message "您好"
# 發(fā)送到 Slack 頻道
openclaw message send \
  --channel slack \
  --target C1234567890 \
  --message "@channel 重要通知"

4.2 發(fā)送媒體文件

# 發(fā)送圖片
openclaw message send \
  --channel telegram \
  --target @mychat \
  --media /tmp/photo.jpg \
  --caption "這是一張圖片"
# 發(fā)送音頻
openclaw message send \
  --channel whatsapp \
  --target +8613800138000 \
  --media /tmp/voice.mp3
# 發(fā)送文檔
openclaw message send \
  --channel telegram \
  --target @mychat \
  --media /tmp/report.pdf

4.3 高級消息功能

# 發(fā)送 JSON 格式(腳本自動化)
openclaw message send \
  --target @mychat \
  --message "Hello" \
  --json
# 回復(fù)消息
openclaw message send \
  --target @mychat \
  --message "收到" \
  --replyTo 12345
# 指定頻道
openclaw message send \
  --channel discord \
  --target channel:1234567890 \
  --message "Hello"

4.4 頻道動作(投票、反應(yīng)等)

# 創(chuàng)建投票(Telegram)
openclaw message send \
  --channel telegram \
  --target @mychat \
  --pollQuestion "OpenClaw 好用嗎?" \
  --pollOption 非常好用 \
  --pollOption 一般 \
  --pollOption 還需要改進(jìn) \
  --pollDurationHours 24
# 發(fā)送反應(yīng)(Discord)
openclaw message send \
  --channel discord \
  --messageId 1234567890 \
  --emoji ?? \
  --action react

五、技能管理命令

5.1 查看技能列表

# 查看所有已安裝技能
openclaw skills list
# 搜索技能
openclaw skills search weather
# 查看技能詳情
openclaw skills show weather

5.2 安裝/卸載技能

# 安裝技能
openclaw skills install weather
# 從指定來源安裝
openclaw skills install weather --source github
# 指定版本安裝
openclaw skills install weather@1.2.0
# 卸載技能
openclaw skills uninstall weather

5.3 更新技能

# 更新所有技能
openclaw skills update
# 更新特定技能
openclaw skills update weather
# 同步技能
openclaw skills sync

5.4 技能開發(fā)

# 創(chuàng)建新技能
openclaw skills create my-skill
# 驗證技能
openclaw skills validate my-skill
# 打包技能
openclaw skills pack my-skill

六、模型配置命令

6.1 查看模型

# 查看所有配置的模型
openclaw models list
# 查看默認(rèn)模型
openclaw models default
# 查看模型詳情
openclaw models show mistral:mixtral-8x7b

6.2 配置模型

# 設(shè)置默認(rèn)模型
openclaw models set-default mistral:mixtral-8x7b
# 添加新模型
openclaw models add \
  --name my-model \
  --provider mistral \
  --id mistral-medium \
  --maxTokens 8192
# 測試模型
openclaw models test \
  --model mistral:mixtral-8x7b \
  --prompt "Hello, OpenClaw!"

6.3 模型切換

# 臨時指定模型
openclaw agent \
  --model mistral:mistral-7b \
  --message "快速響應(yīng)"
# 使用內(nèi)置模型別名
openclaw agent --model fast --message "這個用fast模型"
openclaw agent --model premium --message "這個用premium模型"

七、頻道管理命令

7.1 查看頻道

# 查看所有配置的頻道
openclaw channels list
# 查看頻道狀態(tài)
openclaw channels status
# 查看特定頻道詳情
openclaw channels show telegram

7.2 登錄頻道

# Telegram 登錄
openclaw channels login --channel telegram
# WhatsApp 登錄(會顯示 QR 碼)
openclaw channels login --channel whatsapp --verbose
# Slack 登錄
openclaw channels login --channel slack
# Discord 登錄
openclaw channels login --channel discord

7.3 頻道測試

# 測試頻道連接
openclaw channels test --channel telegram
# 發(fā)送測試消息
openclaw channels test \
  --channel telegram \
  --target @mychat \
  --message "測試消息"

7.4 頻道配置

# 配置頻道
openclaw channels configure --channel telegram
# 更新頻道 Token
openclaw channels update \
  --channel telegram \
  --token NEW_TOKEN
# 啟用/禁用頻道
openclaw channels enable telegram
openclaw channels disable telegram

八、會話管理命令

8.1 查看會話

# 列出所有會話
openclaw sessions
# 列出活躍會話
openclaw sessions --active
# 列出特定頻道的會話
openclaw sessions --channel telegram
# 顯示最近 10 個會話
openclaw sessions --limit 10

8.2 查看會話歷史

# 查看特定會話的歷史
openclaw sessions history <session-key>
# 查看最近的消息
openclaw sessions history <session-key> --limit 20
# 導(dǎo)出會話歷史
openclaw sessions history <session-key> --export > history.json

8.3 會話操作

# 發(fā)送消息到會話
openclaw sessions send \
  --session <session-key> \
  --message "你好"
# 重置會話
openclaw sessions reset <session-key>
# 刪除會話
openclaw sessions delete <session-key>

九、節(jié)點(diǎn)管理命令(智能家居控制)

9.1 查看節(jié)點(diǎn)

# 查看所有配對的節(jié)點(diǎn)
openclaw nodes list
# 查看節(jié)點(diǎn)狀態(tài)
openclaw nodes status
# 描述節(jié)點(diǎn)詳情
openclaw nodes describe <node-id>

9.2 節(jié)點(diǎn)操作

# 發(fā)送通知到節(jié)點(diǎn)
openclaw nodes notify \
  --node my-phone \
  --title "提醒" \
  --body "該吃飯了"
# 設(shè)置推送優(yōu)先級
openclaw nodes notify \
  --node my-phone \
  --priority timeSensitive \
  --title "緊急通知" \
  --body "快遞到了"
# 查看相冊(手機(jī))
openclaw nodes camera-list --node my-phone
# 拍照
openclaw nodes camera-snap \
  --node my-phone \
  --facing back \
  --output /tmp/photo.jpg

9.3 節(jié)點(diǎn)配對

# 啟動配對
openclaw node pairing start
# 查看待配對節(jié)點(diǎn)
openclaw nodes pending
# 批準(zhǔn)配對
openclaw nodes approve --node <node-id>
# 拒絕配對
openclaw nodes reject --node <node-id>

十、記憶管理命令

10.1 搜索記憶

# 搜索記憶
openclaw memory search "OpenClaw 配置"
# 搜索并顯示多行上下文
openclaw memory search "配置" --lines 5
# 搜索特定路徑的記憶
openclaw memory search "配置" --path MEMORY.md
# 限制結(jié)果數(shù)量
openclaw memory search "配置" --maxResults 10

10.2 記憶操作

# 查看記憶統(tǒng)計
openclaw memory stats
# 清理過期記憶
openclaw memory clean
# 備份記憶
openclaw memory backup --output /tmp/memory-backup.json

十一、Cron 定時任務(wù)命令

11.1 查看 Cron 任務(wù)

# 列出所有任務(wù)
openclaw cron list
# 查看任務(wù)運(yùn)行歷史
openclaw cron runs <job-id>
# 查看調(diào)度器狀態(tài)
openclaw cron status

11.2 創(chuàng)建 Cron 任務(wù)

# 創(chuàng)建定時任務(wù)(每天凌晨觸發(fā))
openclaw cron add \
  --name "daily-report" \
  --schedule "0 0 * * *" \
  --text "生成每日報告"
# 創(chuàng)建重復(fù)任務(wù)(每 30 分鐘)
openclaw cron add \
  --name "check-notifications" \
  --schedule "*/30 * * * *" \
  --text "檢查通知"
# 創(chuàng)建單次任務(wù)(特定時間)
openclaw cron add \
  --name "special-task" \
  --schedule "at" \
  --at "2026-03-01T10:00:00" \
  --text "執(zhí)行特殊任務(wù)"

11.3 Cron 任務(wù)操作

# 立即運(yùn)行任務(wù)
openclaw cron run <job-id>
# 更新任務(wù)
openclaw cron update <job-id> --schedule "0 6 * * *"
# 刪除任務(wù)
openclaw cron remove <job-id>
# 發(fā)送喚醒事件
openclaw cron wake --text "檢查新消息"

十二、系統(tǒng)命令

12.1 健康檢查

# 運(yùn)行健康檢查
openclaw doctor
# 快速修復(fù)常見問題
openclaw doctor --fix
# 檢查特定組件
openclaw doctor --check gateway
openclaw doctor --check channels

12.2 系統(tǒng)狀態(tài)

# 查看頻道健康狀態(tài)
openclaw status
# 查看系統(tǒng)事件
openclaw system events
# 查看心跳狀態(tài)
openclaw system heartbeat

12.3 安全檢查

# 運(yùn)行安全檢查
openclaw security audit
# 檢查權(quán)限配置
openclaw security check-permissions
# 檢查 API Key 有效性
openclaw security verify-keys

十三、插件管理命令

13.1 查看插件

# 查看已安裝插件
openclaw plugins list
# 查看插件詳情
openclaw plugins show <plugin-name>
# 檢查插件狀態(tài)
openclaw plugins status

13.2 插件操作

# 啟用插件
openclaw plugins enable feishu
# 禁用插件
openclaw plugins disable feishu
# 重啟插件
openclaw plugins restart feishu
# 更新插件
openclaw plugins update

十四、瀏覽器控制命令

14.1 啟動/停止瀏覽器

# 啟動瀏覽器
openclaw browser start
# 停止瀏覽器
openclaw browser stop
# 切換配置
openclaw browser start --profile chrome
openclaw browser start --profile openclaw

14.2 瀏覽器操作

# 打開網(wǎng)頁
openclaw browser open https://example.com
# 截圖
openclaw browser screenshot --output /tmp/screenshot.png
# 獲取快照
openclaw browser snapshot --target main
# 查看標(biāo)簽頁
openclaw browser tabs

十五、更新與維護(hù)命令

15.1 更新 OpenClaw

# 查看更新
openclaw update --dry-run
# 執(zhí)行更新
openclaw update
# 更新到特定版本
openclaw update --tag 2026.2.22
# 更新到 Beta 版
openclaw update --channel beta

15.2 配置文件管理

# 備份配置
cp ~/.openclaw/config.json ~/.openclaw/config.json.backup
# 重置配置(保留 CLI)
openclaw reset
# 完全卸載(包括數(shù)據(jù))
openclaw uninstall

15.3 Shell 自動補(bǔ)全

# 生成 Bash 補(bǔ)全腳本
openclaw completion bash > ~/.openclaw-completion
# 生成 Zsh 補(bǔ)全腳本
openclaw completion zsh > ~/.zsh-completion
# 應(yīng)用補(bǔ)全(Bash)
echo "source ~/.openclaw-completion" >> ~/.bashrc
source ~/.bashrc

十六、常用組合命令

16.1 快速部署新技能

# 一鍵創(chuàng)建、開發(fā)、測試技能
openclaw skills create my-new-skill \
  && cd ~/.openclaw/workspace/skills/my-new-skill \
  && vim SKILL.md

16.2 批量發(fā)送通知

# 發(fā)送到多個目標(biāo)
openclaw message send --target @user1 --message "通知內(nèi)容"
openclaw message send --target @user2 --message "通知內(nèi)容"
openclaw message send --target @user3 --message "通知內(nèi)容"
# 使用循環(huán)批量發(fā)送(需要腳本配合)
for target in user1 user2 user3; do
  openclaw message send --target @$target --message "通知內(nèi)容"
done

16.3 Gateway 重啟 + 驗證

# 重啟并驗證
openclaw gateway restart \
  && sleep 5 \
  && openclaw gateway status \
  && openclaw health

16.4 配置備份 + 更新

# 安全更新流程
cp ~/.openclaw/config.json ~/.openclaw/config.json.backup \
  && openclaw update --dry-run \
  && openclaw update \
  && openclaw gateway restart

16.5 每日報告生成

# 生成每日報告(Cron 腳本)
0 9 * * * openclaw cron add \
  --name daily-report \
  --schedule "0 9 * * *" \
  --text "生成昨日數(shù)據(jù)分析報告"

十七、故障排除命令

17.1 Gateway 無法啟動

# 檢查端口占用
sudo lsof -i :18789
# 強(qiáng)制重啟
openclaw gateway start --force
# 查看錯誤日志
openclaw logs --filter error
# 運(yùn)行健康檢查
openclaw doctor

17.2 消息發(fā)送失敗

# 檢查頻道狀態(tài)
openclaw channels status
# 測試頻道
openclaw channels test --channel telegram
# 重新登錄頻道
openclaw channels login --channel telegram
# 查看詳細(xì)日志
openclaw message send --target @mychat --message "Test" --verbose

17.3 模型調(diào)用失敗

# 檢查 API Key
openclaw config get providers.openai.apiKey
# 測試模型
openclaw models test --model mistral:mixtral-8x7b --prompt "test"
# 檢查網(wǎng)絡(luò)連接
ping api.openai.com
# 運(yùn)行診斷
openclaw doctor --check models

17.4 技能加載失敗

# 檢查技能列表
openclaw skills list
# 驗證技能
openclaw skills validate my-skill
# 重新安裝技能
openclaw skills uninstall my-skill
openclaw skills install my-skill
# 查看錯誤日志
openclaw logs --filter skill

十八、生產(chǎn)環(huán)境最佳實踐

18.1 使用環(huán)境變量

# 推薦方式:使用環(huán)境變量存儲敏感信息
export OPENAI_API_KEY="sk-xxx"
export MISTRAL_API_KEY="xxx"
export TELEGRAM_BOT_TOKEN="xxx"
# 然后啟動 Gateway
openclaw gateway start

18.2 配置文件權(quán)限

# 限制配置文件權(quán)限
chmod 600 ~/.openclaw/config.json
# 檢查權(quán)限
ls -la ~/.openclaw/config.json

18.3 日志管理

# 配置日志輪轉(zhuǎn)
sudo tee /etc/logrotate.d/openclaw <<EOF
~/.openclaw/logs/*.log {
    daily
    rotate 7
    compress
    missingok
    notifempty
}
EOF

18.4 監(jiān)控與告警

# 檢查 Gateway 狀態(tài)(Cron 腳本)
*/5 * * * * openclaw health || \
  openclaw message send --target @admin --message "Gateway 宕機(jī)!"

十九、快捷別名配置

19.1 創(chuàng)建常用別名

# 添加到 ~/.bashrc 或 ~/.zshrc
alias oc='openclaw'
alias ocg='openclaw gateway'
alias ocgl='openclaw logs --follow'
alias ocs='openclaw sessions'
alias ocm='openclaw message send'
alias occ='openclaw channels'
# 應(yīng)用別名
source ~/.bashrc  # Bash
source ~/.zshrc   # Zsh

19.2 使用別名

# 啟動 Gateway
ocg start
# 查看實時日志
ocgl
# 發(fā)送消息
ocm --target @mychat --message "Hello"
# 查看會話
ocs

二十、命令速查表

總結(jié)

OpenClaw 提供了豐富的命令行工具,掌握這些命令可以大幅提升工作效率。

相關(guān)文章

  • OpenClaw 命令速查手冊(表格版)

    還在為記不住 OpenClaw 命令煩惱?這份CLI 命令 + 聊天斜杠命令 + 關(guān)鍵路徑 + 急救流程一站式手冊,幫你快速上手、高效排錯,輕松駕馭全功能
    2026-03-09
  • OpenClaw遠(yuǎn)程瀏覽器從入門到踩坑完整使用指南

    OpenClaw是一款強(qiáng)大的AI助手框架,支持瀏覽器自動化,這篇文章主要介紹了OpenClaw遠(yuǎn)程瀏覽器從入門到踩坑完整使用的相關(guān)資料,并分享了在使用過程中遇到的問題和解決方案,需要
    2026-03-09
  • OpenClaw 安裝與配置實戰(zhàn)指南(含常用命令 + 故障排查)

    OpenClaw安裝與配置實戰(zhàn),涵蓋了從安裝到故障排查的詳細(xì)流程,重點(diǎn)包括通道配置、模型接入和網(wǎng)關(guān)排障,提供了常用命令速查和故障排查步驟,幫助用戶順利上手和解決常見問題,本
    2026-03-06
  • OpenClaw 本地安裝與配置十分鐘完成(附常用命令速查)

    OpenClaw 是一個開源的個人 AI 助手,支持系統(tǒng)操作、文件讀寫、代碼執(zhí)行等,它可以通過配置文件進(jìn)行各種設(shè)置,這篇文章給大家介紹OpenClaw 快速入門:10 分鐘完成本地安裝與配
    2026-03-06
  • OpenClaw最強(qiáng)插件庫:5400+Skills,22.7K Star,一條命令全搞定強(qiáng)的離譜

    最近一段時間,一個叫OpenClaw(前身是 Clawdbot / Moltbot)的本地 AI Agent 項目突然爆火,技術(shù)圈幾乎人人都在討論,下面給大家分享OpenClaw最強(qiáng)插件庫,5400+Skills,22.
    2026-03-05
  • openclaw常用指令的使用小結(jié)

    OpenClaw 是一款功能強(qiáng)大的開源 AI 助手框架,支持對接多種大模型和通訊平臺,下面就來介紹一下openclaw常用指令,需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧
    2026-03-04
  • OpenClaw安裝排錯方法筆記(含基本使用命令)

    OpenClaw(原Clawdbot/Moltbot)是一款開源的本地優(yōu)先AI代理與自動化平臺,支持多渠道通信集成、大模型調(diào)用及自動化任務(wù)執(zhí)行,可滿足個人與小型團(tuán)隊的智能輔助需求,這篇文章主
    2026-03-02
  • OpenClaw千帆模型切換:精準(zhǔn)配置步驟與關(guān)鍵命令詳解

    本文圍繞OpenClaw千帆模型切換展開,系統(tǒng)梳理從環(huán)境準(zhǔn)備到配置落地的全流程,精準(zhǔn)拆解關(guān)鍵配置步驟與核心命令,涵蓋模型選擇、授權(quán)登錄、配置生效等環(huán)節(jié),為開發(fā)者提供實操
    2026-03-02
  • OpenClaw 常用命令小結(jié)

    OpenClaw 的命令行工具非常強(qiáng)大,覆蓋了從安裝配置到日常使用的方方面面,為了讓你能快速上手,我將最常用的命令整理為以下分類速查表,你可以將它看作一份隨時查閱的急救手
    2026-03-01
  • OpenClaw常用操作命令完整速查手冊:從入門到精通的終端 CLI & 聊天指令全解析

    作為 OpenClaw 生態(tài)(包括 PicoClaw、ZeroClaw、losterAI、EasyClaw 等系列開源應(yīng)用)的核心用戶,我根據(jù)開源資料和個人使用體驗整理了這份全網(wǎng)最全的命令速查手冊
    2026-03-09

最新評論

海南省| 云林县| 高邑县| 潞西市| 咸宁市| 琼结县| 安西县| 天气| 怀安县| 满城县| 时尚| 囊谦县| 陇南市| 历史| 常德市| 百色市| 淮滨县| 和田县| 罗平县| 老河口市| 平乐县| 信丰县| 寿宁县| 邯郸市| 郓城县| 张家界市| 娄烦县| 灵武市| 永城市| 临潭县| 镶黄旗| 永顺县| 资中县| 临颍县| 秭归县| 建平县| 夏津县| 襄城县| 岳阳市| 兴国县| 潢川县|