openclaw安装与配置


openclaw安装与配置

安装

1
curl -fsSL https://openclaw.ai/install.sh | bash

常用命令

1
2
3
4
5
6
7
8
修复:openclaw doctor --fix
关闭:openclaw gateway stop
开启:openclaw gateway run
重启:openclaw gateway restart
删除:openclaw uninstall
彻底删除:openclaw uninstall --all --yes --non-interactive
卸载 CLI 工具:npm rm -g openclaw
删除数据:rm -rf "${OPENCLAW_STATE_DIR:-$HOME/.openclaw}"

clawhub

1
2
搜索skills:clawhub search agent-browser
安装skills:clawhub install agent-browser-clawdbot

feishu

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
创建飞书应用记录App ID和App Secret
点击机器人->如何开始使用->修改名称

npm install -g zod
openclaw plugins install @openclaw/feishu
安装成功显示
Installed plugin: feishu
Restart the gateway to load plugins.

添加channels
openclaw channels add
飞书显示Feishu: needs app credentials
然后根据步骤填写飞书应用的App ID和App Secret
选择Feishu domain->China
选择Feishu DM policy->Pairing

完成后进入飞书后台配置回调
事件与回调->订阅方式->长链接

设置飞书权限
权限管理->批量导入/导出权限按钮->复制json内容
{
"scopes": {
"tenant": [
"aily:file:read",
"aily:file:write",
"application:application.app_message_stats.overview:readonly",
"application:application:self_manage",
"application:bot.menu:write",
"contact:user.employee_id:readonly",
"corehr:file:download",
"event:ip_list",
"im:chat.access_event.bot_p2p_chat:read",
"im:chat.members:bot_access",
"im:message",
"im:message.group_at_msg:readonly",
"im:message.p2p_msg:readonly",
"im:message:readonly",
"im:message:send_as_bot",
"im:resource"
],
"user": ["aily:file:read", "aily:file:write", "im:chat.access_event.bot_p2p_chat:read"]
}
}

重启openclaw
openclaw gateway restart

在飞书中找到刚刚创建的机器人,随便输入对话
返回
OpenClaw access not configured.

Your Feishu Open ID: ou_5028xxxxxxxxxxxx
Pairing code: xxxxxxx
Ask the OpenClaw admin to approve with:
openclaw pairing approve feishu xxxxxxx

执行
openclaw pairing approve feishu xxxxxxx 完成飞书配置

chrome扩展

1
2
3
4
5
6
7
8
9
10
chrome扩展位置 cd ~/.openclaw/browser-extensions/chrome
设置使用扩展的浏览器文件位置 openclaw config set browser.executablePath "/Applications/Google Chrome Canary.app/Contents/MacOS/Google Chrome Canary"
检查状态 openclaw browser --browser-profile chrome tab

chrome浏览器->扩展程序->管理扩展程序->加载未打包的扩展程序 选中chrome扩展的文件目录
将扩展固定并点击扩展,显示OpenClaw Browser Relay已开始调试此浏览器
调用openclaw browser --browser-profile chrome tab能看到以下相似内容
1. OpenClaw Browser Relay
chrome-extension://gnbkdmcgapnonhjpecckclkbpihlfhma/options.html
id: C120EA37B91A9DDBCC5166B621639881

添加agent

1
openclaw agents add