Skip to main content

快速入门

完整的入门指南请参见 入门指南

快速安装

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

基本命令

1

运行入门向导

openclaw onboard --install-daemon
2

启动网关

openclaw gateway --port 18789
3

打开控制界面

openclaw dashboard
4

发送消息

openclaw message send --target +1234567890 --message "你好"

常用命令

网关管理

# 检查网关状态
openclaw gateway status

# 停止网关
openclaw gateway stop

# 重启网关
openclaw gateway restart

渠道管理

# 查看渠道状态
openclaw channels status

# 启用渠道
openclaw channels enable telegram

# 禁用渠道
openclaw channels disable telegram

配置管理

# 查看配置
openclaw config get

# 设置配置
openclaw config set gateway.port 18790

# 编辑配置
openclaw config edit

代理交互

# 与代理对话
openclaw agent --message "帮我写一个 Python 脚本"

# 使用思考模式
openclaw agent --message "分析这个问题" --thinking high

环境变量

# 设置主目录
export OPENCLAW_HOME=~/.openclaw

# 设置配置路径
export OPENCLAW_CONFIG_PATH=~/.openclaw/config.yml

# 设置状态目录
export OPENCLAW_STATE_DIR=~/.openclaw/state

故障排查

检查端口是否被占用:
lsof -i :18789
或使用不同端口:
openclaw gateway --port 18790
运行诊断工具:
openclaw doctor
检查渠道状态:
openclaw channels status --probe

下一步

完整指南

详细的设置说明

向导

CLI 向导参考

配置

配置选项