字数 348,阅读大约需 2 分钟
OpenClaw学习笔记
什么是OpenClaw
其实就是最近大火的clawdbot,已经经历过3次改名了(clawdbot -> moltbot -> OpenClaw)。是的,如果你是采用某些云上提供的clawdbot现成镜像,已经落后至少两个大版本了。
OpenClaw一些命令
安装
# macOS/Linuxcurl -fsSL https://openclaw.ai/install.sh | bash# Windowsiwr -useb https://openclaw.ai/install.ps1 | iex
卸载
openclaw uninstallnpm uninstall -g openclaw
运行
# 一般运行openclaw dashboard# 使用ollama本地模型运行ollama launch clawdbot
重启
openclaw gateway restart
使用DeepSeek模型
# 配置模型openclaw config set 'models.providers.deepseek' --json '{ "baseUrl": "https://api.deepseek.com/v1", "apiKey": "[APIKEY]", "api": "openai-completions", "models": [ { "id": "deepseek-chat", "name": "DeepSeek Chat" }, { "id": "deepseek-reasoner", "name": "DeepSeek Reasoner" } ]}'# 设置默认模型openclaw models set deepseek/deepseek-chat
远程访问
# 隧道访问ssh -N -L 18789:127.0.0.1:18789 lishewen@IP# 配置原生IP远程访问(127.0.0.1 -> 0.0.0.0)openclaw config set gateway.bind "lan"# 配置允许HTTP访问openclaw config set gateway.controlUi.allowInsecureAuth true
OpenClaw使用
skill 安装
- • 通过
ClawHub搜索安装(https://www.clawhub.ai/)
npx clawhub@latest install [skillname]
企业微信机器人
安装插件
git clone https://github.com/Jams-hub/openclaw-wecom-channel.gitnpm installopenclaw plugins install --link wecomopenclaw plugins enable wecomopenclaw gateway restart
创建企业微信机器人