Docs: add zh-CN translations

This commit is contained in:
Josh Palmer
2026-02-01 22:47:44 +01:00
parent e70984745b
commit 149dc7c4e7
298 changed files with 53861 additions and 0 deletions

173
docs/zh-CN/cli/acp.md Normal file
View File

@@ -0,0 +1,173 @@
---
read_when:
- 设置基于 ACP 的 IDE 集成
- 调试 ACP 会话到 Gateway 的路由
summary: 运行用于 IDE 集成的 ACP 桥接
title: acp
x-i18n:
generated_at: "2026-02-01T19:58:33Z"
model: claude-opus-4-5
provider: pi
source_hash: 0c09844297da250bc1a558423e7e534d6b6be9045de12d797c07ecd64a0c63ed
source_path: cli/acp.md
workflow: 14
---
# acp
运行与 OpenClaw Gateway 通信的 ACPAgent Client Protocol桥接。
此命令通过 stdio 使用 ACP 协议与 IDE 通信,并通过 WebSocket 将提示转发到 Gateway。它将 ACP 会话映射到 Gateway 会话密钥。
## 用法
```bash
openclaw acp
# 远程 Gateway
openclaw acp --url wss://gateway-host:18789 --token <token>
# 附加到现有会话密钥
openclaw acp --session agent:main:main
# 通过标签附加(必须已存在)
openclaw acp --session-label "support inbox"
# 在第一个提示之前重置会话密钥
openclaw acp --session agent:main:main --reset-session
```
## ACP 客户端(调试)
使用内置 ACP 客户端在无需 IDE 的情况下对桥接进行安装完整性检查。
它会启动 ACP 桥接并允许你交互式地输入提示。
```bash
openclaw acp client
# 将启动的桥接指向远程 Gateway
openclaw acp client --server-args --url wss://gateway-host:18789 --token <token>
# 覆盖服务器命令默认openclaw
openclaw acp client --server "node" --server-args openclaw.mjs acp --url ws://127.0.0.1:19001
```
## 如何使用
当 IDE或其他客户端使用 Agent Client Protocol 并且你希望它驱动 OpenClaw Gateway 会话时,请使用 ACP。
1. 确保 Gateway 正在运行(本地或远程)。
2. 配置 Gateway 目标(通过配置文件或标志)。
3. 将你的 IDE 配置为通过 stdio 运行 `openclaw acp`
示例配置(持久化):
```bash
openclaw config set gateway.remote.url wss://gateway-host:18789
openclaw config set gateway.remote.token <token>
```
示例直接运行(不写入配置):
```bash
openclaw acp --url wss://gateway-host:18789 --token <token>
```
## 选择智能体
ACP 不直接选择智能体。它通过 Gateway 会话密钥进行路由。
使用智能体作用域的会话密钥来指定特定智能体:
```bash
openclaw acp --session agent:main:main
openclaw acp --session agent:design:main
openclaw acp --session agent:qa:bug-123
```
每个 ACP 会话映射到单个 Gateway 会话密钥。一个智能体可以有多个会话;除非你覆盖密钥或标签,否则 ACP 默认使用隔离的 `acp:<uuid>` 会话。
## Zed 编辑器设置
`~/.config/zed/settings.json` 中添加自定义 ACP 智能体(或使用 Zed 的设置界面):
```json
{
"agent_servers": {
"OpenClaw ACP": {
"type": "custom",
"command": "openclaw",
"args": ["acp"],
"env": {}
}
}
}
```
要指定特定的 Gateway 或智能体:
```json
{
"agent_servers": {
"OpenClaw ACP": {
"type": "custom",
"command": "openclaw",
"args": [
"acp",
"--url",
"wss://gateway-host:18789",
"--token",
"<token>",
"--session",
"agent:design:main"
],
"env": {}
}
}
}
```
在 Zed 中,打开 Agent 面板并选择 "OpenClaw ACP" 来开始一个对话线程。
## 会话映射
默认情况下ACP 会话会获得一个带有 `acp:` 前缀的隔离 Gateway 会话密钥。
要复用已知会话,请传递会话密钥或标签:
- `--session <key>`:使用特定的 Gateway 会话密钥。
- `--session-label <label>`:通过标签解析现有会话。
- `--reset-session`:为该密钥生成新的会话 ID相同密钥新的对话记录
如果你的 ACP 客户端支持元数据,你可以按会话进行覆盖:
```json
{
"_meta": {
"sessionKey": "agent:main:main",
"sessionLabel": "support inbox",
"resetSession": true
}
}
```
了解更多关于会话密钥的信息,请参阅 [/concepts/session](/concepts/session)。
## 选项
- `--url <url>`Gateway WebSocket URL配置后默认使用 gateway.remote.url
- `--token <token>`Gateway 认证令牌。
- `--password <password>`Gateway 认证密码。
- `--session <key>`:默认会话密钥。
- `--session-label <label>`:要解析的默认会话标签。
- `--require-existing`:如果会话密钥/标签不存在则失败。
- `--reset-session`:在首次使用前重置会话密钥。
- `--no-prefix-cwd`:不在提示前添加工作目录前缀。
- `--verbose, -v`:将详细日志输出到 stderr。
### `acp client` 选项
- `--cwd <dir>`ACP 会话的工作目录。
- `--server <command>`ACP 服务器命令(默认:`openclaw`)。
- `--server-args <args...>`:传递给 ACP 服务器的额外参数。
- `--server-verbose`:启用 ACP 服务器的详细日志。
- `--verbose, -v`:详细客户端日志。

31
docs/zh-CN/cli/agent.md Normal file
View File

@@ -0,0 +1,31 @@
---
read_when:
- 您想从脚本中运行一次智能体轮次(可选择投递回复)
summary: "`openclaw agent` 的 CLI 参考(通过 Gateway 发送一次智能体轮次)"
title: agent
x-i18n:
generated_at: "2026-02-01T19:58:31Z"
model: claude-opus-4-5
provider: pi
source_hash: dcf12fb94e207c68645f58235792596d65afecf8216b8f9ab3acb01e03b50a33
source_path: cli/agent.md
workflow: 14
---
# `openclaw agent`
通过 Gateway 运行一次智能体轮次(使用 `--local` 进行嵌入式运行)。
使用 `--agent <id>` 直接指定一个已配置的智能体。
相关内容:
- 智能体发送工具:[智能体发送](/tools/agent-send)
## 示例
```bash
openclaw agent --to +15555550123 --message "status update" --deliver
openclaw agent --agent ops --message "Summarize logs"
openclaw agent --session-id 1234 --message "Summarize inbox" --thinking medium
openclaw agent --agent ops --message "Generate report" --deliver --reply-channel slack --reply-to "#reports"
```

82
docs/zh-CN/cli/agents.md Normal file
View File

@@ -0,0 +1,82 @@
---
read_when:
- 您需要多个隔离的智能体(工作区 + 路由 + 认证)
summary: "`openclaw agents` 的 CLI 参考(列出/添加/删除/设置身份)"
title: agents
x-i18n:
generated_at: "2026-02-01T19:58:38Z"
model: claude-opus-4-5
provider: pi
source_hash: 30556d81636a9ad8972573cc6b498e620fd266e1dfb16eef3f61096ea62f9896
source_path: cli/agents.md
workflow: 14
---
# `openclaw agents`
管理隔离的智能体(工作区 + 认证 + 路由)。
相关内容:
- 多智能体路由:[多智能体路由](/concepts/multi-agent)
- 智能体工作区:[智能体工作区](/concepts/agent-workspace)
## 示例
```bash
openclaw agents list
openclaw agents add work --workspace ~/.openclaw/workspace-work
openclaw agents set-identity --workspace ~/.openclaw/workspace --from-identity
openclaw agents set-identity --agent main --avatar avatars/openclaw.png
openclaw agents delete work
```
## 身份文件
每个智能体工作区可以在工作区根目录包含一个 `IDENTITY.md`
- 示例路径:`~/.openclaw/workspace/IDENTITY.md`
- `set-identity --from-identity` 从工作区根目录读取(或从显式指定的 `--identity-file` 读取)
头像路径相对于工作区根目录解析。
## 设置身份
`set-identity` 将字段写入 `agents.list[].identity`
- `name`
- `theme`
- `emoji`
- `avatar`工作区相对路径、http(s) URL 或 data URI
`IDENTITY.md` 加载:
```bash
openclaw agents set-identity --workspace ~/.openclaw/workspace --from-identity
```
显式覆盖字段:
```bash
openclaw agents set-identity --agent main --name "OpenClaw" --emoji "🦞" --avatar avatars/openclaw.png
```
配置示例:
```json5
{
agents: {
list: [
{
id: "main",
identity: {
name: "OpenClaw",
theme: "space lobster",
emoji: "🦞",
avatar: "avatars/openclaw.png",
},
},
],
},
}
```

View File

@@ -0,0 +1,57 @@
---
read_when:
- 您想通过 CLI 编辑执行审批
- 您需要管理 Gateway 或节点主机上的允许列表
summary: "`openclaw approvals` 的 CLI 参考(用于 Gateway 或节点主机的执行审批)"
title: approvals
x-i18n:
generated_at: "2026-02-01T19:58:39Z"
model: claude-opus-4-5
provider: pi
source_hash: 4329cdaaec2c5f5d619415b6431196512d4834dc1ccd7363576f03dd9b845130
source_path: cli/approvals.md
workflow: 14
---
# `openclaw approvals`
管理**本地主机**、**Gateway 主机**或**节点主机**的执行审批。
默认情况下,命令针对磁盘上的本地审批文件。使用 `--gateway` 针对 Gateway或使用 `--node` 针对特定节点。
相关内容:
- 执行审批:[执行审批](/tools/exec-approvals)
- 节点:[节点](/nodes)
## 常用命令
```bash
openclaw approvals get
openclaw approvals get --node <id|name|ip>
openclaw approvals get --gateway
```
## 从文件替换审批
```bash
openclaw approvals set --file ./exec-approvals.json
openclaw approvals set --node <id|name|ip> --file ./exec-approvals.json
openclaw approvals set --gateway --file ./exec-approvals.json
```
## 允许列表辅助命令
```bash
openclaw approvals allowlist add "~/Projects/**/bin/rg"
openclaw approvals allowlist add --agent main --node <id|name|ip> "/usr/bin/uptime"
openclaw approvals allowlist add --agent "*" "/usr/bin/uname"
openclaw approvals allowlist remove "~/Projects/**/bin/rg"
```
## 注意事项
- `--node` 使用与 `openclaw nodes` 相同的解析器id、名称、ip 或 id 前缀)。
- `--agent` 默认为 `"*"`,即适用于所有智能体。
- 节点主机必须公布 `system.execApprovals.get/set`macOS 应用或无头节点主机)。
- 审批文件按主机存储在 `~/.openclaw/exec-approvals.json`

114
docs/zh-CN/cli/browser.md Normal file
View File

