本文记录从 0 开始在 Windows 上安装 OpenClaw 并配置飞书的完整流程,以及踩过的坑。
1. 前置条件
- Windows 10
- 管理员权限
- 稳定的网络连接,有条件可以访问github
- 使用千问等大模型,出现报错实时分析
本人IT行业从业者,从0开始安装,到配置好最高权限,用了5小时。
2. 安装 Git
下载安装
bash
# 官网下载地址
https://git-scm.com/download/win
- 下载 64-bit Git for Windows Setup
- 一路 Next(默认配置即可)
- 验证安装:
bash
git --version
# 输出类似:git version 2.43.0.windows.1
3. 安装 Node.js
下载安装
bash
# 官网下载 LTS 版本
https://nodejs.org/
- 下载 Windows Installer (.msi)
- 安装时勾选 "Automatically install the necessary tools"
- 验证安装:
bash
node --version
npm --version
笔者直接下载ZIP文件,本地解压,环境变量Path配置中增加D:\software\node-v24.14.0-win-x64,以上是ZIP压缩文件解压的位置,大家可自行替换
4. 安装 OpenClaw
克隆仓库
bash
# 选择安装目录,例如 D 盘
cd D:\
git clone https://github.com/openclaw/openclaw.git
cd openclaw
clone的时候,可能会报400或者403错误,结合具体的报错,配置正确的git配置即可。
安装依赖
bash
npm install
在安装过程中,需要选择外接具体哪个大模型,笔者尝试过deepseek或者kimi,发现kimi配置更为简单,首冲会送15元。
登录开放平台开通token权限,填写appId与key即可,生成的key只能看一次,记得及时复制到文本文档中。
https://platform.moonshot.cn/console/account
编译构建
bash
npm run build
验证安装
bash
# 查看帮助
openclaw --help
# 查看状态
openclaw status
⚠️ 常见问题
问题:openclaw 命令找不到
- 解决:添加环境变量
此前的openclaw仅安装到依赖node.js运行环境中,使用 npm 进行全局安装
java
npm install -g .
注意不要遗漏最后面的.,把这个当前目录下的程序注册为系统级的全局命令。
最简安装后openclaw只拥有聊天的功能,默认配置通常为 messaging,这限制了 AI 只能聊天,无法执行系统命令或操作文件。
如何让openclaw拥有读写文件的权限,可以在最简安装后修改核心配置:解锁工具执行权限。OpenClaw 通过 tools.profile 参数来控制 AI 能调用哪些工具。
问题原因:
解决方法:你需要将配置修改为 full 或包含具体高权限工具的集合。
java
# 将工具权限配置文件设置为完全模式(full),允许执行命令、读写文件等
openclaw config set tools.profile full
messaging: 仅聊天(默认,低权限)
full: 完整权限(可执行 Shell 命令、文件操作、网络请求等)
执行
java
openclaw skills check
检查支持的技能
java
$ openclaw skills check
Config warnings:\n- plugins.entries.feishu: plugin feishu: duplicate plugin id detected; later plugin may be overridden (C:\Users\admin\.openclaw\extensions\feishu\index.ts
)
Config warnings:\n- plugins.entries.feishu: plugin feishu: duplicate plugin id detected; later plugin may be overridden (C:\Users\admin\.openclaw\extensions\feishu\index.ts
)
🦞 OpenClaw 2026.3.7 (0bac6e4) --- I speak fluent bash, mild sarcasm, and aggressive tab-completion energy.
|
o Config warnings -------------------------------------------------------------------------+
| |
| - plugins.entries.feishu: plugin feishu: duplicate plugin id detected; later plugin may |
| be overridden (C:\Users\admin\.openclaw\extensions\feishu\index.ts) |
| |
+-------------------------------------------------------------------------------------------+
Skills Status Check
Total: 55
✓ Eligible: 7
⏸ Disabled: 0
🚫 Blocked by allowlist: 0
✗ Missing requirements: 48
Ready to use:
📦 feishu-doc
📦 feishu-drive
📦 feishu-perm
📦 feishu-wiki
📦 healthcheck
📦 skill-creator
🌤️ weather
Missing requirements:
🔐 1password (bins: op)
📝 apple-notes (bins: memo; os: darwin)
⏰ apple-reminders (bins: remindctl; os: darwin)
🐻 bear-notes (bins: grizzly; os: darwin)
📰 blogwatcher (bins: blogwatcher)
🫐 blucli (bins: blu)
🫧 bluebubbles (config: channels.bluebubbles)
📸 camsnap (bins: camsnap)
📦 clawhub (bins: clawhub)
🧩 coding-agent (anyBins: claude, codex, opencode, pi)
🎮 discord (config: channels.discord.token)
🎛️ eightctl (bins: eightctl)
♊️ gemini (bins: gemini)
📦 gh-issues (bins: gh)
🧲 gifgrep (bins: gifgrep)
🐙 github (bins: gh)
🎮 gog (bins: gog)
📍 goplaces (bins: goplaces; env: GOOGLE_PLACES_API_KEY)
📧 himalaya (bins: himalaya)
📨 imsg (bins: imsg; os: darwin)
📦 mcporter (bins: mcporter)
📊 model-usage (bins: codexbar; os: darwin)
🍌 nano-banana-pro (bins: uv; env: GEMINI_API_KEY)
📄 nano-pdf (bins: nano-pdf)
📝 notion (env: NOTION_API_KEY)
💎 obsidian (bins: obsidian-cli)
🖼️ openai-image-gen (bins: python3; env: OPENAI_API_KEY)
🎙️ openai-whisper (bins: whisper)
☁️ openai-whisper-api (env: OPENAI_API_KEY)
💡 openhue (bins: openhue)
🧿 oracle (bins: oracle)
🛵 ordercli (bins: ordercli)
👀 peekaboo (bins: peekaboo; os: darwin)
🗣️ sag (bins: sag; env: ELEVENLABS_API_KEY)
📜 session-logs (bins: jq, rg)
🗣️ sherpa-onnx-tts (env: SHERPA_ONNX_RUNTIME_DIR, SHERPA_ONNX_MODEL_DIR)
💬 slack (config: channels.slack)
🌊 songsee (bins: songsee)
🔊 sonoscli (bins: sonos)
🎵 spotify-player (anyBins: spogo, spotify_player)
🧾 summarize (bins: summarize)
✅ things-mac (bins: things; os: darwin)
🧵 tmux (bins: tmux; os: darwin, linux)
📋 trello (bins: jq; env: TRELLO_API_KEY, TRELLO_TOKEN)
🎞️ video-frames (bins: ffmpeg)
📞 voice-call (config: plugins.entries.voice-call.enabled)
📱 wacli (bins: wacli)
𝕏 xurl (bins: xurl)
Tip: use `npx clawhub` to search, install, and sync skills.
java
openclaw skills list
检查支持的技能
java
$ openclaw skills list
Config warnings:\n- plugins.entries.feishu: plugin feishu: duplicate plugin id detected; later plugin may be overridden (C:\Users\admin\.openclaw\extensions\feishu\index.ts
)
Config warnings:\n- plugins.entries.feishu: plugin feishu: duplicate plugin id detected; later plugin may be overridden (C:\Users\admin\.openclaw\extensions\feishu\index.ts
)
🦞 OpenClaw 2026.3.7 (0bac6e4) --- I read logs so you can keep pretending you don't have to.
|
o Config warnings -------------------------------------------------------------------------+
| |
| - plugins.entries.feishu: plugin feishu: duplicate plugin id detected; later plugin may |
| be overridden (C:\Users\admin\.openclaw\extensions\feishu\index.ts) |
| |
+-------------------------------------------------------------------------------------------+
Skills (7/55 ready)
┌───────────┬──────────────────┬───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┬──────────────────┐
│ Status │ Skill │ Description │ Source │
├───────────┼──────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼──────────────────┤
│ ✓ ready │ 📦 feishu-doc │ Feishu document read/write operations. Activate when user mentions Feishu docs, cloud docs, or docx links. │ openclaw-extra │
│ ✓ ready │ 📦 feishu-drive │ Feishu cloud storage file management. Activate when user mentions cloud space, folders, drive. │ openclaw-extra │
│ ✓ ready │ 📦 feishu-perm │ Feishu permission management for documents and files. Activate when user mentions sharing, permissions, │ openclaw-extra │
│ │ │ collaborators. │ │
│ ✓ ready │ 📦 feishu-wiki │ Feishu knowledge base navigation. Activate when user mentions knowledge base, wiki, or wiki links. │ openclaw-extra │
5. 配置飞书 (Feishu)
5.1 创建飞书应用
- 访问 飞书开放平台
- 登录后点击「创建应用」
- 选择「企业自建应用」
- 填写应用名称(如 "OpenClaw助手")
- 记录 App ID 和 App Secret
5.2 配置权限
进入应用后台 → 权限管理,开启以下权限:
| 权限 | 说明 |
|---|---|
im:chat:readonly |
读取群组信息 |
im:message:send |
发送消息 |
im:message:receive |
接收消息 |
im:chat |
群组管理 |
笔者将云文档的所有权限均配置,以上配置只能收发消息。
5.3 配置事件订阅
- 进入「事件订阅」
- 订阅方式,使用
长连接接收事件,并添加事件 - 开启「接收消息」事件
- 配置请求地址(需要公网可访问,或内网穿透)
- 验证 URL 有效性
5.4 配置 OpenClaw
编辑 OpenClaw 配置文件:
yaml
# ~/.openclaw/config.yaml
channels:
feishu:
enabled: true
app_id: "cli_xxxxx" # 你的 App ID
app_secret: "xxxxx" # 你的 App Secret
encrypt_key: "" # 可选:消息加密密钥
verification_token: "" # 可选:验证 Token
5.5 启动 Gateway
bash
# 启动飞书网关
openclaw gateway start
# 查看状态
openclaw gateway status
6. 测试验证
发送测试消息
飞书发消息指令
查看日志
bash
# 实时查看日志
tail -f ~/.openclaw/logs/openclaw.log
7. 总结
| 步骤 | 关键命令 |
|---|---|
| 安装 Git | git --version |
| 安装 Node | node --version |
| 克隆仓库 | git clone https://github.com/openclaw/openclaw.git |
| 安装依赖 | npm install |
| 编译构建 | npm run build |
| 启动网关 | openclaw gateway start |