📋 环境要求
- Node.js >= 18.0.0(推荐 20.x LTS)
- npm >= 9.0.0 或 bun >= 1.0.0
- 操作系统: macOS, Windows 10+, Linux
- 内存: 最低 512MB,推荐 1GB+
安装步骤
# 1. 全局安装 OpenClaw
npm install -g openclaw
# 或使用 bun(更快)
bun install -g openclaw
# 2. 初始化配置
openclaw init
# 3. 启动服务
openclaw start
💡 提示
首次运行 openclaw init 会引导你完成基础配置,包括模型选择和通道设置。
⚙️ 配置文件
OpenClaw 使用 ~/.openclaw/config.yaml 作为主配置文件:
# AI 模型配置
model:
provider: "openai"
model: "gpt-4o"
apiKey: "your-api-key"
# 通道配置
channels:
telegram:
enabled: true
token: "your-bot-token"
qqbot:
enabled: true
host: "localhost"
port: 3000
# 记忆系统
memory:
enabled: true
type: "file"
# 技能配置
skills:
dir: "~/.openclaw/skills"
🔧 常用命令
| 命令 | 说明 |
|---|---|
openclaw start | 启动 OpenClaw 服务 |
openclaw stop | 停止服务 |
openclaw status | 查看运行状态 |
openclaw config | 打开配置文件 |
openclaw skills list | 列出已安装技能 |
openclaw skills install <name> | 安装技能 |
openclaw gateway start | 启动 Gateway 服务 |
openclaw nodes list | 查看配对节点 |