@@ -0,0 +1,114 @@
---
read_when:
- 使用 `openclaw browser` 并需要常见任务的示例
- 想要通过节点主机控制运行在另一台机器上的浏览器
- 想要使用 Chrome 扩展中继(通过工具栏按钮附加/分离)
summary: "`openclaw browser` 的 CLI 参考(配置文件、标签页、操作、扩展中继)"
title: browser
x-i18n:
generated_at: "2026-02-01T19:58:45Z"
model: claude-opus-4-5
provider: pi
source_hash: af35adfd68726fd519c704d046451effd330458c2b8305e713137fb07b2571fd
source_path: cli/browser.md
workflow: 14
---
# `openclaw browser`
管理 OpenClaw 的浏览器控制服务器并执行浏览器操作(标签页、快照、截图、导航、点击、输入)。
相关内容:
- 浏览器工具 + API[浏览器工具](/tools/browser)
- Chrome 扩展中继:[Chrome 扩展](/tools/chrome-extension)
## 常用标志
- `--url <gatewayWsUrl>`Gateway WebSocket URL默认使用配置值
- `--token <token>`Gateway 令牌(如需要)。
- `--timeout <ms>`:请求超时时间(毫秒)。
- `--browser-profile <name>`:选择浏览器配置文件(默认使用配置值)。
- `--json`:机器可读输出(在支持的情况下)。
## 快速开始(本地)
```bash
openclaw browser --browser-profile chrome tabs
openclaw browser --browser-profile openclaw start
openclaw browser --browser-profile openclaw open https://example.com
openclaw browser --browser-profile openclaw snapshot
```
## 配置文件
配置文件是命名的浏览器路由配置。实际使用中:
- `openclaw`:启动/附加到一个专用的 OpenClaw 管理的 Chrome 实例(隔离的用户数据目录)。
- `chrome`:通过 Chrome 扩展中继控制你现有的 Chrome 标签页。
```bash
openclaw browser profiles
openclaw browser create-profile --name work --color "#FF5A36"
openclaw browser delete-profile --name work
```
使用特定配置文件:
```bash
openclaw browser --browser-profile work tabs
```
## 标签页
```bash
openclaw browser tabs
openclaw browser open https://docs.openclaw.ai
openclaw browser focus <targetId>
openclaw browser close <targetId>
```
## 快照 / 截图 / 操作
快照:
```bash
openclaw browser snapshot
```
截图:
```bash
openclaw browser screenshot
```
导航/点击/输入(基于引用的 UI 自动化):
```bash
openclaw browser navigate https://example.com
openclaw browser click <ref>
openclaw browser type <ref> "hello"
```
## Chrome 扩展中继(通过工具栏按钮附加)
此模式允许智能体控制你手动附加的现有 Chrome 标签页(不会自动附加)。
将未打包的扩展安装到稳定路径:
```bash
openclaw browser extension install
openclaw browser extension path
```
然后在 Chrome 中 → `chrome://extensions` → 启用"开发者模式" → "加载已解压的扩展程序" → 选择打印出的文件夹。
完整指南:[Chrome 扩展](/tools/chrome-extension)
## 远程浏览器控制(节点主机代理)
如果 Gateway 与浏览器运行在不同的机器上,请在安装了 Chrome/Brave/Edge/Chromium 的机器上运行**节点主机**。Gateway 会将浏览器操作代理到该节点(无需单独的浏览器控制服务器)。
使用 `gateway.nodes.browser.mode` 控制自动路由,使用 `gateway.nodes.browser.node` 在多个节点连接时固定到特定节点。
安全性 + 远程设置:[浏览器工具](/tools/browser)、[远程访问](/gateway/remote)、[Tailscale](/gateway/tailscale)、[安全](/gateway/security)

View File

@@ -0,0 +1,86 @@
---
read_when:
- 你想添加/移除渠道账号WhatsApp/Telegram/Discord/Google Chat/Slack/Mattermost插件/Signal/iMessage
- 你想检查渠道状态或查看渠道日志
summary: "`openclaw channels` 的 CLI 参考(账号、状态、登录/登出、日志)"
title: channels
x-i18n:
generated_at: "2026-02-01T19:58:48Z"
model: claude-opus-4-5
provider: pi
source_hash: 16ab1642f247bfa96e8e08dfeb1eedfccb148f40d91099f5423f971df2b54e20
source_path: cli/channels.md
workflow: 14
---
# `openclaw channels`
管理 Gateway 上的聊天渠道账号及其运行时状态。
相关文档:
- 渠道指南:[渠道](/channels/index)
- Gateway 配置:[配置](/gateway/configuration)
## 常用命令
```bash
openclaw channels list
openclaw channels status
openclaw channels capabilities
openclaw channels capabilities --channel discord --target channel:123
openclaw channels resolve --channel slack "#general" "@jane"
openclaw channels logs --channel all
```
## 添加/移除账号
```bash
openclaw channels add --channel telegram --token <bot-token>
openclaw channels remove --channel telegram --delete
```
提示:`openclaw channels add --help` 可查看各渠道的专用参数token、app token、signal-cli 路径等)。
## 登录/登出(交互式)
```bash
openclaw channels login --channel whatsapp
openclaw channels logout --channel whatsapp
```
## 故障排除
- 运行 `openclaw status --deep` 进行全面探测。
- 使用 `openclaw doctor` 获取引导式修复。
- `openclaw channels list` 输出 `Claude: HTTP 403 ... user:profile` → 用量快照需要 `user:profile` 权限范围。使用 `--no-usage`,或提供 claude.ai 会话密钥(`CLAUDE_WEB_SESSION_KEY` / `CLAUDE_WEB_COOKIE`),或通过 Claude Code CLI 重新认证。
## 能力探测
获取提供商能力提示(可用的 intents/scopes以及静态功能支持
```bash
openclaw channels capabilities
openclaw channels capabilities --channel discord --target channel:123
```
说明:
- `--channel` 是可选的;省略时将列出所有渠道(包括扩展)。
- `--target` 接受 `channel:<id>` 或原始数字频道 ID仅适用于 Discord。
- 探测因提供商而异Discord intents + 可选的频道权限Slack bot + 用户权限范围Telegram bot 标志 + webhookSignal 守护进程版本MS Teams 应用令牌 + Graph 角色/权限范围(已知的会标注)。无探测功能的渠道会报告 `Probe: unavailable`
## 将名称解析为 ID
使用提供商目录将渠道/用户名称解析为 ID
```bash
openclaw channels resolve --channel slack "#general" "@jane"
openclaw channels resolve --channel discord "My Server/#support" "@someone"
openclaw channels resolve --channel matrix "Project Room"
```
说明:
- 使用 `--kind user|group|auto` 强制指定目标类型。
- 当多个条目共享相同名称时,解析优先选择活跃的匹配项。

56
docs/zh-CN/cli/config.md Normal file
View File

@@ -0,0 +1,56 @@
---
read_when:
- 您想以非交互方式读取或编辑配置
summary: "`openclaw config` 的 CLI 参考(获取/设置/删除配置值)"
title: config
x-i18n:
generated_at: "2026-02-01T19:58:45Z"
model: claude-opus-4-5
provider: pi
source_hash: d60a35f5330f22bc99a0df090590586109d329ddd2ca294aeed191a22560c1c2
source_path: cli/config.md
workflow: 14
---
# `openclaw config`
配置辅助工具:通过路径获取/设置/删除值。不带子命令运行时将打开配置向导(与 `openclaw configure` 相同)。
## 示例
```bash
openclaw config get browser.executablePath
openclaw config set browser.executablePath "/usr/bin/google-chrome"
openclaw config set agents.defaults.heartbeat.every "2h"
openclaw config set agents.list[0].tools.exec.node "node-id-or-name"
openclaw config unset tools.web.search.apiKey
```
## 路径
路径使用点号或方括号表示法:
```bash
openclaw config get agents.defaults.workspace
openclaw config get agents.list[0].id
```
使用智能体列表索引来指定特定智能体:
```bash
openclaw config get agents.list
openclaw config set agents.list[1].tools.exec.node "node-id-or-name"
```
## 值
值会尽可能按 JSON5 解析;否则视为字符串。
使用 `--json` 强制要求 JSON5 解析。
```bash
openclaw config set agents.defaults.heartbeat.every "0m"
openclaw config set gateway.port 19001 --json
openclaw config set channels.whatsapp.groups '["*"]' --json
```
编辑后请重启 Gateway。

View File

@@ -0,0 +1,40 @@
---
read_when:
- 您想通过交互方式调整凭据、设备或智能体默认设置
summary: "`openclaw configure` 的 CLI 参考(交互式配置提示)"
title: configure
x-i18n:
generated_at: "2026-02-01T19:58:46Z"
model: claude-opus-4-5
provider: pi
source_hash: 9cb2bb5237b02b3a2dca71b5e43b11bd6b9939b9e4aa9ce1882457464b51efd2
source_path: cli/configure.md
workflow: 14
---
# `openclaw configure`
交互式提示,用于设置凭据、设备和智能体默认配置。
注意:**模型**部分现在包含一个多选项,用于设置
`agents.defaults.models` 允许列表(决定在 `/model` 和模型选择器中显示哪些模型)。
提示:不带子命令运行 `openclaw config` 会打开相同的向导。使用
`openclaw config get|set|unset` 进行非交互式编辑。
相关内容:
- Gateway 配置参考:[配置](/gateway/configuration)
- Config CLI[Config](/cli/config)
注意事项:
- 选择 Gateway 运行位置时会始终更新 `gateway.mode`。如果您只需要修改这一项,可以直接选择"继续"而无需配置其他部分。
- 面向渠道的服务Slack/Discord/Matrix/Microsoft Teams在设置过程中会提示配置渠道/房间允许列表。您可以输入名称或 ID向导会尽可能将名称解析为 ID。
## 示例
```bash
openclaw configure
openclaw configure --section models --section channels
```

38
docs/zh-CN/cli/cron.md Normal file
View File

@@ -0,0 +1,38 @@
---
read_when:
- 您需要定时任务和唤醒功能
- 您正在调试定时任务的执行和日志
summary: "`openclaw cron` 的 CLI 参考(调度和运行后台任务)"
title: cron
x-i18n:
generated_at: "2026-02-01T19:58:49Z"
model: claude-opus-4-5
provider: pi
source_hash: bc9317c824f3b6339df657cc269961d9b5f121da65ec2b23a07d454e6d611135
source_path: cli/cron.md
workflow: 14
---
# `openclaw cron`
管理 Gateway 调度器的定时任务。
相关内容:
- 定时任务:[定时任务](/automation/cron-jobs)
提示:运行 `openclaw cron --help` 查看完整的命令列表。
## 常见编辑
更新投递设置而不更改消息内容:
```bash
openclaw cron edit <job-id> --deliver --channel telegram --to "123456789"
```
为隔离任务禁用投递:
```bash
openclaw cron edit <job-id> --no-deliver
```

View File

@@ -0,0 +1,23 @@
---
read_when:
- 想要使用当前令牌打开控制界面
- 想要打印 URL 而不启动浏览器
summary: "`openclaw dashboard` 的 CLI 参考(打开控制界面)"
title: dashboard
x-i18n:
generated_at: "2026-02-01T19:58:50Z"
model: claude-opus-4-5
provider: pi
source_hash: 242a3b35ea43149be12ee2b8f2bc81b6dc24cea546a15f422dcfd0cf2e7724db
source_path: cli/dashboard.md
workflow: 14
---
# `openclaw dashboard`
使用当前认证信息打开控制界面。
```bash
openclaw dashboard
openclaw dashboard --no-open
```

74
docs/zh-CN/cli/devices.md Normal file
View File

@@ -0,0 +1,74 @@
---
read_when:
- 您正在审批设备配对请求
- 您需要轮换或吊销设备令牌
summary: "`openclaw devices` 的 CLI 参考(设备配对 + 令牌轮换/吊销)"
title: devices
x-i18n:
generated_at: "2026-02-01T19:58:53Z"
model: claude-opus-4-5
provider: pi
source_hash: 52f903817d2886c1dc29b85d30168d1edff7944bd120a1e139159c9d99a1f517
source_path: cli/devices.md
workflow: 14
---
# `openclaw devices`
管理设备配对请求和设备范围的令牌。
## 命令
### `openclaw devices list`
列出待处理的配对请求和已配对的设备。
```
openclaw devices list
openclaw devices list --json
```
### `openclaw devices approve <requestId>`
批准待处理的设备配对请求。
```
openclaw devices approve <requestId>
```
### `openclaw devices reject <requestId>`
拒绝待处理的设备配对请求。
```
openclaw devices reject <requestId>
```
### `openclaw devices rotate --device <id> --role <role> [--scope <scope...>]`
轮换特定角色的设备令牌(可选择更新权限范围)。
```
openclaw devices rotate --device <deviceId> --role operator --scope operator.read --scope operator.write
```
### `openclaw devices revoke --device <id> --role <role>`
吊销特定角色的设备令牌。
```
openclaw devices revoke --device <deviceId> --role node
```
## 通用选项
- `--url <url>`Gateway WebSocket URL配置后默认使用 `gateway.remote.url`)。
- `--token <token>`Gateway 令牌(如需要)。
- `--password <password>`Gateway 密码(密码认证)。
- `--timeout <ms>`RPC 超时时间。
- `--json`JSON 输出(推荐用于脚本)。
## 注意事项
- 令牌轮换会返回新令牌(敏感信息)。请将其视为机密处理。
- 这些命令需要 `operator.pairing`(或 `operator.admin`)权限范围。

