OpenClaw学习

  目录

OpenClaw学习记录

电脑环境

  • windows 11
  • node.js v22.17.1
  • Git 2.43.0.windows.1

安装

使用npm安装

全局安装openclaw

1
npm install -g openclaw@latest

使用openclaw命令安装

管理员权限打开PowerShell
查看帮助

1
openclaw --help

开始安装

1
openclaw onboard --install-daemon

执行这条命令后,开始初始化各种配置:

1
2
3
4
5
*  I understand this is personal-by-default and shared/multi-user use requires lock-down. Continue?
| > Yes / No

// 操作
选择YES

1
2
3
4
5
6
*  Onboarding mode
| > QuickStart (Configure details later via openclaw configure.)
| Manual

// 操作
选择QuickStart
1
2
3
4
5
6
7
8
// 此步骤第一次安装可能没有
* Config handling
| Use existing values
| Update values
| > Reset

// 操作
选择Reset
1
2
3
4
5
6
7
8
// 此步骤第一次安装可能没有
* Reset scope
| Config only
| Config + creds + sessions
| > Full reset (config + creds + sessions + workspace)

// 操作
选择Full reset
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
*  Model/auth provider
| OpenAI
| Anthropic
| Chutes
| vLLM
| MiniMax
| Moonshot AI (Kimi K2.5)
| Google
| xAI (Grok)
| Mistral AI
| Volcano Engine
| BytePlus
| OpenRouter
| Kilo Gateway
| > Qwen (OAuth)
| Z.AI
| Qianfan
| Copilot
| Vercel AI Gateway
| OpenCode Zen
| Xiaomi
| Synthetic
| Together AI
| Hugging Face
| Venice AI
| LiteLLM
| Cloudflare AI Gateway
| Custom Provider
| Skip for now

// 操作
选择Qwen (OAuth)

选择之后会在浏览器弹出确认您要登录qwen-code的页面(没有账号的话先注册),因为是OAuth授权,所以不需要API Key.

1
2
3
4
5
6
7
8
*  Default model
| > Keep current (qwen-portal/coder-model)
| Enter model manually
| qwen-portal/coder-model
| qwen-portal/vision-model

// 操作
选择Keep current (qwen-portal/coder-model)

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
*  Select channel (QuickStart)
| Telegram (Bot API)
| WhatsApp (QR link)
| Discord (Bot API)
| IRC (Server + Nick)
| Google Chat (Chat API)
| Slack (Socket Mode)
| Signal (signal-cli)
| iMessage (imsg)
| Feishu/Lark (飞书)
| Nostr (NIP-04 DMs)
| Microsoft Teams (Bot Framework)
| Mattermost (plugin)
| Nextcloud Talk (self-hosted)
| Matrix (plugin)
| BlueBubbles (macOS app)
| LINE (Messaging API)
| Zalo (Bot API)
| Zalo (Personal Account)
| Synology Chat (Webhook)
| Tlon (Urbit)
| > Skip for now (You can add channels later via `openclaw channels add`)

// 操作
选择Skip for now(可以之后再配置)
1
2
3
4
5
*  Configure skills now? (recommended)
| Yes / > No

// 操作
选择No(可以之后再配置)
1
2
3
4
5
6
7
8
9
*  Enable hooks?
| [+] Skip for now
| [ ] 🚀 boot-md
| [ ] 📎 bootstrap-extra-files
| [ ] 📝 command-logger
| [ ] 💾 session-memory

// 操作
选择Skip for now(可以之后再配置)

以上步骤操作之后,会自动执行openclaw gateway --port 18789 --verbose这个命令,自动打开浏览器OpenClaw的操作页面。
如果没有自动执行的话可以自己手动执行下。

启用免费的千问模型插件

如果在OPENCLAW Gateway Dashboard这个页面发现没有链接上千问大模型,需要安装插件。
OpenClaw中免费层的千问接入方式不是直接填API Key,而是启用QwenOAuth插件。执行下面这条命令:

1
openclaw plugins enable qwen-portal-auth

是启用Qwen Portal的认证能力。插件启用后,需要重启Gateway网关,命令如下:

1
openclaw gateway restart

按照上边的步骤操作后,就可以在本地使用OpenClaw了。

卸载

卸载OpenClaw,执行下面这条命令:

1
openclaw uninstall --all --yes --non-interactive

全局卸载openclaw命令

1
npm uninstall -g openclaw

Skills

参考

OpenClaw 安装与免费千问模型配置教程