基础命令
OpenClaw 的核心命令参考,掌握这些命令即可高效使用。
命令概览
| 命令 | 说明 | 示例 |
|---|---|---|
openclaw |
启动交互模式 | openclaw |
status |
查看状态 | openclaw status |
init |
初始化配置 | openclaw init |
read |
读取文件 | openclaw read file.txt |
write |
写入文件 | openclaw write file.txt --content "text" |
web-search |
网络搜索 | openclaw web-search "query" |
常用命令详解
status - 查看状态
$ openclaw status
✓ OpenClaw 运行正常
版本: 1.0.0
数据目录: /Users/username/.openclaw
默认模型: Kimi
已安装技能: 15
交互模式
$ openclaw
🦞 OpenClaw 已启动
> 你好
你好!有什么可以帮助你的?
> 总结一下这段内容
...
按 Ctrl+C 退出交互模式
文件操作
# 读取文件
openclaw read file.txt
# 读取前50行
openclaw read file.txt --limit 50
# 写入文件
openclaw write file.txt --content "Hello World"
# 编辑文件(替换文本)
openclaw edit file.txt --old "旧文本" --new "新文本"
配置管理
# 查看配置
openclaw config get
# 设置配置项
openclaw config set models.default claude
# 编辑配置文件
openclaw config edit