View File

@@ -0,0 +1,70 @@
---
read_when:
- 你想查找某个渠道的联系人/群组/自身 ID
- 你正在开发渠道目录适配器
summary: "`openclaw directory` 的 CLI 参考self、peers、groups"
title: directory
x-i18n:
generated_at: "2026-02-01T19:58:58Z"
model: claude-opus-4-5
provider: pi
source_hash: 7c878d9013aeaa22c8a21563fac30b465a86be85d8c917c5d4591b5c3d4b2025
source_path: cli/directory.md
workflow: 14
---
# `openclaw directory`
对支持目录功能的渠道进行查找(联系人/对等方、群组和"我")。
## 通用参数
- `--channel <name>`:渠道 ID/别名(配置了多个渠道时为必填;仅配置一个渠道时自动选择)
- `--account <id>`:账号 ID默认渠道默认账号
- `--json`:输出 JSON 格式
## 说明
- `directory` 用于帮助你查找可粘贴到其他命令中的 ID特别是 `openclaw message send --target ...`)。
- 对于许多渠道,结果来源于配置(允许列表/已配置的群组),而非实时的提供商目录。
- 默认输出为以制表符分隔的 `id`(有时包含 `name`);脚本中请使用 `--json`
## 将结果用于 `message send`
```bash
openclaw directory peers list --channel slack --query "U0"
openclaw message send --channel slack --target user:U012ABCDEF --message "hello"
```
## ID 格式(按渠道)
- WhatsApp`+15551234567`(私聊),`1234567890-1234567890@g.us`(群组)
- Telegram`@username` 或数字聊天 ID群组为数字 ID
- Slack`user:U…``channel:C…`
- Discord`user:<id>``channel:<id>`
- Matrix插件`user:@user:server``room:!roomId:server``#alias:server`
- Microsoft Teams插件`user:<id>``conversation:<id>`
- Zalo插件用户 IDBot API
- Zalo Personal / `zalouser`(插件):来自 `zca` 的会话 ID私聊/群组)(`me``friend list``group list`
## Self"我"
```bash
openclaw directory self --channel zalouser
```
## Peers联系人/用户)
```bash
openclaw directory peers list --channel zalouser
openclaw directory peers list --channel zalouser --query "name"
openclaw directory peers list --channel zalouser --limit 50
```
## 群组
```bash
openclaw directory groups list --channel zalouser
openclaw directory groups list --channel zalouser --query "work"
openclaw directory groups members --channel zalouser --group-id <id>
```

30
docs/zh-CN/cli/dns.md Normal file
View File

@@ -0,0 +1,30 @@
---
read_when:
- 您需要通过 Tailscale + CoreDNS 实现广域发现DNS-SD
- 您正在为自定义发现域名设置分离 DNS例如openclaw.internal
summary: "`openclaw dns` 的 CLI 参考(广域发现辅助工具)"
title: dns
x-i18n:
generated_at: "2026-02-01T19:58:53Z"
model: claude-opus-4-5
provider: pi
source_hash: d2011e41982ffb4b71ab98211574529bc1c8b7769ab1838abddd593f42b12380
source_path: cli/dns.md
workflow: 14
---
# `openclaw dns`
用于广域发现的 DNS 辅助工具Tailscale + CoreDNS。目前专注于 macOS + Homebrew CoreDNS。
相关内容:
- Gateway 发现:[发现](/gateway/discovery)
- 广域发现配置:[配置](/gateway/configuration)
## 设置
```bash
openclaw dns setup
openclaw dns setup --apply
```

22
docs/zh-CN/cli/docs.md Normal file
View File

@@ -0,0 +1,22 @@
---
read_when:
- 想要从终端搜索 OpenClaw 在线文档
summary: "`openclaw docs` 的 CLI 参考(搜索在线文档索引)"
title: docs
x-i18n:
generated_at: "2026-02-01T19:58:52Z"
model: claude-opus-4-5
provider: pi
source_hash: 7a4000e91f7c6ed1140f684e2d1849577651e9389c5c90532a74db58c0b86d47
source_path: cli/docs.md
workflow: 14
---
# `openclaw docs`
搜索在线文档索引。
```bash
openclaw docs browser extension
openclaw docs sandbox allowHostControl
```

48
docs/zh-CN/cli/doctor.md Normal file
View File

@@ -0,0 +1,48 @@
---
read_when:
- 遇到连接/认证问题并需要引导修复
- 更新后想要进行安装完整性检查
summary: "`openclaw doctor` 的 CLI 参考(健康检查 + 引导修复)"
title: doctor
x-i18n:
generated_at: "2026-02-01T19:58:59Z"
model: claude-opus-4-5
provider: pi
source_hash: 92310aa3f3d111e91a74ce1150359d5d8a8d70a856666d9419e16c60d78209f2
source_path: cli/doctor.md
workflow: 14
---
# `openclaw doctor`
Gateway 和渠道的健康检查 + 快速修复。
相关内容:
- 故障排除:[故障排除](/gateway/troubleshooting)
- 安全审计:[安全](/gateway/security)
## 示例
```bash
openclaw doctor
openclaw doctor --repair
openclaw doctor --deep
```
备注:
- 交互式提示(如钥匙串/OAuth 修复)仅在 stdin 为 TTY 且**未**设置 `--non-interactive` 时运行。无头运行cron、Telegram、无终端将跳过提示。
- `--fix``--repair` 的别名)会将备份写入 `~/.openclaw/openclaw.json.bak`,并删除未知的配置键,同时列出每个删除项。
## macOS`launchctl` 环境变量覆盖
如果你之前运行过 `launchctl setenv OPENCLAW_GATEWAY_TOKEN ...`(或 `...PASSWORD`),该值会覆盖你的配置文件,并可能导致持续的"未授权"错误。
```bash
launchctl getenv OPENCLAW_GATEWAY_TOKEN
launchctl getenv OPENCLAW_GATEWAY_PASSWORD
launchctl unsetenv OPENCLAW_GATEWAY_TOKEN
launchctl unsetenv OPENCLAW_GATEWAY_PASSWORD
```

206
docs/zh-CN/cli/gateway.md Normal file
View File

