2026最新OpenClaw中文汉化版常用命令速查手册本文为 OpenClaw 中文汉化版 v2026.4.1-zh.2 及以上版本专属命令速查手册,核心涵盖终端 CLI 命令与聊天斜杠指令,以 openclaw-cn 为汉化版专属命令前缀,包含基础操作、配置管理、技能插件、模型管理等核心模块,清晰呈现命令说明与示例,助力用户快速上手、高效操作。
第一部分:终端 CLI 操作命令大全
基础全局命令
| | |
|---|
openclaw-cn --version | | openclaw-cn --version |
openclaw-cn --help | | openclaw-cn --help |
openclaw-cn <command> --help | | openclaw-cn gateway --help |
openclaw-cn tui | | openclaw-cn tui |
openclaw-cn dashboard | | openclaw-cn dashboard |
openclaw-cn docs <query> | | openclaw-cn docs "微信接入" |
全局通用标志:
--json--verbose--dev:开发模式,状态隔离到 ~/.openclaw-dev--profile <name>:多实例隔离,状态存储在 ~/.openclaw-<name>
安装与初始化
| | |
|---|
openclaw-cn onboard | | openclaw-cn onboard |
openclaw-cn onboard --install-daemon | | openclaw-cn onboard --install-daemon |
openclaw-cn configure | | openclaw-cn configure |
openclaw-cn update | | openclaw-cn update |
openclaw-cn update --nightly | | openclaw-cn update --nightly |
openclaw-cn uninstall --all --yes | | openclaw-cn uninstall --all --yes |
网关服务管理(核心)
| | |
|---|
openclaw-cn gateway run | | openclaw-cn gateway run |
openclaw-cn gateway start | | openclaw-cn gateway start |
openclaw-cn gateway stop | | openclaw-cn gateway stop |
openclaw-cn gateway restart | | openclaw-cn gateway restart |
openclaw-cn gateway status | | openclaw-cn gateway status |
openclaw-cn gateway install | | openclaw-cn gateway install |
openclaw-cn gateway uninstall | | openclaw-cn gateway uninstall |
openclaw-cn gateway probe | | openclaw-cn gateway probe |
配置管理
| | |
|---|
openclaw-cn config show | | openclaw-cn config show |
openclaw-cn config get <key> | | openclaw-cn config get language |
openclaw-cn config set <key> <value> | | openclaw-cn config set language zh-CN |
openclaw-cn config edit | | openclaw-cn config edit |
openclaw-cn config validate | | openclaw-cn config validate |
openclaw-cn config reset | | openclaw-cn config reset |
模型管理
| | |
|---|
openclaw-cn models list | | openclaw-cn models list |
openclaw-cn models set <model-name> | | openclaw-cn models set claude-4-sonnet-20260301 |
openclaw-cn models add <provider> <api-key> | | openclaw-cn models add openai sk-xxx |
openclaw-cn models remove <model-name> | | openclaw-cn models remove gpt-3.5-turbo |
openclaw-cn models status | | openclaw-cn models status |
openclaw-cn models scan | | openclaw-cn models scan |
openclaw-cn models usage | | openclaw-cn models usage |
技能与插件管理
| | |
|---|
openclaw-cn skills list | | openclaw-cn skills list |
openclaw-cn skills install <skill-name> | | openclaw-cn skills install pdf-processor |
openclaw-cn skills install <local-path> | | openclaw-cn skills install ./my-skill |
openclaw-cn skills update <skill-name> | | openclaw-cn skills update pdf-processor |
openclaw-cn skills update --all | | openclaw-cn skills update --all |
openclaw-cn skills uninstall <skill-name> | | openclaw-cn skills uninstall pdf-processor |
openclaw-cn plugins list | | openclaw-cn plugins list |
openclaw-cn plugins install <plugin-name> | | openclaw-cn plugins install vscode-bridge |
渠道平台管理(微信/钉钉/飞书)
| | |
|---|
openclaw-cn channels list | | openclaw-cn channels list |
openclaw-cn channels add --channel <name> | | openclaw-cn channels add --channel wechat |
openclaw-cn channels remove --channel <name> | | openclaw-cn channels remove --channel telegram |
openclaw-cn channels status | | openclaw-cn channels status |
openclaw-cn channels logs --channel <name> | | openclaw-cn channels logs --channel dingtalk |
openclaw-cn message send --channel <name> --target <id> --message <text> | | openclaw-cn message send --channel wechat --target "张三" --message "你好" |
Agent 与会话管理
| | |
|---|
openclaw-cn agents list | | openclaw-cn agents list |
openclaw-cn agents add <name> --workspace <path> | | openclaw-cn agents add work --workspace ~/projects |
openclaw-cn agents delete <id> --force | | openclaw-cn agents delete 1 --force |
openclaw-cn agent --message <text> | | openclaw-cn agent --message "列出当前目录文件" |
openclaw-cn sessions list | | openclaw-cn sessions list |
openclaw-cn sessions delete <id> | | openclaw-cn sessions delete 1 |
openclaw-cn sessions export <id> --format markdown | | openclaw-cn sessions export 1 --format markdown |
数据与记忆管理
| | |
|---|
openclaw-cn memory status | | openclaw-cn memory status |
openclaw-cn memory index | | openclaw-cn memory index |
openclaw-cn memory search "<query>" | | openclaw-cn memory search "Python" |
openclaw-cn memory clear | | openclaw-cn memory clear |
openclaw-cn directory add <path> | | openclaw-cn directory add ~/Documents |
openclaw-cn directory list | | openclaw-cn directory list |
诊断与维护(遇到问题先执行这些)
| | |
|---|
openclaw-cn doctor | | openclaw-cn doctor |
openclaw-cn doctor --fix | | openclaw-cn doctor --fix |
openclaw-cn status --all | | openclaw-cn status --all |
openclaw-cn status --deep | | openclaw-cn status --deep |
openclaw-cn logs | | openclaw-cn logs |
openclaw-cn logs --follow | | openclaw-cn logs --follow |
openclaw-cn logs --level error | | openclaw-cn logs --level error |
备份与恢复
| | |
|---|
openclaw-cn backup create | | openclaw-cn backup create |
openclaw-cn backup list | | openclaw-cn backup list |
openclaw-cn backup restore <backup-id> | | openclaw-cn backup restore 20260413-120000 |
openclaw-cn backup delete <backup-id> | | openclaw-cn backup delete 20260413-120000 |
高级命令
| | |
|---|
openclaw-cn cron list | | openclaw-cn cron list |
openclaw-cn cron add "0 9 * * *" "发送每日日报" | | openclaw-cn cron add "0 9 * * *" "发送每日日报" |
openclaw-cn security audit | | openclaw-cn security audit |
openclaw-cn sandbox run <command> | | openclaw-cn sandbox run "ls -la" |
openclaw-cn mcp list | | openclaw-cn mcp list |
第二部分:聊天斜杠指令大全
(在 Web 控制台/微信/钉钉/飞书聊天窗口直接输入)
基础控制指令
| | |
|---|
/help | | /help |
/help <command> | | /help model |
/new | | /new |
/reset | | /reset |
/stop | | /stop |
/status | | /status |
/context | | /context |
/whoami | | /whoami |
/export | | /export |
模型与参数调整
| | |
|---|
/model <model-name> | | /model claude-4-opus |
/think <level> | 设置思考深度:off/minimal/low/medium/high/xhigh | /think high |
/temperature <value> | | /temperature 0.7 |
/maxtokens <value> | | /maxtokens 2048 |
/fast on/off | | /fast on |
/compact | 压缩当前会话上下文(用摘要替代历史,节省 Token) | /compact |
工具与技能
| | |
|---|
/tools | | /tools |
/skills | | /skills |
/skill <skill-name> <args> | | /skill pdf-extract test.pdf |
/bash <command> | | /bash ls -la |
/file list | | /file list |
/file read <filename> | | /file read README.md |
/file write <filename> <content> | | /file write test.txt "Hello World" |
系统管理
| | |
|---|
/restart | | /restart |
/config get <key> | | /config get language |
/config set <key> <value> | | /config set default_model gpt-4o |
/usage off/tokens/full | | /usage full |
/verbose on/off | | /verbose on |
/tts on/off | | /tts on |
高级功能
| | |
|---|
/subagent spawn <role> | | /subagent spawn "前端工程师" |
/btw <question> | | /btw "今天是几号?" |
/activation mention/always | | /activation always |
/elevated | | /elevated |
/mcp list | | /mcp list |
第三部分:实用技巧与常见问题
命令别名设置(提高效率)
Linux/macOS
# 添加到 ~/.bashrc 或 ~/.zshrcalias oc='openclaw-cn'alias ocg='openclaw-cn gateway'alias ocs='openclaw-cn status'alias ocd='openclaw-cn doctor --fix'alias ocl='openclaw-cn logs --follow'# 生效source ~/.bashrc
# 添加到 $PROFILESet-Alias oc openclaw-cnSet-Alias ocg openclaw-cn-gatewaySet-Alias ocs openclaw-cn-statusSet-Alias ocd openclaw-cn-doctorSet-Alias ocl openclaw-cn-logs
万能问题排查命令组合
遇到任何问题,先执行这三条命令,能解决 80%的常见错误:
openclaw-cn doctor --fix && \openclaw-cn gateway restart && \openclaw-cn logs --follow
常见问题快速解决
- 服务启动失败:先执行
openclaw-cn doctor --fix,再重启服务 - 汉化不生效:执行
openclaw-cn config set language zh-CN,然后重启服务 - AI 不回复:执行
openclaw-cn models status 检查模型连接状态 - 技能安装失败:配置国内技能镜像:
openclaw-cn config set skillRegistry https://openclaw.cn/skills - 无法访问本地文件:添加目录到白名单:
openclaw-cn directory add ~/Documents
结语
这份速查手册涵盖了 OpenClaw 中文汉化版 99%的常用操作命令,建议收藏并打印出来放在电脑旁,遇到问题随时查阅。记住:遇到问题先执行 openclaw-cn doctor --fix,这是解决大多数问题的最快方法。
如果需要更详细的命令说明,可以执行 openclaw-cn <command> --help 查看官方帮助文档。