========================================

其實吧,沒必要傳得那麼神乎其神,本質上 Node.js 框架打通了與各個聊天頻道(channel)的閘道層以及大模型呼叫.......

         ┌───────────────┐
         │  聊天工具層   │
         │ Feishu / WA   │
         │ Slack / CLI   │
         └──────┬────────┘
                │
           網關 Gateway
                │
    ┌───────────┴───────────┐
    │       OpenClaw Core    │
    │     Node.js Runtime    │
    │                        │
    │  ┌──────────────────┐  │
    │  │   工作台層        │  │
    │  │ logs / session   │  │
    │  │ 模型呼叫         │  │
    │  │ 上下文管理       │  │
    │  └─────────┬────────┘  │
    │            │           │
    │   ┌────────┴────────┐  │
    │   │   Skills        │  │
    │   │   Agent 能力    │  │
    │   └────────┬────────┘  │
    │            │           │
    │   ┌────────┴────────┐  │
    │   │   Plugins       │  │
    │   │  飛書 / 文件     │  │
    │   │  資料庫 / API   │  │
    │   └─────────────────┘  │
    └────────────────────────┘
                │
           LLM Providers
     OpenAI / Qwen / GLM / 等

但是吧,也確實很厲害,開源建設勢不可擋,這個確實是未來的趨勢,本篇記錄常用的 openclaw 命令列。

image.png

按讚 + 收藏 == 學會~

1、啟動

安裝

安裝下載:開 TUN 模式

npm install -g openclaw@latest

啟動 Web UI

openclaw onboard --install-daemon

安裝可選 skills(全覽)

  • model-usage(必裝) — 監控 token 使用量與模型呼叫,查看 AI 消耗與統計
  • summarize(必裝) — 最基礎的 AI 工具之一,自動摘要文本
  • peekaboo(必裝) — Agent 讀取檔案內容,必要時查看本地檔案
  • nano-pdf(建議) — 處理 PDF 文件,PDF 解析
  • openai-whisper(建議) — 語音轉文字(語音辨識)
  • video-frames(可選) — 視頻處理,抽取影格
  • gemini(可選) — 接入 Gemini 模型(使用 Google AI)
  • nano-banana-pro(可選) — Banana AI 服務(AI 推理)
  • obsidian(按需) — 若使用 Obsidian 作為知識庫
  • bear-notes(按需) — 若使用 Bear 讀取筆記
  • apple-reminders(按需) — macOS 提醒事項管理、待辦
  • things-mac(按需) — Things 待辦軟體管理任務
  • imsg(按需) — iMessage 自動發送
  • wacli(按需) — WhatsApp CLI 聊天自動化
  • openhue(按需) — 智慧燈控制(IoT)
  • sonoscli(按需) — Sonos 音響控制
  • blucli(按需) — 藍牙裝置(IoT)
  • goplaces(可選) — 地理位置查詢、地圖服務
  • gifgrep(可選) — GIF 搜尋
  • blogwatcher(可選) — RSS 監控、資訊訂閱
  • gog(可選) — 遊戲平台介面
  • himalaya(可選) — 音訊平台
  • mcporter(可選) — Minecraft 工具
  • ordercli(可選) — 訂單查詢(電商)
  • oracle(按需) — Oracle 資料庫
  • 1password(按需) — 密碼管理(Secrets)
  • eightctl(按需) — 智能床墊(IoT)
  • clawhub(建議) — 管理與安裝 skills(插件管理)
  • camsnap(可選) — 攝影機截圖(多模態)
  • sag(可選) — 語音生成 TTS
  • songsee(可選) — 音樂辨識
  • xurl(可選) — X / Twitter 連結解析

查看/寫入設定(核心檔案)

nano ~/.openclaw/openclaw.json

重啟網關

openclaw gateway restart

重啟網關服務,會自動執行 openclaw doctor --fix

每次服務重啟,Dashboard 務必先關掉之前的,再透過「openclaw dashboard」重新開啟。

設定主模型(同一模型供應商)

舉例(GLM):

設定 alias 註冊:

openclaw config set 'agents.defaults.models["zai/glm-4.6v-flash"].alias' GLM46V

提示:openclaw config set 的路徑使用 . 當分隔符,所以它會把 zai/glm-4.6v-flash 裡的 . 當成層級分隔,解析成:key = zai/glm-4 再往下 key = 6v-flash(於是出現 Unrecognized key: "6v-flash")。用中括號把完整 key 包起來最省事。

重啟 gateway 讓它重新載入設定:

openclaw gateway restart
openclaw models status
openclaw status

把 primary 指向它:

openclaw config set 'agents.defaults.model.primary' 'zai/glm-4.6v-flash'

2、飛書

飛書開發平台:https://open.feishu.cn/app

驗證碼(第一次使用)

openclaw pairing approve feishu X****3

3、賦能

安裝插件

舉例:使用 AICodewith 服務(國內中轉,支援 GPT、Claude、Gemini),需要安裝此插件

openclaw plugins install openclaw-aicodewith-auth

啟用插件

openclaw plugins enable openclaw-aicodewith-auth

啟用檔案系統

設定工具 Profile(建議):使用內建的 coding profile,它會自動啟用檔案系統、執行時、會話等核心工具

Profile 說明:

  • minimal:僅 session_status
  • coding:包含 group:fs(read/write/edit/apply_patch)、group:runtime(exec/process)、group:sessions 等
  • messaging:僅訊息相關工具
  • full:無限制,所有工具可用
openclaw config set tools.profile coding
openclaw gateway restart

安裝 clawhub skills

clawhub 傳送門:https://clawhub.ai/

# 安裝 Skills
npx clawhub@latest install sonoscli

常用 Skills:

  • weather — 天氣查詢
  • bird — Twitter 操作
  • coding-agent — 程式碼助理
  • mcporter — MCP 伺服器整合

查詢

查詢狀態

openclaw status

查詢網關

openclaw gateway status

查詢模型

openclaw models status

查詢插件列表

openclaw plugins list

4、移除

移除

npm uninstall -g openclaw

移除確認:

which openclaw

清理:

rm -rf ~/.openclaw

清插件快取

rm -rf ~/.npm-global/lib/node_modules/openclaw

查殺 18789 埠

lsof -i :18789

kill -9 PID

---

原文出處:https://juejin.cn/post/7613555403787911206

精選技術文章翻譯,幫助開發者持續吸收新知。

共有 0 則留言


精選技術文章翻譯,幫助開發者持續吸收新知。
🏆 本月排行榜
🥇
站長阿川
📝12   💬10   ❤️2
362
🥈
我愛JS
📝2   💬9   ❤️2
93
🥉
💬1  
4
評分標準:發文×10 + 留言×3 + 獲讚×5 + 點讚×1 + 瀏覽數÷10
本數據每小時更新一次
📢 贊助商廣告 · 我要刊登