@@ -0,0 +1,206 @@
---
read_when:
- 从 CLI 运行 Gateway开发或服务器环境
- 调试 Gateway 认证、绑定模式和连接问题
- 通过 Bonjour 发现 Gateway局域网 + tailnet
summary: OpenClaw Gateway CLI`openclaw gateway`)— 运行、查询和发现 Gateway
title: gateway
x-i18n:
generated_at: "2026-02-01T19:59:19Z"
model: claude-opus-4-5
provider: pi
source_hash: 054dd48056e4784f153c6511c8eb35b56f239db8d4e629661841a00259e9abbf
source_path: cli/gateway.md
workflow: 14
---
# Gateway CLI
Gateway 是 OpenClaw 的 WebSocket 服务器(渠道、节点、会话、钩子)。
本页中的子命令位于 `openclaw gateway …` 下。
相关文档:
- [/gateway/bonjour](/gateway/bonjour)
- [/gateway/discovery](/gateway/discovery)
- [/gateway/configuration](/gateway/configuration)
## 运行 Gateway
运行本地 Gateway 进程:
```bash
openclaw gateway
```
前台运行别名:
```bash
openclaw gateway run
```
注意事项:
- 默认情况下,除非在 `~/.openclaw/openclaw.json` 中设置了 `gateway.mode=local`,否则 Gateway 会拒绝启动。使用 `--allow-unconfigured` 进行临时/开发运行。
- 在没有认证的情况下绑定到回环地址以外的地址会被阻止(安全防护措施)。
- 授权后 `SIGUSR1` 会触发进程内重启(需启用 `commands.restart` 或使用 Gateway 工具/配置应用/更新)。
- `SIGINT`/`SIGTERM` 处理程序会停止 Gateway 进程,但不会恢复任何自定义终端状态。如果您使用 TUI 或原始模式输入包装 CLI请在退出前恢复终端。
### 选项
- `--port <port>`WebSocket 端口(默认来自配置/环境变量;通常为 `18789`)。
- `--bind <loopback|lan|tailnet|auto|custom>`:监听器绑定模式。
- `--auth <token|password>`:认证模式覆盖。
- `--token <token>`:令牌覆盖(同时为进程设置 `OPENCLAW_GATEWAY_TOKEN`)。
- `--password <password>`:密码覆盖(同时为进程设置 `OPENCLAW_GATEWAY_PASSWORD`)。
- `--tailscale <off|serve|funnel>`:通过 Tailscale 暴露 Gateway。
- `--tailscale-reset-on-exit`:关闭时重置 Tailscale serve/funnel 配置。
- `--allow-unconfigured`:允许在配置中没有 `gateway.mode=local` 的情况下启动 Gateway。
- `--dev`:如果缺失则创建开发配置和工作区(跳过 BOOTSTRAP.md
- `--reset`:重置开发配置 + 凭据 + 会话 + 工作区(需要 `--dev`)。
- `--force`:启动前终止所选端口上的现有监听器。
- `--verbose`:详细日志。
- `--claude-cli-logs`:仅在控制台显示 claude-cli 日志(并启用其 stdout/stderr
- `--ws-log <auto|full|compact>`WebSocket 日志样式(默认 `auto`)。
- `--compact``--ws-log compact` 的别名。
- `--raw-stream`:将原始模型流事件记录到 jsonl。
- `--raw-stream-path <path>`:原始流 jsonl 路径。
## 查询运行中的 Gateway
所有查询命令使用 WebSocket RPC。
输出模式:
- 默认人类可读TTY 中带颜色)。
- `--json`:机器可读的 JSON无样式/加载动画)。
- `--no-color`(或 `NO_COLOR=1`):禁用 ANSI 但保持人类可读布局。
共享选项(在支持的命令中):
- `--url <url>`Gateway WebSocket URL。
- `--token <token>`Gateway 令牌。
- `--password <password>`Gateway 密码。
- `--timeout <ms>`:超时时间/预算(因命令而异)。
- `--expect-final`:等待"最终"响应(智能体调用)。
### `gateway health`
```bash
openclaw gateway health --url ws://127.0.0.1:18789
```
### `gateway status`
`gateway status` 显示 Gateway 服务launchd/systemd/schtasks以及可选的 RPC 探测。
```bash
openclaw gateway status
openclaw gateway status --json
```
选项:
- `--url <url>`:覆盖探测 URL。
- `--token <token>`:探测的令牌认证。
- `--password <password>`:探测的密码认证。
- `--timeout <ms>`:探测超时时间(默认 `10000`)。
- `--no-probe`:跳过 RPC 探测(仅查看服务状态)。
- `--deep`:同时扫描系统级服务。
### `gateway probe`
`gateway probe` 是"全面调试"命令。它始终会探测:
- 您配置的远程 Gateway如已设置以及
- localhost回环地址**即使已配置远程 Gateway**。
如果有多个 Gateway 可达,它会全部输出。当您使用隔离的配置文件/端口时(例如救援机器人),支持多个 Gateway但大多数安装仍然运行单个 Gateway。
```bash
openclaw gateway probe
openclaw gateway probe --json
```
#### 通过 SSH 远程连接Mac 应用对等模式)
macOS 应用的"通过 SSH 远程连接"模式使用本地端口转发,使远程 Gateway可能仅绑定到回环地址可通过 `ws://127.0.0.1:<port>` 访问。
CLI 等效命令:
```bash
openclaw gateway probe --ssh user@gateway-host
```
选项:
- `--ssh <target>``user@host``user@host:port`(端口默认为 `22`)。
- `--ssh-identity <path>`:身份文件。
- `--ssh-auto`:自动选择第一个发现的 Gateway 主机作为 SSH 目标(仅限局域网/WAB
配置(可选,用作默认值):
- `gateway.remote.sshTarget`
- `gateway.remote.sshIdentity`
### `gateway call <method>`
底层 RPC 辅助工具。
```bash
openclaw gateway call status
openclaw gateway call logs.tail --params '{"sinceMs": 60000}'
```
## 管理 Gateway 服务
```bash
openclaw gateway install
openclaw gateway start
openclaw gateway stop
openclaw gateway restart
openclaw gateway uninstall
```
注意事项:
- `gateway install` 支持 `--port``--runtime``--token``--force``--json`
- 生命周期命令接受 `--json` 用于脚本编写。
## 发现 GatewayBonjour
`gateway discover` 扫描 Gateway 信标(`_openclaw-gw._tcp`)。
- 组播 DNS-SD`local.`
- 单播 DNS-SD广域 Bonjour选择一个域名例如`openclaw.internal.`)并设置分离 DNS + DNS 服务器;参见 [/gateway/bonjour](/gateway/bonjour)
只有启用了 Bonjour 发现(默认启用)的 Gateway 才会广播信标。
广域发现记录包含TXT
- `role`Gateway 角色提示)
- `transport`(传输提示,例如 `gateway`
- `gatewayPort`WebSocket 端口,通常为 `18789`
- `sshPort`SSH 端口;如未指定默认为 `22`
- `tailnetDns`MagicDNS 主机名,如可用)
- `gatewayTls` / `gatewayTlsSha256`TLS 启用 + 证书指纹)
- `cliPath`(可选的远程安装路径提示)
### `gateway discover`
```bash
openclaw gateway discover
```
选项:
- `--timeout <ms>`:每条命令的超时时间(浏览/解析);默认 `2000`
- `--json`:机器可读输出(同时禁用样式/加载动画)。
示例:
```bash
openclaw gateway discover --timeout 4000
openclaw gateway discover --json | jq '.beacons[].wsUrl'
```

28
docs/zh-CN/cli/health.md Normal file
View File

@@ -0,0 +1,28 @@
---
read_when:
- 您想快速检查正在运行的 Gateway 的健康状态
summary: "`openclaw health` 的 CLI 参考(通过 RPC 访问 Gateway 健康端点)"
title: health
x-i18n:
generated_at: "2026-02-01T19:58:57Z"
model: claude-opus-4-5
provider: pi
source_hash: 82a78a5a97123f7a5736699ae8d793592a736f336c5caced9eba06d14d973fd7
source_path: cli/health.md
workflow: 14
---
# `openclaw health`
从正在运行的 Gateway 获取健康状态。
```bash
openclaw health
openclaw health --json
openclaw health --verbose
```
说明:
- `--verbose` 会运行实时探测,并在配置了多个账号时打印每个账号的耗时。
- 配置了多个智能体时,输出中会包含每个智能体的会话存储信息。

310
docs/zh-CN/cli/hooks.md Normal file
View File

@@ -0,0 +1,310 @@
---
read_when:
- 您想管理智能体钩子
- 您想安装或更新钩子
summary: "`openclaw hooks` 的 CLI 参考(智能体钩子)"
title: hooks
x-i18n:
generated_at: "2026-02-01T19:59:18Z"
model: claude-opus-4-5
provider: pi
source_hash: e2032e61ff4b9135cb2708d92eb7889ac627b85a5fc153e3d5b84265f7bd7bc6
source_path: cli/hooks.md
workflow: 14
---
# `openclaw hooks`
管理智能体钩子(用于 `/new``/reset` 等命令以及 Gateway 启动的事件驱动自动化)。
相关内容:
- 钩子:[钩子](/hooks)
- 插件钩子:[插件](/plugin#plugin-hooks)
## 列出所有钩子
```bash
openclaw hooks list
```
列出从工作区、托管和内置目录中发现的所有钩子。
**选项:**
- `--eligible`:仅显示符合条件的钩子(需求已满足)
- `--json`:以 JSON 格式输出
- `-v, --verbose`:显示详细信息,包括缺失的需求
**示例输出:**
```
Hooks (4/4 ready)
Ready:
🚀 boot-md ✓ - Run BOOT.md on gateway startup
📝 command-logger ✓ - Log all command events to a centralized audit file
💾 session-memory ✓ - Save session context to memory when /new command is issued
😈 soul-evil ✓ - Swap injected SOUL content during a purge window or by random chance
```
**示例(详细模式):**
```bash
openclaw hooks list --verbose
```
显示不符合条件的钩子缺失的需求。
**示例JSON**
```bash
openclaw hooks list --json
```
返回结构化 JSON 以供程序化使用。
## 获取钩子信息
```bash
openclaw hooks info <name>
```
显示特定钩子的详细信息。
**参数:**
- `<name>`:钩子名称(例如 `session-memory`
**选项:**
- `--json`:以 JSON 格式输出
**示例:**
```bash
openclaw hooks info session-memory
```
**输出:**
```
💾 session-memory ✓ Ready
Save session context to memory when /new command is issued
Details:
Source: openclaw-bundled
Path: /path/to/openclaw/hooks/bundled/session-memory/HOOK.md
Handler: /path/to/openclaw/hooks/bundled/session-memory/handler.ts
Homepage: https://docs.openclaw.ai/hooks#session-memory
Events: command:new
Requirements:
Config: ✓ workspace.dir
```
## 检查钩子资格
```bash
openclaw hooks check
```
显示钩子资格状态摘要(就绪与未就绪的数量)。
**选项:**
- `--json`:以 JSON 格式输出
**示例输出:**
```
Hooks Status
Total hooks: 4
Ready: 4
Not ready: 0
```
## 启用钩子
```bash
openclaw hooks enable <name>
```
通过将特定钩子添加到配置文件(`~/.openclaw/config.json`)来启用它。
**注意:** 由插件管理的钩子在 `openclaw hooks list` 中显示为 `plugin:<id>`,无法在此处启用/禁用。请改为启用/禁用对应的插件。
**参数:**
- `<name>`:钩子名称(例如 `session-memory`
**示例:**
```bash
openclaw hooks enable session-memory
```
**输出:**
```
✓ Enabled hook: 💾 session-memory
```
**执行操作:**
- 检查钩子是否存在且符合条件
- 在配置中更新 `hooks.internal.entries.<name>.enabled = true`
- 将配置保存到磁盘
**启用后:**
- 重启 Gateway 以重新加载钩子macOS 上重启菜单栏应用,或在开发环境中重启 Gateway 进程)。
## 禁用钩子
```bash
openclaw hooks disable <name>
```
通过更新配置来禁用特定钩子。
**参数:**
- `<name>`:钩子名称(例如 `command-logger`
**示例:**
```bash
openclaw hooks disable command-logger
```
**输出:**
```
⏸ Disabled hook: 📝 command-logger
```
**禁用后:**
- 重启 Gateway 以重新加载钩子
## 安装钩子
```bash
openclaw hooks install <path-or-spec>
```
从本地文件夹/归档包或 npm 安装钩子包。
**执行操作:**
- 将钩子包复制到 `~/.openclaw/hooks/<id>`
-`hooks.internal.entries.*` 中启用已安装的钩子
-`hooks.internal.installs` 下记录安装信息
**选项:**
- `-l, --link`:链接本地目录而非复制(将其添加到 `hooks.internal.load.extraDirs`
**支持的归档格式:** `.zip``.tgz``.tar.gz``.tar`
**示例:**
```bash
# 本地目录
openclaw hooks install ./my-hook-pack
# 本地归档包
openclaw hooks install ./my-hook-pack.zip
# NPM 包
openclaw hooks install @openclaw/my-hook-pack
# 链接本地目录而非复制
openclaw hooks install -l ./my-hook-pack
```
## 更新钩子
```bash
openclaw hooks update <id>
openclaw hooks update --all
```
更新已安装的钩子包(仅限 npm 安装)。
**选项:**
- `--all`:更新所有已跟踪的钩子包
- `--dry-run`:显示将要更改的内容而不实际写入
## 内置钩子
### session-memory
在您执行 `/new` 时将会话上下文保存到记忆中。
**启用:**
```bash
openclaw hooks enable session-memory
```
**输出:** `~/.openclaw/workspace/memory/YYYY-MM-DD-slug.md`
**参见:** [session-memory 文档](/hooks#session-memory)
### command-logger
将所有命令事件记录到集中审计文件中。
**启用:**
```bash
openclaw hooks enable command-logger
```
**输出:** `~/.openclaw/logs/commands.log`
**查看日志:**
```bash
# 最近的命令
tail -n 20 ~/.openclaw/logs/commands.log
# 格式化输出
cat ~/.openclaw/logs/commands.log | jq .
# 按操作过滤
grep '"action":"new"' ~/.openclaw/logs/commands.log | jq .
```
**参见:** [command-logger 文档](/hooks#command-logger)
### soul-evil
在清除窗口期间或随机情况下,将注入的 `SOUL.md` 内容替换为 `SOUL_EVIL.md`
**启用:**
```bash
openclaw hooks enable soul-evil
```
**参见:** [SOUL Evil 钩子](/hooks/soul-evil)
### boot-md
在 Gateway 启动时(渠道启动之后)运行 `BOOT.md`
**事件**`gateway:startup`
**启用**
```bash
openclaw hooks enable boot-md
```
**参见:** [boot-md 文档](/hooks#boot-md)

1033
docs/zh-CN/cli/index.md Normal file

File diff suppressed because it is too large Load Diff

31
docs/zh-CN/cli/logs.md Normal file
View File

@@ -0,0 +1,31 @@
---
read_when:
- 需要远程查看 Gateway 日志(无需 SSH
- 需要 JSON 格式的日志行以供工具使用
summary: 通过 RPC 查看 Gateway 日志的 `openclaw logs` CLI 参考
title: logs
x-i18n:
generated_at: "2026-02-01T20:21:08Z"
model: claude-opus-4-5
provider: pi
source_hash: 911a57f0f3b78412c26312f7bf87a5a26418ab7b74e5e2eb40f16edefb6c6b8e
source_path: cli/logs.md
workflow: 14
---
# `openclaw logs`
通过 RPC 实时查看 Gateway 文件日志(支持远程模式)。
相关内容:
- 日志概述:[日志](/logging)
## 示例
```bash
openclaw logs
openclaw logs --follow
openclaw logs --json
openclaw logs --limit 500
```

52
docs/zh-CN/cli/memory.md Normal file
View File

@@ -0,0 +1,52 @@
---
read_when:
- 您想要索引或搜索语义记忆
- 您正在调试记忆可用性或索引问题
summary: "`openclaw memory`status/index/search的 CLI 参考"
title: memory
x-i18n:
generated_at: "2026-02-01T20:21:11Z"
model: claude-opus-4-5
provider: pi
source_hash: 95a9e94306f95be2218a909be59be5bbaa5d31322b71b23564c71a89c3a3941a
source_path: cli/memory.md
workflow: 14
---
# `openclaw memory`
管理语义记忆的索引和搜索。
由活跃的记忆插件提供(默认:`memory-core`;设置 `plugins.slots.memory = "none"` 可禁用)。
相关内容:
- 记忆概念:[记忆](/concepts/memory)
- 插件:[插件](/plugins)
## 示例
```bash
openclaw memory status
openclaw memory status --deep
openclaw memory status --deep --index
openclaw memory status --deep --index --verbose
openclaw memory index
openclaw memory index --verbose
openclaw memory search "release checklist"
openclaw memory status --agent main
openclaw memory index --agent main --verbose
```
## 选项
通用选项:
- `--agent <id>`:限定到单个智能体(默认:所有已配置的智能体)。
- `--verbose`:在探测和索引期间输出详细日志。
说明:
- `memory status --deep` 探测向量存储和嵌入模型的可用性。
- `memory status --deep --index` 在存储有未同步变更时运行重新索引。
- `memory index --verbose` 打印每个阶段的详细信息(提供商、模型、数据源、批处理活动)。
- `memory status` 包含通过 `memorySearch.extraPaths` 配置的所有额外路径。

246
docs/zh-CN/cli/message.md Normal file
View File

@@ -0,0 +1,246 @@
---
read_when:
- 添加或修改消息 CLI 操作
- 更改出站渠道行为
summary: "`openclaw message`(发送 + 渠道操作)的 CLI 参考"
title: message
x-i18n:
generated_at: "2026-02-01T20:21:30Z"
model: claude-opus-4-5
provider: pi
source_hash: 35159baf1ef7136252e3ab1e5e03881ebc4196dd43425e2319a39306ced7f48c
source_path: cli/message.md
workflow: 14
---
# `openclaw message`
用于发送消息和渠道操作的单一出站命令
Discord/Google Chat/Slack/Mattermost插件/Telegram/WhatsApp/Signal/iMessage/MS Teams
## 用法
```
openclaw message <subcommand> [flags]
```
渠道选择:
- 如果配置了多个渠道,则必须指定 `--channel`
- 如果只配置了一个渠道,则该渠道为默认值。
- 可选值:`whatsapp|telegram|discord|googlechat|slack|mattermost|signal|imessage|msteams`Mattermost 需要插件)
目标格式(`--target`
- WhatsAppE.164 或群组 JID
- Telegram聊天 ID 或 `@username`
- Discord`channel:<id>``user:<id>`(或 `<@id>` 提及;纯数字 ID 被视为频道)
- Google Chat`spaces/<spaceId>``users/<userId>`
- Slack`channel:<id>``user:<id>`(接受纯频道 ID
- Mattermost插件`channel:<id>``user:<id>``@username`(纯 ID 被视为频道)
- Signal`+E.164``group:<id>``signal:+E.164``signal:group:<id>``username:<name>`/`u:<name>`
- iMessage句柄、`chat_id:<id>``chat_guid:<guid>``chat_identifier:<id>`
- MS Teams会话 ID`19:...@thread.tacv2`)或 `conversation:<id>``user:<aad-object-id>`
名称查找:
- 对于支持的提供商Discord/Slack 等),如 `Help``#help` 之类的频道名称会通过目录缓存进行解析。
- 缓存未命中时如果提供商支持OpenClaw 将尝试实时目录查找。
## 通用标志
- `--channel <name>`
- `--account <id>`
- `--target <dest>`(用于 send/poll/read 等的目标渠道或用户)
- `--targets <name>`(可重复;仅限广播)
- `--json`
- `--dry-run`
- `--verbose`
## 操作
### 核心
- `send`
- 渠道WhatsApp/Telegram/Discord/Google Chat/Slack/Mattermost插件/Signal/iMessage/MS Teams
- 必需:`--target`,以及 `--message``--media`
- 可选:`--media``--reply-to``--thread-id``--gif-playback`
- 仅限 Telegram`--buttons`(需要 `channels.telegram.capabilities.inlineButtons` 以启用)
- 仅限 Telegram`--thread-id`(论坛主题 ID
- 仅限 Slack`--thread-id`(线程时间戳;`--reply-to` 使用相同字段)
- 仅限 WhatsApp`--gif-playback`
- `poll`
- 渠道WhatsApp/Discord/MS Teams
- 必需:`--target``--poll-question``--poll-option`(可重复)
- 可选:`--poll-multi`
- 仅限 Discord`--poll-duration-hours``--message`
- `react`
- 渠道Discord/Google Chat/Slack/Telegram/WhatsApp/Signal
- 必需:`--message-id``--target`
- 可选:`--emoji``--remove``--participant``--from-me``--target-author``--target-author-uuid`
- 注意:`--remove` 需要 `--emoji`(省略 `--emoji` 可清除自己的表情回应(如果支持);参见 /tools/reactions
- 仅限 WhatsApp`--participant``--from-me`
- Signal 群组表情回应:需要 `--target-author``--target-author-uuid`
- `reactions`
- 渠道Discord/Google Chat/Slack
- 必需:`--message-id``--target`
- 可选:`--limit`
- `read`
- 渠道Discord/Slack
- 必需:`--target`
- 可选:`--limit``--before``--after`
- 仅限 Discord`--around`
- `edit`
- 渠道Discord/Slack
- 必需:`--message-id``--message``--target`
- `delete`
- 渠道Discord/Slack/Telegram
- 必需:`--message-id``--target`
- `pin` / `unpin`
- 渠道Discord/Slack
- 必需:`--message-id``--target`
- `pins`(列表)
- 渠道Discord/Slack
- 必需:`--target`
- `permissions`
- 渠道Discord
- 必需:`--target`
- `search`
- 渠道Discord
- 必需:`--guild-id``--query`
- 可选:`--channel-id``--channel-ids`(可重复)、`--author-id``--author-ids`(可重复)、`--limit`
### 线程
- `thread create`
- 渠道Discord
- 必需:`--thread-name``--target`(频道 ID
- 可选:`--message-id``--auto-archive-min`
- `thread list`
- 渠道Discord
- 必需:`--guild-id`
- 可选:`--channel-id``--include-archived``--before``--limit`
- `thread reply`
- 渠道Discord
- 必需:`--target`(线程 ID`--message`
- 可选:`--media``--reply-to`
### 表情符号
- `emoji list`
- Discord`--guild-id`
- Slack无需额外标志
- `emoji upload`
- 渠道Discord
- 必需:`--guild-id``--emoji-name``--media`
- 可选:`--role-ids`(可重复)
### 贴纸
- `sticker send`
- 渠道Discord
- 必需:`--target``--sticker-id`(可重复)
- 可选:`--message`
- `sticker upload`
- 渠道Discord
- 必需:`--guild-id``--sticker-name``--sticker-desc``--sticker-tags``--media`
### 角色 / 频道 / 成员 / 语音
- `role info`Discord`--guild-id`
- `role add` / `role remove`Discord`--guild-id``--user-id``--role-id`
- `channel info`Discord`--target`
- `channel list`Discord`--guild-id`
- `member info`Discord/Slack`--user-id`Discord 还需要 `--guild-id`
- `voice status`Discord`--guild-id``--user-id`
### 事件
- `event list`Discord`--guild-id`
- `event create`Discord`--guild-id``--event-name``--start-time`
- 可选:`--end-time``--desc``--channel-id``--location``--event-type`
### 管理Discord
- `timeout``--guild-id``--user-id`(可选 `--duration-min``--until`;两者都省略则清除超时)
- `kick``--guild-id``--user-id`+ `--reason`
- `ban``--guild-id``--user-id`+ `--delete-days``--reason`
- `timeout` 也支持 `--reason`
### 广播
- `broadcast`
- 渠道:任何已配置的渠道;使用 `--channel all` 可针对所有提供商
- 必需:`--targets`(可重复)
- 可选:`--message``--media``--dry-run`
## 示例
发送 Discord 回复:
```
openclaw message send --channel discord \
--target channel:123 --message "hi" --reply-to 456
```
创建 Discord 投票:
```
openclaw message poll --channel discord \
--target channel:123 \
--poll-question "Snack?" \
--poll-option Pizza --poll-option Sushi \
--poll-multi --poll-duration-hours 48
```
发送 Teams 主动消息:
```
openclaw message send --channel msteams \
--target conversation:19:abc@thread.tacv2 --message "hi"
```
创建 Teams 投票:
```
openclaw message poll --channel msteams \
--target conversation:19:abc@thread.tacv2 \
--poll-question "Lunch?" \
--poll-option Pizza --poll-option Sushi
```
在 Slack 中添加表情回应:
```
openclaw message react --channel slack \
--target C123 --message-id 456 --emoji "✅"
```
在 Signal 群组中添加表情回应:
```
openclaw message react --channel signal \
--target signal:group:abc123 --message-id 1737630212345 \
--emoji "✅" --target-author-uuid 123e4567-e89b-12d3-a456-426614174000
```
发送 Telegram 内联按钮:
```
openclaw message send --channel telegram --target @mychat --message "Choose:" \
--buttons '[ [{"text":"Yes","callback_data":"cmd:yes"}], [{"text":"No","callback_data":"cmd:no"}] ]'
```

85
docs/zh-CN/cli/models.md Normal file
View File

@@ -0,0 +1,85 @@
---
read_when:
- 您想更改默认模型或查看提供商认证状态
- 您想扫描可用的模型/提供商并调试认证配置
summary: "`openclaw models` 的 CLI 参考status/list/set/scan、别名、回退、认证"
title: models
x-i18n:
generated_at: "2026-02-01T20:21:16Z"
model: claude-opus-4-5
provider: pi
source_hash: 923b6ffc7de382ba25bc6e699f0515607e74877b39f2136ccdba2d99e1b1e9c3
source_path: cli/models.md
workflow: 14
---
# `openclaw models`
模型发现、扫描和配置(默认模型、回退、认证配置)。
相关内容:
- 提供商 + 模型:[模型](/providers/models)
- 提供商认证设置:[快速开始](/start/getting-started)
## 常用命令
```bash
openclaw models status
openclaw models list
openclaw models set <model-or-alias>
openclaw models scan
```
`openclaw models status` 显示已解析的默认模型/回退配置以及认证概览。
当提供商使用快照可用时OAuth/令牌状态部分会包含提供商使用头信息。
添加 `--probe` 可对每个已配置的提供商配置运行实时认证探测。
探测会发送真实请求(可能消耗令牌并触发速率限制)。
使用 `--agent <id>` 可检查已配置智能体的模型/认证状态。省略时,
命令会使用 `OPENCLAW_AGENT_DIR`/`PI_CODING_AGENT_DIR`(如已设置),否则使用
已配置的默认智能体。
注意事项:
- `models set <model-or-alias>` 接受 `provider/model` 或别名。
- 模型引用通过在**第一个** `/` 处拆分来解析。如果模型 ID 包含 `/`OpenRouter 风格),需包含提供商前缀(示例:`openrouter/moonshotai/kimi-k2`)。
- 如果省略提供商OpenClaw 会将输入视为别名或**默认提供商**的模型(仅在模型 ID 不包含 `/` 时有效)。
### `models status`
选项:
- `--json`
- `--plain`
- `--check`(退出码 1=已过期/缺失2=即将过期)
- `--probe`(对已配置的认证配置进行实时探测)
- `--probe-provider <name>`(探测单个提供商)
- `--probe-profile <id>`(可重复或逗号分隔的配置 ID
- `--probe-timeout <ms>`
- `--probe-concurrency <n>`
- `--probe-max-tokens <n>`
- `--agent <id>`(已配置的智能体 ID覆盖 `OPENCLAW_AGENT_DIR`/`PI_CODING_AGENT_DIR`
## 别名 + 回退
```bash
openclaw models aliases list
openclaw models fallbacks list
```
## 认证配置
```bash
openclaw models auth add
openclaw models auth login --provider <id>
openclaw models auth setup-token
openclaw models auth paste-token
```
`models auth login` 运行提供商插件的认证流程OAuth/API 密钥)。使用
`openclaw plugins list` 查看已安装的提供商。
注意事项:
- `setup-token` 会提示输入 setup-token 值(在任意机器上使用 `claude setup-token` 生成)。
- `paste-token` 接受在其他地方或通过自动化生成的令牌字符串。

115
docs/zh-CN/cli/node.md Normal file
View File

@@ -0,0 +1,115 @@
---
read_when:
- 运行无头节点主机
- 为 system.run 配对非 macOS 节点
summary: "`openclaw node`(无头节点主机)的 CLI 参考"
title: node
x-i18n:
generated_at: "2026-02-01T20:21:18Z"
model: claude-opus-4-5
provider: pi
source_hash: a8b1a57712663e2285c9ecd306fe57d067eb3e6820d7d8aec650b41b022d995a
source_path: cli/node.md
workflow: 14
---
# `openclaw node`
运行一个**无头节点主机**,连接到 Gateway WebSocket 并在本机上暴露
`system.run` / `system.which`
## 为什么使用节点主机?
当你希望智能体**在网络中的其他机器上运行命令**,而无需在那些机器上安装完整的 macOS 伴侣应用时,可以使用节点主机。
常见用例:
- 在远程 Linux/Windows 机器上运行命令构建服务器、实验室机器、NAS
- 在 Gateway 上保持执行**沙箱化**,但将已批准的运行委派给其他主机。
- 为自动化或 CI 节点提供轻量级、无头的执行目标。
执行仍受**执行审批**和节点主机上的按智能体白名单保护,因此你可以保持命令访问的范围明确可控。
## 浏览器代理(零配置)
如果节点上的 `browser.enabled` 未被禁用,节点主机会自动通告浏览器代理。这使智能体无需额外配置即可在该节点上使用浏览器自动化。
如需在节点上禁用:
```json5
{
nodeHost: {
browserProxy: {
enabled: false,
},
},
}
```
## 前台运行
```bash
openclaw node run --host <gateway-host> --port 18789
```
选项:
- `--host <host>`Gateway WebSocket 主机(默认:`127.0.0.1`
- `--port <port>`Gateway WebSocket 端口(默认:`18789`
- `--tls`:为 Gateway 连接使用 TLS
- `--tls-fingerprint <sha256>`:预期的 TLS 证书指纹sha256
- `--node-id <id>`:覆盖节点 ID清除配对令牌
- `--display-name <name>`:覆盖节点显示名称
## 服务(后台运行)
将无头节点主机安装为用户服务。
```bash
openclaw node install --host <gateway-host> --port 18789
```
选项:
- `--host <host>`Gateway WebSocket 主机(默认:`127.0.0.1`
- `--port <port>`Gateway WebSocket 端口(默认:`18789`
- `--tls`:为 Gateway 连接使用 TLS
- `--tls-fingerprint <sha256>`:预期的 TLS 证书指纹sha256
- `--node-id <id>`:覆盖节点 ID清除配对令牌
- `--display-name <name>`:覆盖节点显示名称
- `--runtime <runtime>`:服务运行时(`node``bun`
- `--force`:如果已安装则重新安装/覆盖
管理服务:
```bash
openclaw node status
openclaw node stop
openclaw node restart
openclaw node uninstall
```
使用 `openclaw node run` 进行前台节点主机运行(无服务)。
服务命令支持 `--json` 以获取机器可读输出。
## 配对
首次连接会在 Gateway 上创建一个待处理的节点配对请求。
通过以下方式批准:
```bash
openclaw nodes pending
openclaw nodes approve <requestId>
```
节点主机将其节点 ID、令牌、显示名称和 Gateway 连接信息存储在
`~/.openclaw/node.json` 中。
## 执行审批
`system.run` 受本地执行审批控制:
- `~/.openclaw/exec-approvals.json`
- [执行审批](/tools/exec-approvals)
- `openclaw approvals --node <id|name|ip>`(从 Gateway 编辑)

79
docs/zh-CN/cli/nodes.md Normal file
View File

@@ -0,0 +1,79 @@
---
read_when:
- 正在管理配对节点(摄像头、屏幕、画布)
- 需要批准请求或调用节点命令
summary: 管理配对节点(列表/状态/批准/调用,摄像头/画布/屏幕)的 `openclaw nodes` CLI 参考
title: nodes
x-i18n:
generated_at: "2026-02-01T20:21:19Z"
model: claude-opus-4-5
provider: pi
source_hash: 23da6efdd659a82dbbc4afd18eb4ab1020a2892f69c28d610f912c8a799f734c
source_path: cli/nodes.md
workflow: 14
---
# `openclaw nodes`
管理配对节点(设备)并调用节点功能。
相关内容:
- 节点概述:[节点](/nodes)
- 摄像头:[摄像头节点](/nodes/camera)
- 图像:[图像节点](/nodes/images)
常用选项:
- `--url``--token``--timeout``--json`
## 常用命令
```bash
openclaw nodes list
openclaw nodes list --connected
openclaw nodes list --last-connected 24h
openclaw nodes pending
openclaw nodes approve <requestId>
openclaw nodes status
openclaw nodes status --connected
openclaw nodes status --last-connected 24h
```
`nodes list` 输出待处理/已配对的表格。已配对的行包含最近一次连接的时间间隔Last Connect
使用 `--connected` 仅显示当前已连接的节点。使用 `--last-connected <duration>` 筛选在指定时间段内连接过的节点(例如 `24h``7d`)。
## 调用 / 运行
```bash
openclaw nodes invoke --node <id|name|ip> --command <command> --params <json>
openclaw nodes run --node <id|name|ip> <command...>
openclaw nodes run --raw "git status"
openclaw nodes run --agent main --node <id|name|ip> --raw "git status"
```
调用标志:
- `--params <json>`JSON 对象字符串(默认 `{}`)。
- `--invoke-timeout <ms>`:节点调用超时时间(默认 `15000`)。
- `--idempotency-key <key>`:可选的幂等键。
### Exec 风格的默认行为
`nodes run` 模拟模型的 exec 行为(默认值 + 审批):
- 读取 `tools.exec.*`(以及 `agents.list[].tools.exec.*` 的覆盖配置)。
- 在调用 `system.run` 之前使用 exec 审批(`exec.approval.request`)。
- 当设置了 `tools.exec.node` 时,可以省略 `--node`
- 需要一个声明支持 `system.run` 的节点macOS 伴侣应用或无头节点主机)。
标志:
- `--cwd <path>`:工作目录。
- `--env <key=val>`:环境变量覆盖(可重复使用)。
- `--command-timeout <ms>`:命令超时时间。
- `--invoke-timeout <ms>`:节点调用超时时间(默认 `30000`)。
- `--needs-screen-recording`:要求屏幕录制权限。
- `--raw <command>`:运行 shell 字符串(`/bin/sh -lc``cmd.exe /c`)。
- `--agent <id>`:智能体范围的审批/白名单(默认为已配置的智能体)。
- `--ask <off|on-miss|always>``--security <deny|allowlist|full>`:覆盖选项。

36
docs/zh-CN/cli/onboard.md Normal file
View File

@@ -0,0 +1,36 @@
---
read_when:
- 您想要通过引导式设置配置 Gateway、工作区、认证、渠道和技能
summary: "`openclaw onboard`(交互式上手引导向导)的 CLI 参考"
title: onboard
x-i18n:
generated_at: "2026-02-01T20:21:15Z"
model: claude-opus-4-5
provider: pi
source_hash: a661049a6983233986a880a68440a3bcc6869ee2c4c6f5e9f3ab8ff973e22f60
source_path: cli/onboard.md
workflow: 14
---
# `openclaw onboard`
交互式上手引导向导(本地或远程 Gateway 设置)。
相关内容:
- 向导指南:[上手引导](/start/onboarding)
## 示例
```bash
openclaw onboard
openclaw onboard --flow quickstart
openclaw onboard --flow manual
openclaw onboard --mode remote --remote-url ws://gateway-host:18789
```
流程说明:
- `quickstart`:最少提示,自动生成 Gateway 令牌。
- `manual`:完整的端口/绑定/认证提示(`advanced` 的别名)。
- 最快开始聊天的方式:`openclaw dashboard`(控制台 UI无需渠道设置

28
docs/zh-CN/cli/pairing.md Normal file
View File

@@ -0,0 +1,28 @@
---
read_when:
- 您正在使用配对模式的私信功能,需要批准发送者
summary: "`openclaw pairing`(批准/列出配对请求)的 CLI 参考"
title: pairing
x-i18n:
generated_at: "2026-02-01T20:21:19Z"
model: claude-opus-4-5
provider: pi
source_hash: e0bc9707294463c95d13e0deb67d834cfad6a105ab44baf4c25592e5de65ddf5
source_path: cli/pairing.md
workflow: 14
---
# `openclaw pairing`
批准或检查私信配对请求(适用于支持配对的渠道)。
相关内容:
- 配对流程:[配对](/start/pairing)
## 命令
```bash
openclaw pairing list whatsapp
openclaw pairing approve whatsapp <code> --notify
```

66
docs/zh-CN/cli/plugins.md Normal file
View File

@@ -0,0 +1,66 @@
---
read_when:
- 您想安装或管理进程内 Gateway 插件
- 您想调试插件加载失败问题
summary: "`openclaw plugins` 的 CLI 参考list、install、enable/disable、doctor"
title: plugins
x-i18n:
generated_at: "2026-02-01T20:21:23Z"
model: claude-opus-4-5
provider: pi
source_hash: c6bf76b1e766b912ec30a0101d455151c88f1a778bffa121cdd1d0b4fbe73e1c
source_path: cli/plugins.md
workflow: 14
---
# `openclaw plugins`
管理 Gateway 插件/扩展(进程内加载)。
相关内容:
- 插件系统:[插件](/plugin)
- 插件清单 + schema[插件清单](/plugins/manifest)
- 安全加固:[安全](/gateway/security)
## 命令
```bash
openclaw plugins list
openclaw plugins info <id>
openclaw plugins enable <id>
openclaw plugins disable <id>
openclaw plugins doctor
openclaw plugins update <id>
openclaw plugins update --all
```
内置插件随 OpenClaw 一起分发,但默认处于禁用状态。使用 `plugins enable` 来激活它们。
所有插件必须附带一个 `openclaw.plugin.json` 文件,其中包含内联 JSON Schema`configSchema`,即使为空也需要)。缺失或无效的清单或 schema 会导致插件无法加载,并使配置验证失败。
### 安装
```bash
openclaw plugins install <path-or-spec>
```
安全提示:安装插件等同于运行代码,请优先使用固定版本。
支持的归档格式:`.zip``.tgz``.tar.gz``.tar`
使用 `--link` 可避免复制本地目录(会添加到 `plugins.load.paths`
```bash
openclaw plugins install -l ./my-plugin
```
### 更新
```bash
openclaw plugins update <id>
openclaw plugins update --all
openclaw plugins update <id> --dry-run
```
更新仅适用于从 npm 安装的插件(在 `plugins.installs` 中跟踪)。

24
docs/zh-CN/cli/reset.md Normal file
View File

@@ -0,0 +1,24 @@
---
read_when:
- 你想在保留 CLI 安装的同时清除本地状态
- 你想预览哪些内容会被移除
summary: "`openclaw reset`(重置本地状态/配置)的 CLI 参考"
title: reset
x-i18n:
generated_at: "2026-02-01T20:21:22Z"
model: claude-opus-4-5
provider: pi
source_hash: 08afed5830f892e07d6e2e167f09aaf2d79fd5b2ba2a26a65dca857ebdbf873c
source_path: cli/reset.md
workflow: 14
---
# `openclaw reset`
重置本地配置/状态(保留 CLI 安装)。
```bash
openclaw reset
openclaw reset --dry-run
openclaw reset --scope config+creds+sessions --yes --non-interactive
```

158
docs/zh-CN/cli/sandbox.md Normal file
View File

@@ -0,0 +1,158 @@
---
read_when: 您正在管理沙箱容器或调试沙箱/工具策略行为。
status: active
summary: 管理沙箱容器并检查生效的沙箱策略
title: Sandbox CLI
x-i18n:
generated_at: "2026-02-01T20:21:35Z"
model: claude-opus-4-5
provider: pi
source_hash: 6e1186f26c77e188206ce5e198ab624d6b38bc7bb7c06e4d2281b6935c39e347
source_path: cli/sandbox.md
workflow: 14
---
# Sandbox CLI
管理基于 Docker 的沙箱容器,用于隔离智能体执行。
## 概述
OpenClaw 可以在隔离的 Docker 容器中运行智能体以确保安全性。`sandbox` 命令帮助您管理这些容器,尤其是在更新或配置变更之后。
## 命令
### `openclaw sandbox explain`
检查**生效的**沙箱模式/作用域/工作区访问权限、沙箱工具策略以及提权门控(附带修复建议的配置键路径)。
```bash
openclaw sandbox explain
openclaw sandbox explain --session agent:main:main
openclaw sandbox explain --agent work
openclaw sandbox explain --json
```
### `openclaw sandbox list`
列出所有沙箱容器及其状态和配置。
```bash
openclaw sandbox list
openclaw sandbox list --browser # 仅列出浏览器容器
openclaw sandbox list --json # JSON 输出
```
**输出包括:**
- 容器名称和状态(运行中/已停止)
- Docker 镜像及其是否与配置匹配
- 存在时间(自创建以来的时长)
- 空闲时间(自上次使用以来的时长)
- 关联的会话/智能体
### `openclaw sandbox recreate`
移除沙箱容器,以便使用更新的镜像/配置强制重新创建。
```bash
openclaw sandbox recreate --all # 重新创建所有容器
openclaw sandbox recreate --session main # 指定会话
openclaw sandbox recreate --agent mybot # 指定智能体
openclaw sandbox recreate --browser # 仅浏览器容器
openclaw sandbox recreate --all --force # 跳过确认提示
```
**选项:**
- `--all`:重新创建所有沙箱容器
- `--session <key>`:重新创建指定会话的容器
- `--agent <id>`:重新创建指定智能体的容器
- `--browser`:仅重新创建浏览器容器
- `--force`:跳过确认提示
**重要提示:** 容器会在智能体下次使用时自动重新创建。
## 使用场景
### 更新 Docker 镜像后
```bash
# 拉取新镜像
docker pull openclaw-sandbox:latest
docker tag openclaw-sandbox:latest openclaw-sandbox:bookworm-slim
# 更新配置以使用新镜像
# 编辑配置agents.defaults.sandbox.docker.image或 agents.list[].sandbox.docker.image
# 重新创建容器
openclaw sandbox recreate --all
```
### 更改沙箱配置后
```bash
# 编辑配置agents.defaults.sandbox.*(或 agents.list[].sandbox.*
# 重新创建以应用新配置
openclaw sandbox recreate --all
```
### 更改 setupCommand 后
```bash
openclaw sandbox recreate --all
# 或仅针对某个智能体:
openclaw sandbox recreate --agent family
```
### 仅针对特定智能体
```bash
# 仅更新某个智能体的容器
openclaw sandbox recreate --agent alfred
```
## 为什么需要这样做?
**问题:** 当您更新沙箱 Docker 镜像或配置时:
- 现有容器会继续使用旧设置运行
- 容器仅在空闲 24 小时后才会被清理
- 经常使用的智能体会无限期地保持旧容器运行
**解决方案:** 使用 `openclaw sandbox recreate` 强制移除旧容器。它们会在下次需要时自动使用当前设置重新创建。
提示:建议使用 `openclaw sandbox recreate` 而非手动执行 `docker rm`。它使用 Gateway 的容器命名规则,避免在作用域/会话键发生变化时出现不匹配问题。
## 配置
沙箱设置位于 `~/.openclaw/openclaw.json` 中的 `agents.defaults.sandbox` 下(按智能体覆盖的配置放在 `agents.list[].sandbox` 中):
```jsonc
{
"agents": {
"defaults": {
"sandbox": {
"mode": "all", // off, non-main, all
"scope": "agent", // session, agent, shared
"docker": {
"image": "openclaw-sandbox:bookworm-slim",
"containerPrefix": "openclaw-sbx-",
// ... 更多 Docker 选项
},
"prune": {
"idleHours": 24, // 空闲 24 小时后自动清理
"maxAgeDays": 7, // 7 天后自动清理
},
},
},
},
}
```
## 另请参阅
- [沙箱文档](/gateway/sandboxing)
- [智能体配置](/concepts/agent-workspace)
- [Doctor 命令](/gateway/doctor) - 检查沙箱设置

View File

@@ -0,0 +1,33 @@
---
read_when:
- 想要对配置/状态进行快速安全审计
- 想要应用安全的"修复"建议chmod、收紧默认值
summary: 审计和修复常见安全隐患的 `openclaw security` CLI 参考
title: security
x-i18n:
generated_at: "2026-02-01T20:21:24Z"
model: claude-opus-4-5
provider: pi
source_hash: 19705b0fff848fa6f302b4ed09b7660c64e09048dba517c7f6a833d2db40bebf
source_path: cli/security.md
workflow: 14
---
# `openclaw security`
安全工具(审计 + 可选修复)。
相关内容:
- 安全指南:[安全](/gateway/security)
## 审计
```bash
openclaw security audit
openclaw security audit --deep
openclaw security audit --fix
```
当多个私信发送者共享主会话时,审计会发出警告,并建议共享收件箱使用 `session.dmScope="per-channel-peer"`(多账户渠道则使用 `per-account-channel-peer`)。
审计还会在小模型(`<=300B`)未启用沙箱且启用了 web/browser 工具时发出警告。

View File

@@ -0,0 +1,23 @@
---
read_when:
- 你想列出已存储的会话并查看近期活动
summary: "`openclaw sessions`(列出已存储的会话及使用情况)的 CLI 参考"
title: sessions
x-i18n:
generated_at: "2026-02-01T20:21:25Z"
model: claude-opus-4-5
provider: pi
source_hash: d8866ef166c0dea5e8d691bb62171298694935ae0771a46fada537774dadfb32
source_path: cli/sessions.md
workflow: 14
---
# `openclaw sessions`
列出已存储的对话会话。
```bash
openclaw sessions
openclaw sessions --active 120
openclaw sessions --json
```

36
docs/zh-CN/cli/setup.md Normal file
View File

@@ -0,0 +1,36 @@
---
read_when:
- 您在不使用完整上手引导向导的情况下进行首次设置
- 您想设置默认工作区路径
summary: "`openclaw setup` 的 CLI 参考(初始化配置 + 工作区)"
title: setup
x-i18n:
generated_at: "2026-02-01T20:21:26Z"
model: claude-opus-4-5
provider: pi
source_hash: 7f3fc8b246924edf48501785be2c0d356bd31bfbb133e75a139a5ee41dbf57f4
source_path: cli/setup.md
workflow: 14
---
# `openclaw setup`
初始化 `~/.openclaw/openclaw.json` 和智能体工作区。
相关内容:
- 快速开始:[快速开始](/start/getting-started)
- 向导:[上手引导](/start/onboarding)
## 示例
```bash
openclaw setup
openclaw setup --workspace ~/.openclaw/workspace
```
通过 setup 运行向导:
```bash
openclaw setup --wizard
```

33
docs/zh-CN/cli/skills.md Normal file
View File

@@ -0,0 +1,33 @@
---
read_when:
- 想要查看哪些技能可用且可以运行
- 想要调试技能缺失的二进制文件/环境变量/配置
summary: 技能列表/信息/检查及技能资格的 `openclaw skills` CLI 参考
title: skills
x-i18n:
generated_at: "2026-02-01T20:21:28Z"
model: claude-opus-4-5
provider: pi
source_hash: 7878442c88a27ec8033f3125c319e9a6a85a1c497a404a06112ad45185c261b0
source_path: cli/skills.md
workflow: 14
---
# `openclaw skills`
检查技能(内置 + 工作区 + 托管覆盖),查看哪些符合条件以及哪些缺少依赖。
相关内容:
- 技能系统:[技能](/tools/skills)
- 技能配置:[技能配置](/tools/skills-config)
- ClawHub 安装:[ClawHub](/tools/clawhub)
## 命令
```bash
openclaw skills list
openclaw skills list --eligible
openclaw skills info <name>
openclaw skills check
```

33
docs/zh-CN/cli/status.md Normal file
View File

@@ -0,0 +1,33 @@
---
read_when:
- 你想快速诊断渠道健康状况及近期会话接收者
- 你想获取可粘贴的完整状态信息用于调试
summary: "`openclaw status`(诊断、探测、使用情况快照)的 CLI 参考"
title: status
x-i18n:
generated_at: "2026-02-01T20:21:30Z"
model: claude-opus-4-5
provider: pi
source_hash: 2bbf5579c48034fc15c2cbd5506c50456230b17e4a74c06318968c590d8f1501
source_path: cli/status.md
workflow: 14
---
# `openclaw status`
渠道和会话的诊断信息。
```bash
openclaw status
openclaw status --all
openclaw status --deep
openclaw status --usage
```
说明:
- `--deep` 会运行实时探测WhatsApp Web + Telegram + Discord + Google Chat + Slack + Signal
- 当配置了多个智能体时,输出包含每个智能体的会话存储。
- 概览包含 Gateway 和节点主机服务的安装/运行状态(如可用)。
- 概览包含更新渠道和 git SHA适用于源码检出
- 更新信息会显示在概览中;如果有可用更新,状态会提示运行 `openclaw update`(参见[更新](/install/updating))。

63
docs/zh-CN/cli/system.md Normal file
View File

@@ -0,0 +1,63 @@
---
read_when:
- 您想在不创建 cron 任务的情况下将系统事件加入队列
- 您需要启用或禁用心跳
- 您想检查系统存在状态条目
summary: "`openclaw system` 的 CLI 参考(系统事件、心跳、存在状态)"
title: system
x-i18n:
generated_at: "2026-02-01T20:21:34Z"
model: claude-opus-4-5
provider: pi
source_hash: 36ae5dbdec327f5a32f7ef44bdc1f161bad69868de62f5071bb4d25a71bfdfe9
source_path: cli/system.md
workflow: 14
---
# `openclaw system`
Gateway 的系统级辅助工具:将系统事件加入队列、控制心跳以及查看存在状态。
## 常用命令
```bash
openclaw system event --text "Check for urgent follow-ups" --mode now
openclaw system heartbeat enable
openclaw system heartbeat last
openclaw system presence
```
## `system event`
在**主**会话上将系统事件加入队列。下一次心跳会将其作为 `System:` 行注入到提示中。使用 `--mode now` 可立即触发心跳;`next-heartbeat` 则等待下一次计划的心跳周期。
标志:
- `--text <text>`:必需的系统事件文本。
- `--mode <mode>``now``next-heartbeat`(默认)。
- `--json`:机器可读输出。
## `system heartbeat last|enable|disable`
心跳控制:
- `last`:显示上一次心跳事件。
- `enable`:重新开启心跳(如果之前被禁用,请使用此命令)。
- `disable`:暂停心跳。
标志:
- `--json`:机器可读输出。
## `system presence`
列出 Gateway 已知的当前系统存在状态条目(节点、实例及类似状态行)。
标志:
- `--json`:机器可读输出。
## 注意事项
- 需要当前配置(本地或远程)可访问的运行中 Gateway。
- 系统事件是临时的,不会在重启后持久化。

30
docs/zh-CN/cli/tui.md Normal file
View File

@@ -0,0 +1,30 @@
---
read_when:
- 想要使用 Gateway 的终端 UI支持远程
- 想要从脚本传递 url/token/session
summary: 连接到 Gateway 的终端 UI 的 `openclaw tui` CLI 参考
title: tui
x-i18n:
generated_at: "2026-02-01T20:21:31Z"
model: claude-opus-4-5
provider: pi
source_hash: f0a97d92e08746a9d6a4f31d361ccad9aea4c3dc61cfafb310d88715f61cfb64
source_path: cli/tui.md
workflow: 14
---
# `openclaw tui`
打开连接到 Gateway 的终端 UI。
相关内容:
- TUI 指南:[TUI](/tui)
## 示例
```bash
openclaw tui
openclaw tui --url ws://127.0.0.1:18789 --token <token>
openclaw tui --session main --deliver
```

View File

@@ -0,0 +1,24 @@
---
read_when:
- 您想移除 Gateway 服务和/或本地状态
- 您想先进行试运行
summary: "`openclaw uninstall`(移除 Gateway 服务 + 本地数据)的 CLI 参考"
title: uninstall
x-i18n:
generated_at: "2026-02-01T20:21:33Z"
model: claude-opus-4-5
provider: pi
source_hash: 8d6c3890923f18f95c12b76443d649a6b404934ebd054fb86a9fa1abae843fe4
source_path: cli/uninstall.md
workflow: 14
---
# `openclaw uninstall`
卸载 Gateway 服务 + 本地数据CLI 保留)。
```bash
openclaw uninstall
openclaw uninstall --all --yes
openclaw uninstall --dry-run
```

101
docs/zh-CN/cli/update.md Normal file
View File

@@ -0,0 +1,101 @@
---
read_when:
- 你想安全地更新源码检出
- 你需要了解 `--update` 简写行为
summary: "`openclaw update`(安全的源码更新 + Gateway 自动重启)的 CLI 参考"
title: update
x-i18n:
generated_at: "2026-02-01T20:21:45Z"
model: claude-opus-4-5
provider: pi
source_hash: 3a08e8ac797612c498eef54ecb83e61c9a1ee5de09162a01dbb4b3bd72897206
source_path: cli/update.md
workflow: 14
---
# `openclaw update`
安全更新 OpenClaw 并在 stable/beta/dev 渠道之间切换。
如果你通过 **npm/pnpm** 安装(全局安装,无 git 元数据),更新将通过[更新](/install/updating)中的包管理器流程进行。
## 用法
```bash
openclaw update
openclaw update status
openclaw update wizard
openclaw update --channel beta
openclaw update --channel dev
openclaw update --tag beta
openclaw update --no-restart
openclaw update --json
openclaw --update
```
## 选项
- `--no-restart`:成功更新后跳过重启 Gateway 服务。
- `--channel <stable|beta|dev>`设置更新渠道git + npm持久化到配置中
- `--tag <dist-tag|version>`:仅为本次更新覆盖 npm dist-tag 或版本。
- `--json`:输出机器可读的 `UpdateRunResult` JSON。
- `--timeout <seconds>`:每步超时时间(默认为 1200 秒)。
注意:降级需要确认,因为旧版本可能会破坏配置。
## `update status`
显示当前活跃的更新渠道 + git 标签/分支/SHA适用于源码检出以及更新可用性。
```bash
openclaw update status
openclaw update status --json
openclaw update status --timeout 10
```
选项:
- `--json`:输出机器可读的状态 JSON。
- `--timeout <seconds>`:检查超时时间(默认为 3 秒)。
## `update wizard`
交互式流程,用于选择更新渠道并确认更新后是否重启 Gateway默认重启。如果你选择 `dev` 但没有 git 检出,它会提供创建一个的选项。
## 工作原理
当你显式切换渠道(`--channel ...`OpenClaw 也会保持安装方式一致:
- `dev` → 确保存在 git 检出(默认:`~/openclaw`,可通过 `OPENCLAW_GIT_DIR` 覆盖),更新它,并从该检出安装全局 CLI。
- `stable`/`beta` → 使用匹配的 dist-tag 从 npm 安装。
## Git 检出流程
渠道:
- `stable`:检出最新的非 beta 标签,然后构建 + doctor。
- `beta`:检出最新的 `-beta` 标签,然后构建 + doctor。
- `dev`:检出 `main`,然后 fetch + rebase。
概要流程:
1. 要求工作树干净(无未提交的更改)。
2. 切换到所选渠道(标签或分支)。
3. 拉取上游(仅 dev
4. 仅 dev在临时工作树中进行预检 lint + TypeScript 构建;如果最新提交失败,会向前回溯最多 10 个提交以找到最新的可成功构建的提交。
5. Rebase 到所选提交(仅 dev
6. 安装依赖(优先使用 pnpm回退到 npm
7. 构建项目 + 构建控制台 UI。
8. 运行 `openclaw doctor` 作为最终的"安全更新"检查。
9. 将插件同步到活跃渠道dev 使用内置扩展stable/beta 使用 npm并更新通过 npm 安装的插件。
## `--update` 简写
`openclaw --update` 会重写为 `openclaw update`(便于在 shell 和启动脚本中使用)。
## 另请参阅
- `openclaw doctor`(在 git 检出上会提供先运行更新的选项)
- [开发渠道](/install/development-channels)
- [更新](/install/updating)
- [CLI 参考](/cli)

View File

@@ -0,0 +1,41 @@
---
read_when:
- 使用语音通话插件并想了解 CLI 入口
- 想要 `voicecall call|continue|status|tail|expose` 的快速示例
summary: 语音通话插件命令的 `openclaw voicecall` CLI 参考
title: voicecall
x-i18n:
generated_at: "2026-02-01T20:21:37Z"
model: claude-opus-4-5
provider: pi
source_hash: d93aaee6f6f5c9ac468d8d2905cb23f0f2db75809408cb305c055505be9936f2
source_path: cli/voicecall.md
workflow: 14
---
# `openclaw voicecall`
`voicecall` 是一个由插件提供的命令。只有在安装并启用了语音通话插件时才会出现。
主要文档:
- 语音通话插件:[语音通话](/plugins/voice-call)
## 常用命令
```bash
openclaw voicecall status --call-id <id>
openclaw voicecall call --to "+15555550123" --message "Hello" --mode notify
openclaw voicecall continue --call-id <id> --message "Any questions?"
openclaw voicecall end --call-id <id>
```
## 暴露 WebhookTailscale
```bash
openclaw voicecall expose --mode serve
openclaw voicecall expose --mode funnel
openclaw voicecall unexpose
```
安全提示:仅将 webhook 端点暴露给您信任的网络。尽可能优先使用 Tailscale Serve 而非 Funnel。

View File

@@ -0,0 +1,32 @@
---
read_when:
- 您想将 Gmail Pub/Sub 事件接入 OpenClaw
- 您需要 Webhook 辅助命令
summary: "`openclaw webhooks`Webhook 辅助工具 + Gmail Pub/Sub的 CLI 参考"
title: webhooks
x-i18n:
generated_at: "2026-02-01T20:21:38Z"
model: claude-opus-4-5
provider: pi
source_hash: 785ec62afe6631b340ce4a4541ceb34cd6b97704cf7a9889762cb4c1f29a5ca0
source_path: cli/webhooks.md
workflow: 14
---
# `openclaw webhooks`
Webhook 辅助工具和集成Gmail Pub/Sub、Webhook 辅助工具)。
相关内容:
- Webhook[Webhook](/automation/webhook)
- Gmail Pub/Sub[Gmail Pub/Sub](/automation/gmail-pubsub)
## Gmail
```bash
openclaw webhooks gmail setup --account you@example.com
openclaw webhooks gmail run
```
详情请参阅 [Gmail Pub/Sub 文档](/automation/gmail-pubsub)。