mirror of
https://github.com/moltbot/moltbot.git
synced 2026-04-28 08:52:45 +00:00
Docs: update zh-CN translations and pipeline
What: - update zh-CN glossary, TM, and translator prompt - regenerate zh-CN docs and apply targeted fixes - add zh-CN AGENTS pipeline guidance Why: - address terminology/spacing feedback from #6995 Tests: - pnpm build && pnpm check && pnpm test
This commit is contained in:
@@ -1,63 +1,63 @@
|
||||
---
|
||||
read_when:
|
||||
- 设置基于 ACP 的 IDE 集成
|
||||
- 调试 ACP 会话到 Gateway网关的路由
|
||||
summary: 运行用于 IDE 集成的 ACP 桥接
|
||||
- 调试到 Gateway 网关的 ACP 会话路由
|
||||
summary: 运行用于 IDE 集成的 ACP 桥接器
|
||||
title: acp
|
||||
x-i18n:
|
||||
generated_at: "2026-02-01T19:58:33Z"
|
||||
generated_at: "2026-02-03T07:44:38Z"
|
||||
model: claude-opus-4-5
|
||||
provider: pi
|
||||
source_hash: 0c09844297da250bc1a558423e7e534d6b6be9045de12d797c07ecd64a0c63ed
|
||||
source_path: cli/acp.md
|
||||
workflow: 14
|
||||
workflow: 15
|
||||
---
|
||||
|
||||
# acp
|
||||
|
||||
运行与 OpenClaw Gateway网关通信的 ACP(Agent Client Protocol)桥接。
|
||||
运行与 OpenClaw Gateway 网关通信的 ACP(Agent Client Protocol)桥接器。
|
||||
|
||||
此命令通过 stdio 使用 ACP 协议与 IDE 通信,并通过 WebSocket 将提示转发到 Gateway网关。它将 ACP 会话映射到 Gateway网关会话密钥。
|
||||
此命令通过 stdio 使用 ACP 协议与 IDE 通信,并通过 WebSocket 将提示转发到 Gateway 网关。它将 ACP 会话映射到 Gateway 网关会话键。
|
||||
|
||||
## 用法
|
||||
|
||||
```bash
|
||||
openclaw acp
|
||||
|
||||
# 远程 Gateway网关
|
||||
# Remote Gateway
|
||||
openclaw acp --url wss://gateway-host:18789 --token <token>
|
||||
|
||||
# 附加到现有会话密钥
|
||||
# Attach to an existing session key
|
||||
openclaw acp --session agent:main:main
|
||||
|
||||
# 通过标签附加(必须已存在)
|
||||
# Attach by label (must already exist)
|
||||
openclaw acp --session-label "support inbox"
|
||||
|
||||
# 在第一个提示之前重置会话密钥
|
||||
# Reset the session key before the first prompt
|
||||
openclaw acp --session agent:main:main --reset-session
|
||||
```
|
||||
|
||||
## ACP 客户端(调试)
|
||||
|
||||
使用内置 ACP 客户端在无需 IDE 的情况下对桥接进行安装完整性检查。
|
||||
它会启动 ACP 桥接并允许你交互式地输入提示。
|
||||
使用内置 ACP 客户端在没有 IDE 的情况下检查桥接器的安装完整性。
|
||||
它会启动 ACP 桥接器并让你交互式输入提示。
|
||||
|
||||
```bash
|
||||
openclaw acp client
|
||||
|
||||
# 将启动的桥接指向远程 Gateway网关
|
||||
# Point the spawned bridge at a remote Gateway
|
||||
openclaw acp client --server-args --url wss://gateway-host:18789 --token <token>
|
||||
|
||||
# 覆盖服务器命令(默认:openclaw)
|
||||
# Override the server command (default: 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。
|
||||
当 IDE(或其他客户端)使用 Agent Client Protocol 并且你希望它驱动 OpenClaw Gateway 网关会话时,请使用 ACP。
|
||||
|
||||
1. 确保 Gateway网关正在运行(本地或远程)。
|
||||
2. 配置 Gateway网关目标(通过配置文件或标志)。
|
||||
1. 确保 Gateway 网关正在运行(本地或远程)。
|
||||
2. 配置 Gateway 网关目标(配置或标志)。
|
||||
3. 将你的 IDE 配置为通过 stdio 运行 `openclaw acp`。
|
||||
|
||||
示例配置(持久化):
|
||||
@@ -75,9 +75,9 @@ openclaw acp --url wss://gateway-host:18789 --token <token>
|
||||
|
||||
## 选择智能体
|
||||
|
||||
ACP 不直接选择智能体。它通过 Gateway网关会话密钥进行路由。
|
||||
ACP 不直接选择智能体。它通过 Gateway 网关会话键进行路由。
|
||||
|
||||
使用智能体作用域的会话密钥来指定特定智能体:
|
||||
使用智能体作用域的会话键来定位特定智能体:
|
||||
|
||||
```bash
|
||||
openclaw acp --session agent:main:main
|
||||
@@ -85,7 +85,7 @@ openclaw acp --session agent:design:main
|
||||
openclaw acp --session agent:qa:bug-123
|
||||
```
|
||||
|
||||
每个 ACP 会话映射到单个 Gateway网关会话密钥。一个智能体可以有多个会话;除非你覆盖密钥或标签,否则 ACP 默认使用隔离的 `acp:<uuid>` 会话。
|
||||
每个 ACP 会话映射到单个 Gateway 网关会话键。一个智能体可以有多个会话;除非你覆盖键或标签,否则 ACP 默认使用隔离的 `acp:<uuid>` 会话。
|
||||
|
||||
## Zed 编辑器设置
|
||||
|
||||
@@ -104,7 +104,7 @@ openclaw acp --session agent:qa:bug-123
|
||||
}
|
||||
```
|
||||
|
||||
要指定特定的 Gateway网关或智能体:
|
||||
要定位特定的 Gateway 网关或智能体:
|
||||
|
||||
```json
|
||||
{
|
||||
@@ -127,18 +127,18 @@ openclaw acp --session agent:qa:bug-123
|
||||
}
|
||||
```
|
||||
|
||||
在 Zed 中,打开 Agent 面板并选择 "OpenClaw ACP" 来开始一个对话线程。
|
||||
在 Zed 中,打开 Agent 面板并选择"OpenClaw ACP"来开始一个会话。
|
||||
|
||||
## 会话映射
|
||||
|
||||
默认情况下,ACP 会话会获得一个带有 `acp:` 前缀的隔离 Gateway网关会话密钥。
|
||||
要复用已知会话,请传递会话密钥或标签:
|
||||
默认情况下,ACP 会话获得一个带有 `acp:` 前缀的隔离 Gateway 网关会话键。
|
||||
要重用已知会话,请传递会话键或标签:
|
||||
|
||||
- `--session <key>`:使用特定的 Gateway网关会话密钥。
|
||||
- `--session <key>`:使用特定的 Gateway 网关会话键。
|
||||
- `--session-label <label>`:通过标签解析现有会话。
|
||||
- `--reset-session`:为该密钥生成新的会话 ID(相同密钥,新的对话记录)。
|
||||
- `--reset-session`:为该键生成新的会话 ID(相同键,新对话记录)。
|
||||
|
||||
如果你的 ACP 客户端支持元数据,你可以按会话进行覆盖:
|
||||
如果你的 ACP 客户端支持元数据,你可以按会话覆盖:
|
||||
|
||||
```json
|
||||
{
|
||||
@@ -150,19 +150,19 @@ openclaw acp --session agent:qa:bug-123
|
||||
}
|
||||
```
|
||||
|
||||
了解更多关于会话密钥的信息,请参阅 [/concepts/session](/concepts/session)。
|
||||
在 [/concepts/session](/concepts/session) 了解更多关于会话键的信息。
|
||||
|
||||
## 选项
|
||||
|
||||
- `--url <url>`:Gateway网关 WebSocket URL(配置后默认使用 gateway.remote.url)。
|
||||
- `--token <token>`:Gateway网关认证令牌。
|
||||
- `--password <password>`:Gateway网关认证密码。
|
||||
- `--session <key>`:默认会话密钥。
|
||||
- `--url <url>`:Gateway 网关 WebSocket URL(配置后默认为 gateway.remote.url)。
|
||||
- `--token <token>`:Gateway 网关认证令牌。
|
||||
- `--password <password>`:Gateway 网关认证密码。
|
||||
- `--session <key>`:默认会话键。
|
||||
- `--session-label <label>`:要解析的默认会话标签。
|
||||
- `--require-existing`:如果会话密钥/标签不存在则失败。
|
||||
- `--reset-session`:在首次使用前重置会话密钥。
|
||||
- `--require-existing`:如果会话键/标签不存在则失败。
|
||||
- `--reset-session`:在首次使用前重置会话键。
|
||||
- `--no-prefix-cwd`:不在提示前添加工作目录前缀。
|
||||
- `--verbose, -v`:将详细日志输出到 stderr。
|
||||
- `--verbose, -v`:向 stderr 输出详细日志。
|
||||
|
||||
### `acp client` 选项
|
||||
|
||||
|
||||
@@ -1,25 +1,24 @@
|
||||
---
|
||||
read_when:
|
||||
- 你想从脚本中运行一次智能体轮次(可选择投递回复)
|
||||
summary: "`openclaw agent` 的 CLI 参考(通过 Gateway网关发送一次智能体轮次)"
|
||||
- 你想从脚本运行一个智能体回合(可选发送回复)
|
||||
summary: "`openclaw agent` 的 CLI 参考(通过 Gateway 网关发送一个智能体回合)"
|
||||
title: agent
|
||||
x-i18n:
|
||||
generated_at: "2026-02-01T19:58:31Z"
|
||||
generated_at: "2026-02-03T07:44:38Z"
|
||||
model: claude-opus-4-5
|
||||
provider: pi
|
||||
source_hash: dcf12fb94e207c68645f58235792596d65afecf8216b8f9ab3acb01e03b50a33
|
||||
source_path: cli/agent.md
|
||||
workflow: 14
|
||||
workflow: 15
|
||||
---
|
||||
|
||||
# `openclaw agent`
|
||||
|
||||
通过 Gateway网关运行一次智能体轮次(使用 `--local` 进行嵌入式运行)。
|
||||
使用 `--agent <id>` 直接指定一个已配置的智能体。
|
||||
通过 Gateway 网关运行智能体回合(使用 `--local` 进行嵌入式运行)。使用 `--agent <id>` 直接指定已配置的智能体。
|
||||
|
||||
相关内容:
|
||||
|
||||
- 智能体发送工具:[智能体发送](/tools/agent-send)
|
||||
- 智能体发送工具:[Agent send](/tools/agent-send)
|
||||
|
||||
## 示例
|
||||
|
||||
|
||||
@@ -1,22 +1,22 @@
|
||||
---
|
||||
read_when:
|
||||
- 你想通过 CLI 编辑执行审批
|
||||
- 你需要管理 Gateway网关或节点主机上的允许列表
|
||||
summary: "`openclaw approvals` 的 CLI 参考(用于 Gateway网关或节点主机的执行审批)"
|
||||
- 你需要管理 Gateway 网关或节点主机上的允许列表
|
||||
summary: CLI 参考:`openclaw approvals`(Gateway 网关或节点主机的执行审批)
|
||||
title: approvals
|
||||
x-i18n:
|
||||
generated_at: "2026-02-01T19:58:39Z"
|
||||
generated_at: "2026-02-03T10:04:09Z"
|
||||
model: claude-opus-4-5
|
||||
provider: pi
|
||||
source_hash: 4329cdaaec2c5f5d619415b6431196512d4834dc1ccd7363576f03dd9b845130
|
||||
source_path: cli/approvals.md
|
||||
workflow: 14
|
||||
workflow: 15
|
||||
---
|
||||
|
||||
# `openclaw approvals`
|
||||
|
||||
管理**本地主机**、**Gateway网关主机**或**节点主机**的执行审批。
|
||||
默认情况下,命令针对磁盘上的本地审批文件。使用 `--gateway` 针对 Gateway网关,或使用 `--node` 针对特定节点。
|
||||
管理**本地主机**、**Gateway 网关主机**或**节点主机**的执行审批。
|
||||
默认情况下,命令针对磁盘上的本地审批文件。使用 `--gateway` 可针对 Gateway 网关,使用 `--node` 可针对特定节点。
|
||||
|
||||
相关内容:
|
||||
|
||||
@@ -51,7 +51,7 @@ openclaw approvals allowlist remove "~/Projects/**/bin/rg"
|
||||
|
||||
## 注意事项
|
||||
|
||||
- `--node` 使用与 `openclaw nodes` 相同的解析器(id、名称、ip 或 id 前缀)。
|
||||
- `--agent` 默认为 `"*"`,即适用于所有智能体。
|
||||
- 节点主机必须公布 `system.execApprovals.get/set`(macOS 应用或无头节点主机)。
|
||||
- `--node` 使用与 `openclaw nodes` 相同的解析器(id、name、ip 或 id 前缀)。
|
||||
- `--agent` 默认为 `"*"`,表示适用于所有智能体。
|
||||
- 节点主机必须公开 `system.execApprovals.get/set`(macOS 应用或无头节点主机)。
|
||||
- 审批文件按主机存储在 `~/.openclaw/exec-approvals.json`。
|
||||
|
||||
@@ -1,35 +1,35 @@
|
||||
---
|
||||
read_when:
|
||||
- 使用 `openclaw browser` 并需要常见任务的示例
|
||||
- 想要通过节点主机控制运行在另一台机器上的浏览器
|
||||
- 想要使用 Chrome 扩展中继(通过工具栏按钮附加/分离)
|
||||
- 你使用 `openclaw browser` 并想要常见任务的示例
|
||||
- 你想通过 node host 控制在另一台机器上运行的浏览器
|
||||
- 你想使用 Chrome 扩展中继(通过工具栏按钮附加/分离)
|
||||
summary: "`openclaw browser` 的 CLI 参考(配置文件、标签页、操作、扩展中继)"
|
||||
title: browser
|
||||
x-i18n:
|
||||
generated_at: "2026-02-01T19:58:45Z"
|
||||
generated_at: "2026-02-03T07:44:49Z"
|
||||
model: claude-opus-4-5
|
||||
provider: pi
|
||||
source_hash: af35adfd68726fd519c704d046451effd330458c2b8305e713137fb07b2571fd
|
||||
source_path: cli/browser.md
|
||||
workflow: 14
|
||||
workflow: 15
|
||||
---
|
||||
|
||||
# `openclaw browser`
|
||||
|
||||
管理 OpenClaw 的浏览器控制服务器并执行浏览器操作(标签页、快照、截图、导航、点击、输入)。
|
||||
管理 OpenClaw 的浏览器控制服务器并运行浏览器操作(标签页、快照、截图、导航、点击、输入)。
|
||||
|
||||
相关内容:
|
||||
相关:
|
||||
|
||||
- 浏览器工具 + API:[浏览器工具](/tools/browser)
|
||||
- Chrome 扩展中继:[Chrome 扩展](/tools/chrome-extension)
|
||||
|
||||
## 常用标志
|
||||
## 通用标志
|
||||
|
||||
- `--url <gatewayWsUrl>`:Gateway网关 WebSocket URL(默认使用配置值)。
|
||||
- `--token <token>`:Gateway网关令牌(如需要)。
|
||||
- `--timeout <ms>`:请求超时时间(毫秒)。
|
||||
- `--browser-profile <name>`:选择浏览器配置文件(默认使用配置值)。
|
||||
- `--json`:机器可读输出(在支持的情况下)。
|
||||
- `--url <gatewayWsUrl>`:Gateway 网关 WebSocket URL(默认从配置获取)。
|
||||
- `--token <token>`:Gateway 网关令牌(如果需要)。
|
||||
- `--timeout <ms>`:请求超时(毫秒)。
|
||||
- `--browser-profile <name>`:选择浏览器配置文件(默认从配置获取)。
|
||||
- `--json`:机器可读输出(在支持的地方)。
|
||||
|
||||
## 快速开始(本地)
|
||||
|
||||
@@ -42,9 +42,9 @@ openclaw browser --browser-profile openclaw snapshot
|
||||
|
||||
## 配置文件
|
||||
|
||||
配置文件是命名的浏览器路由配置。实际使用中:
|
||||
配置文件是命名的浏览器路由配置。实际上:
|
||||
|
||||
- `openclaw`:启动/附加到一个专用的 OpenClaw 管理的 Chrome 实例(隔离的用户数据目录)。
|
||||
- `openclaw`:启动/附加到专用的 OpenClaw 管理的 Chrome 实例(隔离的用户数据目录)。
|
||||
- `chrome`:通过 Chrome 扩展中继控制你现有的 Chrome 标签页。
|
||||
|
||||
```bash
|
||||
@@ -82,7 +82,7 @@ openclaw browser snapshot
|
||||
openclaw browser screenshot
|
||||
```
|
||||
|
||||
导航/点击/输入(基于引用的 UI 自动化):
|
||||
导航/点击/输入(基于 ref 的 UI 自动化):
|
||||
|
||||
```bash
|
||||
openclaw browser navigate https://example.com
|
||||
@@ -92,7 +92,7 @@ openclaw browser type <ref> "hello"
|
||||
|
||||
## Chrome 扩展中继(通过工具栏按钮附加)
|
||||
|
||||
此模式允许智能体控制你手动附加的现有 Chrome 标签页(不会自动附加)。
|
||||
此模式让智能体控制你手动附加的现有 Chrome 标签页(不会自动附加)。
|
||||
|
||||
将未打包的扩展安装到稳定路径:
|
||||
|
||||
@@ -101,14 +101,14 @@ openclaw browser extension install
|
||||
openclaw browser extension path
|
||||
```
|
||||
|
||||
然后在 Chrome 中 → `chrome://extensions` → 启用"开发者模式" → "加载已解压的扩展程序" → 选择打印出的文件夹。
|
||||
然后 Chrome → `chrome://extensions` → 启用"开发者模式" → "加载已解压的扩展程序" → 选择打印的文件夹。
|
||||
|
||||
完整指南:[Chrome 扩展](/tools/chrome-extension)
|
||||
|
||||
## 远程浏览器控制(节点主机代理)
|
||||
## 远程浏览器控制(node host 代理)
|
||||
|
||||
如果 Gateway网关与浏览器运行在不同的机器上,请在安装了 Chrome/Brave/Edge/Chromium 的机器上运行**节点主机**。Gateway网关会将浏览器操作代理到该节点(无需单独的浏览器控制服务器)。
|
||||
如果 Gateway 网关与浏览器运行在不同的机器上,在有 Chrome/Brave/Edge/Chromium 的机器上运行 **node host**。Gateway 网关会将浏览器操作代理到该节点(无需单独的浏览器控制服务器)。
|
||||
|
||||
使用 `gateway.nodes.browser.mode` 控制自动路由,使用 `gateway.nodes.browser.node` 在多个节点连接时固定到特定节点。
|
||||
使用 `gateway.nodes.browser.mode` 控制自动路由,使用 `gateway.nodes.browser.node` 在连接多个节点时固定特定节点。
|
||||
|
||||
安全性 + 远程设置:[浏览器工具](/tools/browser)、[远程访问](/gateway/remote)、[Tailscale](/gateway/tailscale)、[安全](/gateway/security)
|
||||
安全 + 远程设置:[浏览器工具](/tools/browser)、[远程访问](/gateway/remote)、[Tailscale](/gateway/tailscale)、[安全](/gateway/security)
|
||||
|
||||
@@ -1,26 +1,26 @@
|
||||
---
|
||||
read_when:
|
||||
- 你想添加/移除渠道账号(WhatsApp/Telegram/Discord/Google Chat/Slack/Mattermost(插件)/Signal/iMessage)
|
||||
- 你想检查渠道状态或查看渠道日志
|
||||
summary: "`openclaw channels` 的 CLI 参考(账号、状态、登录/登出、日志)"
|
||||
- 你想添加/删除渠道账户(WhatsApp/Telegram/Discord/Google Chat/Slack/Mattermost(插件)/Signal/iMessage)
|
||||
- 你想检查渠道状态或跟踪渠道日志
|
||||
summary: "`openclaw channels` 的 CLI 参考(账户、状态、登录/登出、日志)"
|
||||
title: channels
|
||||
x-i18n:
|
||||
generated_at: "2026-02-01T19:58:48Z"
|
||||
generated_at: "2026-02-03T07:44:51Z"
|
||||
model: claude-opus-4-5
|
||||
provider: pi
|
||||
source_hash: 16ab1642f247bfa96e8e08dfeb1eedfccb148f40d91099f5423f971df2b54e20
|
||||
source_path: cli/channels.md
|
||||
workflow: 14
|
||||
workflow: 15
|
||||
---
|
||||
|
||||
# `openclaw channels`
|
||||
|
||||
管理 Gateway网关上的聊天渠道账号及其运行时状态。
|
||||
管理 Gateway 网关上的聊天渠道账户及其运行时状态。
|
||||
|
||||
相关文档:
|
||||
|
||||
- 渠道指南:[渠道](/channels/index)
|
||||
- Gateway网关配置:[配置](/gateway/configuration)
|
||||
- Gateway 网关配置:[配置](/gateway/configuration)
|
||||
|
||||
## 常用命令
|
||||
|
||||
@@ -33,14 +33,14 @@ 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 路径等)。
|
||||
提示:`openclaw channels add --help` 显示每个渠道的标志(token、app token、signal-cli 路径等)。
|
||||
|
||||
## 登录/登出(交互式)
|
||||
|
||||
@@ -53,7 +53,7 @@ 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 重新认证。
|
||||
- `openclaw channels list` 输出 `Claude: HTTP 403 ... user:profile` → 用量快照需要 `user:profile` 权限范围。使用 `--no-usage`,或提供 claude.ai 会话密钥(`CLAUDE_WEB_SESSION_KEY` / `CLAUDE_WEB_COOKIE`),或通过 Claude Code CLI 重新授权。
|
||||
|
||||
## 能力探测
|
||||
|
||||
@@ -66,11 +66,11 @@ openclaw channels capabilities --channel discord --target channel:123
|
||||
|
||||
说明:
|
||||
|
||||
- `--channel` 是可选的;省略时将列出所有渠道(包括扩展)。
|
||||
- `--target` 接受 `channel:<id>` 或原始数字频道 ID,仅适用于 Discord。
|
||||
- 探测因提供商而异:Discord intents + 可选的频道权限;Slack bot + 用户权限范围;Telegram bot 标志 + webhook;Signal 守护进程版本;MS Teams 应用令牌 + Graph 角色/权限范围(已知的会标注)。无探测功能的渠道会报告 `Probe: unavailable`。
|
||||
- `--channel` 是可选的;省略它可列出所有渠道(包括扩展)。
|
||||
- `--target` 接受 `channel:<id>` 或原始数字频道 id,仅适用于 Discord。
|
||||
- 探测是特定于提供商的:Discord intents + 可选的频道权限;Slack bot + user scopes;Telegram bot 标志 + webhook;Signal daemon 版本;MS Teams app token + Graph roles/scopes(在已知处标注)。没有探测功能的渠道报告 `Probe: unavailable`。
|
||||
|
||||
## 将名称解析为 ID
|
||||
## 解析名称为 ID
|
||||
|
||||
使用提供商目录将渠道/用户名称解析为 ID:
|
||||
|
||||
|
||||
@@ -1,20 +1,21 @@
|
||||
---
|
||||
read_when:
|
||||
- 你想以非交互方式读取或编辑配置
|
||||
summary: "`openclaw config` 的 CLI 参考(获取/设置/删除配置值)"
|
||||
summary: "`openclaw config` 的 CLI 参考(获取/设置/取消设置配置值)"
|
||||
title: config
|
||||
x-i18n:
|
||||
generated_at: "2026-02-01T19:58:45Z"
|
||||
generated_at: "2026-02-03T10:04:13Z"
|
||||
model: claude-opus-4-5
|
||||
provider: pi
|
||||
source_hash: d60a35f5330f22bc99a0df090590586109d329ddd2ca294aeed191a22560c1c2
|
||||
source_path: cli/config.md
|
||||
workflow: 14
|
||||
workflow: 15
|
||||
---
|
||||
|
||||
# `openclaw config`
|
||||
|
||||
配置辅助工具:通过路径获取/设置/删除值。不带子命令运行时将打开配置向导(与 `openclaw configure` 相同)。
|
||||
配置辅助命令:通过路径获取/设置/取消设置值。不带子命令运行将打开
|
||||
配置向导(与 `openclaw configure` 相同)。
|
||||
|
||||
## 示例
|
||||
|
||||
@@ -28,14 +29,14 @@ 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
|
||||
@@ -44,7 +45,7 @@ openclaw config set agents.list[1].tools.exec.node "node-id-or-name"
|
||||
|
||||
## 值
|
||||
|
||||
值会尽可能按 JSON5 解析;否则视为字符串。
|
||||
值会尽可能解析为 JSON5;否则将被视为字符串。
|
||||
使用 `--json` 强制要求 JSON5 解析。
|
||||
|
||||
```bash
|
||||
@@ -53,4 +54,4 @@ openclaw config set gateway.port 19001 --json
|
||||
openclaw config set channels.whatsapp.groups '["*"]' --json
|
||||
```
|
||||
|
||||
编辑后请重启 Gateway网关。
|
||||
编辑后请重启 Gateway 网关。
|
||||
|
||||
@@ -1,36 +1,34 @@
|
||||
---
|
||||
read_when:
|
||||
- 你想通过交互方式调整凭据、设备或智能体默认设置
|
||||
- 你想交互式地调整凭证、设备或智能体默认设置
|
||||
summary: "`openclaw configure` 的 CLI 参考(交互式配置提示)"
|
||||
title: configure
|
||||
x-i18n:
|
||||
generated_at: "2026-02-01T19:58:46Z"
|
||||
generated_at: "2026-02-03T07:44:46Z"
|
||||
model: claude-opus-4-5
|
||||
provider: pi
|
||||
source_hash: 9cb2bb5237b02b3a2dca71b5e43b11bd6b9939b9e4aa9ce1882457464b51efd2
|
||||
source_path: cli/configure.md
|
||||
workflow: 14
|
||||
workflow: 15
|
||||
---
|
||||
|
||||
# `openclaw configure`
|
||||
|
||||
交互式提示,用于设置凭据、设备和智能体默认配置。
|
||||
用于设置凭证、设备和智能体默认值的交互式提示。
|
||||
|
||||
注意:**模型**部分现在包含一个多选项,用于设置
|
||||
`agents.defaults.models` 允许列表(决定在 `/model` 和模型选择器中显示哪些模型)。
|
||||
注意:**模型**部分现在包含一个用于 `agents.defaults.models` 允许列表的多选项(显示在 `/model` 和模型选择器中的内容)。
|
||||
|
||||
提示:不带子命令运行 `openclaw config` 会打开相同的向导。使用
|
||||
`openclaw config get|set|unset` 进行非交互式编辑。
|
||||
提示:不带子命令的 `openclaw config` 会打开相同的向导。使用 `openclaw config get|set|unset` 进行非交互式编辑。
|
||||
|
||||
相关内容:
|
||||
|
||||
- Gateway网关配置参考:[配置](/gateway/configuration)
|
||||
- Gateway 网关配置参考:[配置](/gateway/configuration)
|
||||
- Config CLI:[Config](/cli/config)
|
||||
|
||||
注意事项:
|
||||
|
||||
- 选择 Gateway网关运行位置时会始终更新 `gateway.mode`。如果你只需要修改这一项,可以直接选择"继续"而无需配置其他部分。
|
||||
- 面向渠道的服务(Slack/Discord/Matrix/Microsoft Teams)在设置过程中会提示配置渠道/房间允许列表。你可以输入名称或 ID;向导会尽可能将名称解析为 ID。
|
||||
- 选择 Gateway 网关运行位置始终会更新 `gateway.mode`。如果这是你唯一需要的,可以不选择其他部分直接选择"继续"。
|
||||
- 面向渠道的服务(Slack/Discord/Matrix/Microsoft Teams)在设置期间会提示输入频道/房间允许列表。你可以输入名称或 ID;向导会尽可能将名称解析为 ID。
|
||||
|
||||
## 示例
|
||||
|
||||
|
||||
@@ -1,37 +1,37 @@
|
||||
---
|
||||
read_when:
|
||||
- 你需要定时任务和唤醒功能
|
||||
- 你正在调试定时任务的执行和日志
|
||||
summary: "`openclaw cron` 的 CLI 参考(调度和运行后台任务)"
|
||||
- 你需要定时作业和唤醒功能
|
||||
- 你正在调试 cron 执行和日志
|
||||
summary: "`openclaw cron` 的 CLI 参考(调度和运行后台作业)"
|
||||
title: cron
|
||||
x-i18n:
|
||||
generated_at: "2026-02-01T19:58:49Z"
|
||||
generated_at: "2026-02-03T07:44:47Z"
|
||||
model: claude-opus-4-5
|
||||
provider: pi
|
||||
source_hash: bc9317c824f3b6339df657cc269961d9b5f121da65ec2b23a07d454e6d611135
|
||||
source_path: cli/cron.md
|
||||
workflow: 14
|
||||
workflow: 15
|
||||
---
|
||||
|
||||
# `openclaw cron`
|
||||
|
||||
管理 Gateway网关调度器的定时任务。
|
||||
管理 Gateway 网关调度器的 cron 作业。
|
||||
|
||||
相关内容:
|
||||
|
||||
- 定时任务:[定时任务](/automation/cron-jobs)
|
||||
- Cron 作业:[Cron 作业](/automation/cron-jobs)
|
||||
|
||||
提示:运行 `openclaw cron --help` 查看完整的命令列表。
|
||||
提示:运行 `openclaw cron --help` 查看完整的命令集。
|
||||
|
||||
## 常见编辑
|
||||
## 常用编辑
|
||||
|
||||
更新投递设置而不更改消息内容:
|
||||
更新投递设置而不更改消息:
|
||||
|
||||
```bash
|
||||
openclaw cron edit <job-id> --deliver --channel telegram --to "123456789"
|
||||
```
|
||||
|
||||
为隔离任务禁用投递:
|
||||
为隔离的作业禁用投递:
|
||||
|
||||
```bash
|
||||
openclaw cron edit <job-id> --no-deliver
|
||||
|
||||
@@ -1,21 +1,21 @@
|
||||
---
|
||||
read_when:
|
||||
- 你正在审批设备配对请求
|
||||
- 你需要轮换或吊销设备令牌
|
||||
summary: "`openclaw devices` 的 CLI 参考(设备配对 + 令牌轮换/吊销)"
|
||||
- 你正在批准设备配对请求
|
||||
- 你需要轮换或撤销设备 token
|
||||
summary: "`openclaw devices` 的 CLI 参考(设备配对 + token 轮换/撤销)"
|
||||
title: devices
|
||||
x-i18n:
|
||||
generated_at: "2026-02-01T19:58:53Z"
|
||||
generated_at: "2026-02-03T07:44:52Z"
|
||||
model: claude-opus-4-5
|
||||
provider: pi
|
||||
source_hash: 52f903817d2886c1dc29b85d30168d1edff7944bd120a1e139159c9d99a1f517
|
||||
source_path: cli/devices.md
|
||||
workflow: 14
|
||||
workflow: 15
|
||||
---
|
||||
|
||||
# `openclaw devices`
|
||||
|
||||
管理设备配对请求和设备范围的令牌。
|
||||
管理设备配对请求和设备范围的 token。
|
||||
|
||||
## 命令
|
||||
|
||||
@@ -46,7 +46,7 @@ openclaw devices reject <requestId>
|
||||
|
||||
### `openclaw devices rotate --device <id> --role <role> [--scope <scope...>]`
|
||||
|
||||
轮换特定角色的设备令牌(可选择更新权限范围)。
|
||||
为特定角色轮换设备 token(可选更新 scope)。
|
||||
|
||||
```
|
||||
openclaw devices rotate --device <deviceId> --role operator --scope operator.read --scope operator.write
|
||||
@@ -54,7 +54,7 @@ openclaw devices rotate --device <deviceId> --role operator --scope operator.rea
|
||||
|
||||
### `openclaw devices revoke --device <id> --role <role>`
|
||||
|
||||
吊销特定角色的设备令牌。
|
||||
为特定角色撤销设备 token。
|
||||
|
||||
```
|
||||
openclaw devices revoke --device <deviceId> --role node
|
||||
@@ -62,13 +62,13 @@ openclaw devices revoke --device <deviceId> --role node
|
||||
|
||||
## 通用选项
|
||||
|
||||
- `--url <url>`:Gateway网关 WebSocket URL(配置后默认使用 `gateway.remote.url`)。
|
||||
- `--token <token>`:Gateway网关令牌(如需要)。
|
||||
- `--password <password>`:Gateway网关密码(密码认证)。
|
||||
- `--timeout <ms>`:RPC 超时时间。
|
||||
- `--url <url>`:Gateway 网关 WebSocket URL(配置后默认使用 `gateway.remote.url`)。
|
||||
- `--token <token>`:Gateway 网关 token(如需要)。
|
||||
- `--password <password>`:Gateway 网关密码(密码认证)。
|
||||
- `--timeout <ms>`:RPC 超时。
|
||||
- `--json`:JSON 输出(推荐用于脚本)。
|
||||
|
||||
## 注意事项
|
||||
|
||||
- 令牌轮换会返回新令牌(敏感信息)。请将其视为机密处理。
|
||||
- 这些命令需要 `operator.pairing`(或 `operator.admin`)权限范围。
|
||||
- Token 轮换会返回新 token(敏感信息)。请像对待密钥一样对待它。
|
||||
- 这些命令需要 `operator.pairing`(或 `operator.admin`)scope。
|
||||
|
||||
@@ -1,26 +1,26 @@
|
||||
---
|
||||
read_when:
|
||||
- 你需要通过 Tailscale + CoreDNS 实现广域发现(DNS-SD)
|
||||
- 你正在为自定义发现域名设置分离 DNS(例如:openclaw.internal)
|
||||
summary: "`openclaw dns` 的 CLI 参考(广域发现辅助工具)"
|
||||
- 你想通过 Tailscale + CoreDNS 实现广域设备发现(DNS-SD)
|
||||
- You’re setting up split DNS for a custom discovery domain (example: openclaw.internal)
|
||||
summary: "`openclaw dns` 的 CLI 参考(广域设备发现辅助工具)"
|
||||
title: dns
|
||||
x-i18n:
|
||||
generated_at: "2026-02-01T19:58:53Z"
|
||||
generated_at: "2026-02-03T07:44:52Z"
|
||||
model: claude-opus-4-5
|
||||
provider: pi
|
||||
source_hash: d2011e41982ffb4b71ab98211574529bc1c8b7769ab1838abddd593f42b12380
|
||||
source_path: cli/dns.md
|
||||
workflow: 14
|
||||
workflow: 15
|
||||
---
|
||||
|
||||
# `openclaw dns`
|
||||
|
||||
用于广域发现的 DNS 辅助工具(Tailscale + CoreDNS)。目前专注于 macOS + Homebrew CoreDNS。
|
||||
用于广域设备发现(Tailscale + CoreDNS)的 DNS 辅助工具。目前专注于 macOS + Homebrew CoreDNS。
|
||||
|
||||
相关内容:
|
||||
|
||||
- Gateway网关发现:[发现](/gateway/discovery)
|
||||
- 广域发现配置:[配置](/gateway/configuration)
|
||||
- Gateway 网关设备发现:[设备发现](/gateway/discovery)
|
||||
- 广域设备发现配置:[配置](/gateway/configuration)
|
||||
|
||||
## 设置
|
||||
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
---
|
||||
read_when:
|
||||
- 想要从终端搜索 OpenClaw 在线文档
|
||||
summary: "`openclaw docs` 的 CLI 参考(搜索在线文档索引)"
|
||||
- 你想从终端搜索实时 OpenClaw 文档
|
||||
summary: "`openclaw docs` 的 CLI 参考(搜索实时文档索引)"
|
||||
title: docs
|
||||
x-i18n:
|
||||
generated_at: "2026-02-01T19:58:52Z"
|
||||
generated_at: "2026-02-03T07:44:50Z"
|
||||
model: claude-opus-4-5
|
||||
provider: pi
|
||||
source_hash: 7a4000e91f7c6ed1140f684e2d1849577651e9389c5c90532a74db58c0b86d47
|
||||
source_path: cli/docs.md
|
||||
workflow: 14
|
||||
workflow: 15
|
||||
---
|
||||
|
||||
# `openclaw docs`
|
||||
|
||||
搜索在线文档索引。
|
||||
搜索实时文档索引。
|
||||
|
||||
```bash
|
||||
openclaw docs browser extension
|
||||
|
||||
@@ -1,21 +1,21 @@
|
||||
---
|
||||
read_when:
|
||||
- 遇到连接/认证问题并需要引导修复
|
||||
- 更新后想要进行安装完整性检查
|
||||
summary: "`openclaw doctor` 的 CLI 参考(健康检查 + 引导修复)"
|
||||
- 你遇到连接/认证问题,需要引导式修复
|
||||
- 你更新后想进行完整性检查
|
||||
summary: "`openclaw doctor` 的 CLI 参考(健康检查 + 引导式修复)"
|
||||
title: doctor
|
||||
x-i18n:
|
||||
generated_at: "2026-02-01T19:58:59Z"
|
||||
generated_at: "2026-02-03T10:04:15Z"
|
||||
model: claude-opus-4-5
|
||||
provider: pi
|
||||
source_hash: 92310aa3f3d111e91a74ce1150359d5d8a8d70a856666d9419e16c60d78209f2
|
||||
source_path: cli/doctor.md
|
||||
workflow: 14
|
||||
workflow: 15
|
||||
---
|
||||
|
||||
# `openclaw doctor`
|
||||
|
||||
Gateway网关和渠道的健康检查 + 快速修复。
|
||||
Gateway 网关和渠道的健康检查 + 快速修复。
|
||||
|
||||
相关内容:
|
||||
|
||||
@@ -30,9 +30,9 @@ openclaw doctor --repair
|
||||
openclaw doctor --deep
|
||||
```
|
||||
|
||||
备注:
|
||||
注意事项:
|
||||
|
||||
- 交互式提示(如钥匙串/OAuth 修复)仅在 stdin 为 TTY 且**未**设置 `--non-interactive` 时运行。无头运行(cron、Telegram、无终端)将跳过提示。
|
||||
- 交互式提示(如钥匙串/OAuth 修复)仅在 stdin 是 TTY 且**未**设置 `--non-interactive` 时运行。无头运行(cron、Telegram、无终端)将跳过提示。
|
||||
- `--fix`(`--repair` 的别名)会将备份写入 `~/.openclaw/openclaw.json.bak`,并删除未知的配置键,同时列出每个删除项。
|
||||
|
||||
## macOS:`launchctl` 环境变量覆盖
|
||||
|
||||
@@ -1,22 +1,22 @@
|
||||
---
|
||||
read_when:
|
||||
- 从 CLI 运行 Gateway网关(开发或服务器环境)
|
||||
- 调试 Gateway网关认证、绑定模式和连接问题
|
||||
- 通过 Bonjour 发现 Gateway网关(局域网 + tailnet)
|
||||
summary: OpenClaw Gateway网关 CLI(`openclaw gateway`)— 运行、查询和发现 Gateway网关
|
||||
- 从 CLI 运行 Gateway 网关(开发或服务器)
|
||||
- 调试 Gateway 网关认证、绑定模式和连接性
|
||||
- 通过 Bonjour 发现 Gateway 网关(局域网 + tailnet)
|
||||
summary: OpenClaw Gateway 网关 CLI(`openclaw gateway`)— 运行、查询和发现 Gateway 网关
|
||||
title: gateway
|
||||
x-i18n:
|
||||
generated_at: "2026-02-01T19:59:19Z"
|
||||
generated_at: "2026-02-03T07:45:15Z"
|
||||
model: claude-opus-4-5
|
||||
provider: pi
|
||||
source_hash: 054dd48056e4784f153c6511c8eb35b56f239db8d4e629661841a00259e9abbf
|
||||
source_path: cli/gateway.md
|
||||
workflow: 14
|
||||
workflow: 15
|
||||
---
|
||||
|
||||
# Gateway网关 CLI
|
||||
# Gateway 网关 CLI
|
||||
|
||||
Gateway网关是 OpenClaw 的 WebSocket 服务器(渠道、节点、会话、钩子)。
|
||||
Gateway 网关是 OpenClaw 的 WebSocket 服务器(渠道、节点、会话、hooks)。
|
||||
|
||||
本页中的子命令位于 `openclaw gateway …` 下。
|
||||
|
||||
@@ -26,7 +26,9 @@ Gateway网关是 OpenClaw 的 WebSocket 服务器(渠道、节点、会话、
|
||||
- [/gateway/discovery](/gateway/discovery)
|
||||
- [/gateway/configuration](/gateway/configuration)
|
||||
|
||||
## 运行 Gateway网关运行本地 Gateway网关进程:
|
||||
## 运行 Gateway 网关
|
||||
|
||||
运行本地 Gateway 网关进程:
|
||||
|
||||
```bash
|
||||
openclaw gateway
|
||||
@@ -40,10 +42,10 @@ openclaw gateway run
|
||||
|
||||
注意事项:
|
||||
|
||||
- 默认情况下,除非在 `~/.openclaw/openclaw.json` 中设置了 `gateway.mode=local`,否则 Gateway网关会拒绝启动。使用 `--allow-unconfigured` 进行临时/开发运行。
|
||||
- 在没有认证的情况下绑定到 local loopback 以外的地址会被阻止(安全防护措施)。
|
||||
- 授权后 `SIGUSR1` 会触发进程内重启(需启用 `commands.restart` 或使用 Gateway网关工具/配置应用/更新)。
|
||||
- `SIGINT`/`SIGTERM` 处理程序会停止 Gateway网关进程,但不会恢复任何自定义终端状态。如果你使用 TUI 或原始模式输入包装 CLI,请在退出前恢复终端。
|
||||
- 默认情况下,除非在 `~/.openclaw/openclaw.json` 中设置了 `gateway.mode=local`,否则 Gateway 网关将拒绝启动。使用 `--allow-unconfigured` 进行临时/开发运行。
|
||||
- 在没有认证的情况下绑定到 loopback 之外的地址会被阻止(安全护栏)。
|
||||
- `SIGUSR1` 在授权时触发进程内重启(启用 `commands.restart` 或使用 gateway 工具/config apply/update)。
|
||||
- `SIGINT`/`SIGTERM` 处理程序会停止 Gateway 网关进程,但不会恢复任何自定义终端状态。如果你用 TUI 或 raw-mode 输入包装 CLI,请在退出前恢复终端。
|
||||
|
||||
### 选项
|
||||
|
||||
@@ -52,12 +54,12 @@ openclaw gateway run
|
||||
- `--auth <token|password>`:认证模式覆盖。
|
||||
- `--token <token>`:令牌覆盖(同时为进程设置 `OPENCLAW_GATEWAY_TOKEN`)。
|
||||
- `--password <password>`:密码覆盖(同时为进程设置 `OPENCLAW_GATEWAY_PASSWORD`)。
|
||||
- `--tailscale <off|serve|funnel>`:通过 Tailscale 暴露 Gateway网关。
|
||||
- `--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`:启动前终止所选端口上的现有监听器。
|
||||
- `--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`)。
|
||||
@@ -65,20 +67,22 @@ openclaw gateway run
|
||||
- `--raw-stream`:将原始模型流事件记录到 jsonl。
|
||||
- `--raw-stream-path <path>`:原始流 jsonl 路径。
|
||||
|
||||
## 查询运行中的 Gateway网关所有查询命令使用 WebSocket RPC。
|
||||
## 查询运行中的 Gateway 网关
|
||||
|
||||
所有查询命令使用 WebSocket RPC。
|
||||
|
||||
输出模式:
|
||||
|
||||
- 默认:人类可读(TTY 中带颜色)。
|
||||
- `--json`:机器可读的 JSON(无样式/加载动画)。
|
||||
- `--json`:机器可读 JSON(无样式/进度指示器)。
|
||||
- `--no-color`(或 `NO_COLOR=1`):禁用 ANSI 但保持人类可读布局。
|
||||
|
||||
共享选项(在支持的命令中):
|
||||
共享选项(在支持的地方):
|
||||
|
||||
- `--url <url>`:Gateway网关 WebSocket URL。
|
||||
- `--token <token>`:Gateway网关令牌。
|
||||
- `--password <password>`:Gateway网关密码。
|
||||
- `--timeout <ms>`:超时时间/预算(因命令而异)。
|
||||
- `--url <url>`:Gateway 网关 WebSocket URL。
|
||||
- `--token <token>`:Gateway 网关令牌。
|
||||
- `--password <password>`:Gateway 网关密码。
|
||||
- `--timeout <ms>`:超时/预算(因命令而异)。
|
||||
- `--expect-final`:等待"最终"响应(智能体调用)。
|
||||
|
||||
### `gateway health`
|
||||
@@ -89,7 +93,7 @@ openclaw gateway health --url ws://127.0.0.1:18789
|
||||
|
||||
### `gateway status`
|
||||
|
||||
`gateway status` 显示 Gateway网关服务(launchd/systemd/schtasks)以及可选的 RPC 探测。
|
||||
`gateway status` 显示 Gateway 网关服务(launchd/systemd/schtasks)以及可选的 RPC 探测。
|
||||
|
||||
```bash
|
||||
openclaw gateway status
|
||||
@@ -101,27 +105,27 @@ openclaw gateway status --json
|
||||
- `--url <url>`:覆盖探测 URL。
|
||||
- `--token <token>`:探测的令牌认证。
|
||||
- `--password <password>`:探测的密码认证。
|
||||
- `--timeout <ms>`:探测超时时间(默认 `10000`)。
|
||||
- `--no-probe`:跳过 RPC 探测(仅查看服务状态)。
|
||||
- `--deep`:同时扫描系统级服务。
|
||||
- `--timeout <ms>`:探测超时(默认 `10000`)。
|
||||
- `--no-probe`:跳过 RPC 探测(仅服务视图)。
|
||||
- `--deep`:也扫描系统级服务。
|
||||
|
||||
### `gateway probe`
|
||||
|
||||
`gateway probe` 是"全面调试"命令。它始终会探测:
|
||||
`gateway probe` 是"调试一切"命令。它始终探测:
|
||||
|
||||
- 你配置的远程 Gateway网关(如已设置),以及
|
||||
- localhost(local loopback),**即使已配置远程 Gateway网关**。
|
||||
- 你配置的远程 Gateway 网关(如果设置了),以及
|
||||
- localhost(loopback)**即使配置了远程也会探测**。
|
||||
|
||||
如果有多个 Gateway网关可达,它会全部输出。当你使用隔离的配置文件/端口时(例如救援机器人),支持多个 Gateway网关,但大多数安装仍然运行单个 Gateway网关。
|
||||
如果多个 Gateway 网关可达,它会打印所有。当你使用隔离的配置文件/端口(例如救援机器人)时支持多个 Gateway 网关,但大多数安装仍然运行单个 Gateway 网关。
|
||||
|
||||
```bash
|
||||
openclaw gateway probe
|
||||
openclaw gateway probe --json
|
||||
```
|
||||
|
||||
#### 通过 SSH 远程连接(Mac 应用对等模式)
|
||||
#### 通过 SSH 远程(Mac 应用对等)
|
||||
|
||||
macOS 应用的"通过 SSH 远程连接"模式使用本地端口转发,使远程 Gateway网关(可能仅绑定到 local loopback)可通过 `ws://127.0.0.1:<port>` 访问。
|
||||
macOS 应用的"通过 SSH 远程"模式使用本地端口转发,因此远程 Gateway 网关(可能仅绑定到 loopback)变得可以通过 `ws://127.0.0.1:<port>` 访问。
|
||||
|
||||
CLI 等效命令:
|
||||
|
||||
@@ -133,7 +137,7 @@ openclaw gateway probe --ssh user@gateway-host
|
||||
|
||||
- `--ssh <target>`:`user@host` 或 `user@host:port`(端口默认为 `22`)。
|
||||
- `--ssh-identity <path>`:身份文件。
|
||||
- `--ssh-auto`:自动选择第一个发现的 Gateway网关主机作为 SSH 目标(仅限局域网/WAB)。
|
||||
- `--ssh-auto`:选择第一个发现的 Gateway 网关主机作为 SSH 目标(仅限局域网/WAB)。
|
||||
|
||||
配置(可选,用作默认值):
|
||||
|
||||
@@ -142,14 +146,14 @@ openclaw gateway probe --ssh user@gateway-host
|
||||
|
||||
### `gateway call <method>`
|
||||
|
||||
底层 RPC 辅助工具。
|
||||
低级 RPC 辅助工具。
|
||||
|
||||
```bash
|
||||
openclaw gateway call status
|
||||
openclaw gateway call logs.tail --params '{"sinceMs": 60000}'
|
||||
```
|
||||
|
||||
## 管理 Gateway网关服务
|
||||
## 管理 Gateway 网关服务
|
||||
|
||||
```bash
|
||||
openclaw gateway install
|
||||
@@ -162,26 +166,26 @@ openclaw gateway uninstall
|
||||
注意事项:
|
||||
|
||||
- `gateway install` 支持 `--port`、`--runtime`、`--token`、`--force`、`--json`。
|
||||
- 生命周期命令接受 `--json` 用于脚本编写。
|
||||
- 生命周期命令接受 `--json` 用于脚本。
|
||||
|
||||
## 发现 Gateway网关(Bonjour)
|
||||
## 发现 Gateway 网关(Bonjour)
|
||||
|
||||
`gateway discover` 扫描 Gateway网关信标(`_openclaw-gw._tcp`)。
|
||||
`gateway discover` 扫描 Gateway 网关信标(`_openclaw-gw._tcp`)。
|
||||
|
||||
- 组播 DNS-SD:`local.`
|
||||
- 单播 DNS-SD(广域 Bonjour):选择一个域名(例如:`openclaw.internal.`)并设置分离 DNS + DNS 服务器;参见 [/gateway/bonjour](/gateway/bonjour)
|
||||
- 单播 DNS-SD(广域 Bonjour):选择一个域(示例:`openclaw.internal.`)并设置分割 DNS + DNS 服务器;参见 [/gateway/bonjour](/gateway/bonjour)
|
||||
|
||||
只有启用了 Bonjour 发现(默认启用)的 Gateway网关才会广播信标。
|
||||
只有启用了 Bonjour 发现(默认)的 Gateway 网关才会广播信标。
|
||||
|
||||
广域发现记录包含(TXT):
|
||||
广域发现记录包括(TXT):
|
||||
|
||||
- `role`(Gateway网关角色提示)
|
||||
- `role`(Gateway 网关角色提示)
|
||||
- `transport`(传输提示,例如 `gateway`)
|
||||
- `gatewayPort`(WebSocket 端口,通常为 `18789`)
|
||||
- `sshPort`(SSH 端口;如未指定默认为 `22`)
|
||||
- `tailnetDns`(MagicDNS 主机名,如可用)
|
||||
- `sshPort`(SSH 端口;如果不存在则默认为 `22`)
|
||||
- `tailnetDns`(MagicDNS 主机名,如果可用)
|
||||
- `gatewayTls` / `gatewayTlsSha256`(TLS 启用 + 证书指纹)
|
||||
- `cliPath`(可选的远程安装路径提示)
|
||||
- `cliPath`(远程安装的可选提示)
|
||||
|
||||
### `gateway discover`
|
||||
|
||||
@@ -191,8 +195,8 @@ openclaw gateway discover
|
||||
|
||||
选项:
|
||||
|
||||
- `--timeout <ms>`:每条命令的超时时间(浏览/解析);默认 `2000`。
|
||||
- `--json`:机器可读输出(同时禁用样式/加载动画)。
|
||||
- `--timeout <ms>`:每个命令的超时(浏览/解析);默认 `2000`。
|
||||
- `--json`:机器可读输出(同时禁用样式/进度指示器)。
|
||||
|
||||
示例:
|
||||
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
---
|
||||
read_when:
|
||||
- 你想快速检查正在运行的 Gateway网关的健康状态
|
||||
summary: "`openclaw health` 的 CLI 参考(通过 RPC 访问 Gateway网关健康端点)"
|
||||
- 你想快速检查运行中的 Gateway 网关健康状态
|
||||
summary: "`openclaw health` 的 CLI 参考(通过 RPC 获取 Gateway 网关健康端点)"
|
||||
title: health
|
||||
x-i18n:
|
||||
generated_at: "2026-02-01T19:58:57Z"
|
||||
generated_at: "2026-02-03T07:44:55Z"
|
||||
model: claude-opus-4-5
|
||||
provider: pi
|
||||
source_hash: 82a78a5a97123f7a5736699ae8d793592a736f336c5caced9eba06d14d973fd7
|
||||
source_path: cli/health.md
|
||||
workflow: 14
|
||||
workflow: 15
|
||||
---
|
||||
|
||||
# `openclaw health`
|
||||
|
||||
从正在运行的 Gateway网关获取健康状态。
|
||||
从运行中的 Gateway 网关获取健康状态。
|
||||
|
||||
```bash
|
||||
openclaw health
|
||||
@@ -22,7 +22,7 @@ openclaw health --json
|
||||
openclaw health --verbose
|
||||
```
|
||||
|
||||
说明:
|
||||
注意:
|
||||
|
||||
- `--verbose` 会运行实时探测,并在配置了多个账号时打印每个账号的耗时。
|
||||
- 配置了多个智能体时,输出中会包含每个智能体的会话存储信息。
|
||||
- `--verbose` 运行实时探测,并在配置了多个账户时打印每个账户的耗时。
|
||||
- 当配置了多个智能体时,输出包括每个智能体的会话存储。
|
||||
|
||||
@@ -2,20 +2,20 @@
|
||||
read_when:
|
||||
- 你想管理智能体钩子
|
||||
- 你想安装或更新钩子
|
||||
summary: "`openclaw hooks` 的 CLI 参考(智能体钩子)"
|
||||
summary: CLI 参考:`openclaw hooks`(智能体钩子)
|
||||
title: hooks
|
||||
x-i18n:
|
||||
generated_at: "2026-02-01T19:59:18Z"
|
||||
generated_at: "2026-02-03T10:04:32Z"
|
||||
model: claude-opus-4-5
|
||||
provider: pi
|
||||
source_hash: e2032e61ff4b9135cb2708d92eb7889ac627b85a5fc153e3d5b84265f7bd7bc6
|
||||
source_path: cli/hooks.md
|
||||
workflow: 14
|
||||
workflow: 15
|
||||
---
|
||||
|
||||
# `openclaw hooks`
|
||||
|
||||
管理智能体钩子(用于 `/new`、`/reset` 等命令以及 Gateway网关启动的事件驱动自动化)。
|
||||
管理智能体钩子(针对 `/new`、`/reset` 等命令以及 Gateway 网关启动的事件驱动自动化)。
|
||||
|
||||
相关内容:
|
||||
|
||||
@@ -28,13 +28,13 @@ x-i18n:
|
||||
openclaw hooks list
|
||||
```
|
||||
|
||||
列出从工作区、托管和内置目录中发现的所有钩子。
|
||||
列出从工作区、托管目录和内置目录中发现的所有钩子。
|
||||
|
||||
**选项:**
|
||||
|
||||
- `--eligible`:仅显示符合条件的钩子(需求已满足)
|
||||
- `--eligible`:仅显示符合条件的钩子(满足要求)
|
||||
- `--json`:以 JSON 格式输出
|
||||
- `-v, --verbose`:显示详细信息,包括缺失的需求
|
||||
- `-v, --verbose`:显示详细信息,包括缺失的要求
|
||||
|
||||
**示例输出:**
|
||||
|
||||
@@ -54,7 +54,7 @@ Ready:
|
||||
openclaw hooks list --verbose
|
||||
```
|
||||
|
||||
显示不符合条件的钩子缺失的需求。
|
||||
显示不符合条件的钩子缺失的要求。
|
||||
|
||||
**示例(JSON):**
|
||||
|
||||
@@ -62,7 +62,7 @@ openclaw hooks list --verbose
|
||||
openclaw hooks list --json
|
||||
```
|
||||
|
||||
返回结构化 JSON 以供程序化使用。
|
||||
返回结构化 JSON,供程序化使用。
|
||||
|
||||
## 获取钩子信息
|
||||
|
||||
@@ -110,7 +110,7 @@ Requirements:
|
||||
openclaw hooks check
|
||||
```
|
||||
|
||||
显示钩子资格状态摘要(就绪与未就绪的数量)。
|
||||
显示钩子资格状态摘要(有多少已就绪,有多少未就绪)。
|
||||
|
||||
**选项:**
|
||||
|
||||
@@ -132,9 +132,10 @@ Not ready: 0
|
||||
openclaw hooks enable <name>
|
||||
```
|
||||
|
||||
通过将特定钩子添加到配置文件(`~/.openclaw/config.json`)来启用它。
|
||||
通过将特定钩子添加到配置(`~/.openclaw/config.json`)来启用它。
|
||||
|
||||
**注意:** 由插件管理的钩子在 `openclaw hooks list` 中显示为 `plugin:<id>`,无法在此处启用/禁用。请改为启用/禁用对应的插件。
|
||||
**注意:** 由插件管理的钩子在 `openclaw hooks list` 中显示 `plugin:<id>`,
|
||||
无法在此处启用/禁用。请改为启用/禁用该插件。
|
||||
|
||||
**参数:**
|
||||
|
||||
@@ -160,7 +161,7 @@ openclaw hooks enable session-memory
|
||||
|
||||
**启用后:**
|
||||
|
||||
- 重启 Gateway网关以重新加载钩子(macOS 上重启菜单栏应用,或在开发环境中重启 Gateway网关进程)。
|
||||
- 重启 Gateway 网关以重新加载钩子(macOS 上重启菜单栏应用,或在开发环境中重启 Gateway 网关进程)。
|
||||
|
||||
## 禁用钩子
|
||||
|
||||
@@ -188,7 +189,7 @@ openclaw hooks disable command-logger
|
||||
|
||||
**禁用后:**
|
||||
|
||||
- 重启 Gateway网关以重新加载钩子
|
||||
- 重启 Gateway 网关以重新加载钩子
|
||||
|
||||
## 安装钩子
|
||||
|
||||
@@ -196,7 +197,7 @@ openclaw hooks disable command-logger
|
||||
openclaw hooks install <path-or-spec>
|
||||
```
|
||||
|
||||
从本地文件夹/归档包或 npm 安装钩子包。
|
||||
从本地文件夹/压缩包或 npm 安装钩子包。
|
||||
|
||||
**执行操作:**
|
||||
|
||||
@@ -206,9 +207,9 @@ openclaw hooks install <path-or-spec>
|
||||
|
||||
**选项:**
|
||||
|
||||
- `-l, --link`:链接本地目录而非复制(将其添加到 `hooks.internal.load.extraDirs`)
|
||||
- `-l, --link`:链接本地目录而不是复制(将其添加到 `hooks.internal.load.extraDirs`)
|
||||
|
||||
**支持的归档格式:** `.zip`、`.tgz`、`.tar.gz`、`.tar`
|
||||
**支持的压缩包格式:** `.zip`、`.tgz`、`.tar.gz`、`.tar`
|
||||
|
||||
**示例:**
|
||||
|
||||
@@ -216,13 +217,13 @@ openclaw hooks install <path-or-spec>
|
||||
# 本地目录
|
||||
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
|
||||
```
|
||||
|
||||
@@ -238,7 +239,7 @@ openclaw hooks update --all
|
||||
**选项:**
|
||||
|
||||
- `--all`:更新所有已跟踪的钩子包
|
||||
- `--dry-run`:显示将要更改的内容而不实际写入
|
||||
- `--dry-run`:显示将要进行的更改,但不写入
|
||||
|
||||
## 内置钩子
|
||||
|
||||
@@ -258,7 +259,7 @@ openclaw hooks enable session-memory
|
||||
|
||||
### command-logger
|
||||
|
||||
将所有命令事件记录到集中审计文件中。
|
||||
将所有命令事件记录到集中的审计文件中。
|
||||
|
||||
**启用:**
|
||||
|
||||
@@ -297,7 +298,7 @@ openclaw hooks enable soul-evil
|
||||
|
||||
### boot-md
|
||||
|
||||
在 Gateway网关启动时(渠道启动之后)运行 `BOOT.md`。
|
||||
在 Gateway 网关启动时(渠道启动后)运行 `BOOT.md`。
|
||||
|
||||
**事件**:`gateway:startup`
|
||||
|
||||
|
||||
@@ -1,21 +1,21 @@
|
||||
---
|
||||
read_when:
|
||||
- 添加或修改 CLI 命令或选项
|
||||
- 为新的命令界面编写文档
|
||||
- 为新命令界面编写文档
|
||||
summary: OpenClaw `openclaw` 命令、子命令和选项的 CLI 参考
|
||||
title: CLI 参考
|
||||
x-i18n:
|
||||
generated_at: "2026-02-01T20:02:06Z"
|
||||
generated_at: "2026-02-03T07:47:54Z"
|
||||
model: claude-opus-4-5
|
||||
provider: pi
|
||||
source_hash: a73923763d7b89d4b183f569d543927ffbfd1f3e02f9e66639913f6daf226850
|
||||
source_path: cli/index.md
|
||||
workflow: 14
|
||||
workflow: 15
|
||||
---
|
||||
|
||||
# CLI 参考
|
||||
|
||||
本页描述当前的 CLI 行为。如果命令发生变更,请更新此文档。
|
||||
本页描述当前的 CLI 行为。如果命令发生变化,请更新此文档。
|
||||
|
||||
## 命令页面
|
||||
|
||||
@@ -57,12 +57,12 @@ x-i18n:
|
||||
- [`channels`](/cli/channels)
|
||||
- [`security`](/cli/security)
|
||||
- [`skills`](/cli/skills)
|
||||
- [`voicecall`](/cli/voicecall)(插件;需已安装)
|
||||
- [`voicecall`](/cli/voicecall)(插件;如已安装)
|
||||
|
||||
## 全局参数
|
||||
## 全局标志
|
||||
|
||||
- `--dev`:将状态隔离到 `~/.openclaw-dev` 并偏移默认端口。
|
||||
- `--profile <name>`:将状态隔离到 `~/.openclaw-<name>`。
|
||||
- `--dev`:将状态隔离到 `~/.openclaw-dev` 下并调整默认端口。
|
||||
- `--profile <name>`:将状态隔离到 `~/.openclaw-<name>` 下。
|
||||
- `--no-color`:禁用 ANSI 颜色。
|
||||
- `--update`:`openclaw update` 的简写(仅限源码安装)。
|
||||
- `-V`、`--version`、`-v`:打印版本并退出。
|
||||
@@ -70,25 +70,25 @@ x-i18n:
|
||||
## 输出样式
|
||||
|
||||
- ANSI 颜色和进度指示器仅在 TTY 会话中渲染。
|
||||
- OSC-8 超链接在支持的终端中显示为可点击链接;否则回退为纯 URL。
|
||||
- `--json`(以及支持的 `--plain`)禁用样式以获得干净输出。
|
||||
- `--no-color` 禁用 ANSI 样式;同样支持 `NO_COLOR=1`。
|
||||
- 长时间运行的命令会显示进度指示器(支持时使用 OSC 9;4)。
|
||||
- OSC-8 超链接在支持的终端中渲染为可点击链接;否则回退到纯 URL。
|
||||
- `--json`(以及支持的地方使用 `--plain`)禁用样式以获得干净输出。
|
||||
- `--no-color` 禁用 ANSI 样式;也支持 `NO_COLOR=1`。
|
||||
- 长时间运行的命令显示进度指示器(支持时使用 OSC 9;4)。
|
||||
|
||||
## 配色方案
|
||||
## 颜色调色板
|
||||
|
||||
OpenClaw 使用龙虾色配色方案作为 CLI 输出。
|
||||
OpenClaw 在 CLI 输出中使用龙虾调色板。
|
||||
|
||||
- `accent`(#FF5A2D):标题、标签、主要高亮。
|
||||
- `accentBright`(#FF7A3D):命令名称、强调。
|
||||
- `accentDim`(#D14A22):次要高亮文本。
|
||||
- `info`(#FF8A5B):信息值。
|
||||
- `info`(#FF8A5B):信息性值。
|
||||
- `success`(#2FBF71):成功状态。
|
||||
- `warn`(#FFB020):警告、回退、注意。
|
||||
- `error`(#E23D2D):错误、失败。
|
||||
- `muted`(#8B7F77):弱化、元数据。
|
||||
|
||||
配色方案的权威来源:`src/terminal/palette.ts`(即 "lobster seam")。
|
||||
调色板权威来源:`src/terminal/palette.ts`(又名"lobster seam")。
|
||||
|
||||
## 命令树
|
||||
|
||||
@@ -244,13 +244,13 @@ openclaw [--dev] [--profile <name>] <command>
|
||||
tui
|
||||
```
|
||||
|
||||
注意:插件可以添加额外的顶层命令(例如 `openclaw voicecall`)。
|
||||
注意:插件可以添加额外的顶级命令(例如 `openclaw voicecall`)。
|
||||
|
||||
## 安全
|
||||
|
||||
- `openclaw security audit` — 审计配置和本地状态中常见的安全隐患。
|
||||
- `openclaw security audit --deep` — 尽力进行实时 Gateway网关探测。
|
||||
- `openclaw security audit --fix` — 收紧安全默认设置并修改状态/配置文件权限。
|
||||
- `openclaw security audit` — 审计配置 + 本地状态中常见的安全隐患。
|
||||
- `openclaw security audit --deep` — 尽力进行实时 Gateway 网关探测。
|
||||
- `openclaw security audit --fix` — 收紧安全默认值并 chmod 状态/配置。
|
||||
|
||||
## 插件
|
||||
|
||||
@@ -262,13 +262,13 @@ openclaw [--dev] [--profile <name>] <command>
|
||||
- `openclaw plugins enable <id>` / `disable <id>` — 切换 `plugins.entries.<id>.enabled`。
|
||||
- `openclaw plugins doctor` — 报告插件加载错误。
|
||||
|
||||
大多数插件变更需要重启 Gateway网关。参见 [/plugin](/plugin)。
|
||||
大多数插件更改需要重启 Gateway 网关。参见 [/plugin](/plugin)。
|
||||
|
||||
## 记忆
|
||||
|
||||
对 `MEMORY.md` + `memory/*.md` 进行向量搜索:
|
||||
|
||||
- `openclaw memory status` — 显示索引统计信息。
|
||||
- `openclaw memory status` — 显示索引统计。
|
||||
- `openclaw memory index` — 重新索引记忆文件。
|
||||
- `openclaw memory search "<query>"` — 对记忆进行语义搜索。
|
||||
|
||||
@@ -282,11 +282,11 @@ openclaw [--dev] [--profile <name>] <command>
|
||||
- `/config` 用于持久化配置更改。
|
||||
- `/debug` 用于仅运行时的配置覆盖(内存中,不写入磁盘;需要 `commands.debug: true`)。
|
||||
|
||||
## 设置与新手引导
|
||||
## 设置 + 新手引导
|
||||
|
||||
### `setup`
|
||||
|
||||
初始化配置和工作区。
|
||||
初始化配置 + 工作区。
|
||||
|
||||
选项:
|
||||
|
||||
@@ -294,19 +294,19 @@ openclaw [--dev] [--profile <name>] <command>
|
||||
- `--wizard`:运行新手引导向导。
|
||||
- `--non-interactive`:无提示运行向导。
|
||||
- `--mode <local|remote>`:向导模式。
|
||||
- `--remote-url <url>`:远程 Gateway网关 URL。
|
||||
- `--remote-token <token>`:远程 Gateway网关令牌。
|
||||
- `--remote-url <url>`:远程 Gateway 网关 URL。
|
||||
- `--remote-token <token>`:远程 Gateway 网关令牌。
|
||||
|
||||
当存在任何向导参数(`--non-interactive`、`--mode`、`--remote-url`、`--remote-token`)时,向导会自动运行。
|
||||
当存在任何向导标志(`--non-interactive`、`--mode`、`--remote-url`、`--remote-token`)时,向导自动运行。
|
||||
|
||||
### `onboard`
|
||||
|
||||
交互式向导,用于设置 Gateway网关、工作区和 Skills。
|
||||
交互式向导,用于设置 Gateway 网关、工作区和 Skills。
|
||||
|
||||
选项:
|
||||
|
||||
- `--workspace <dir>`
|
||||
- `--reset`(在向导运行前重置配置 + 凭证 + 会话 + 工作区)
|
||||
- `--reset`(在向导之前重置配置 + 凭证 + 会话 + 工作区)
|
||||
- `--non-interactive`
|
||||
- `--mode <local|remote>`
|
||||
- `--flow <quickstart|advanced|manual>`(manual 是 advanced 的别名)
|
||||
@@ -341,56 +341,56 @@ openclaw [--dev] [--profile <name>] <command>
|
||||
- `--skip-skills`
|
||||
- `--skip-health`
|
||||
- `--skip-ui`
|
||||
- `--node-manager <npm|pnpm|bun>`(推荐 pnpm;不建议将 bun 用于 Gateway网关运行时)
|
||||
- `--node-manager <npm|pnpm|bun>`(推荐 pnpm;不建议将 bun 用于 Gateway 网关运行时)
|
||||
- `--json`
|
||||
|
||||
### `configure`
|
||||
|
||||
交互式配置向导(模型、渠道、Skills、Gateway网关)。
|
||||
交互式配置向导(模型、渠道、Skills、Gateway 网关)。
|
||||
|
||||
### `config`
|
||||
|
||||
非交互式配置辅助工具(get/set/unset)。不带子命令运行 `openclaw config` 将启动向导。
|
||||
非交互式配置辅助工具(get/set/unset)。不带子命令运行 `openclaw config` 会启动向导。
|
||||
|
||||
子命令:
|
||||
|
||||
- `config get <path>`:打印配置值(点号/方括号路径)。
|
||||
- `config get <path>`:打印配置值(点/括号路径)。
|
||||
- `config set <path> <value>`:设置值(JSON5 或原始字符串)。
|
||||
- `config unset <path>`:移除值。
|
||||
- `config unset <path>`:删除值。
|
||||
|
||||
### `doctor`
|
||||
|
||||
健康检查和快速修复(配置 + Gateway网关 + 旧版服务)。
|
||||
健康检查 + 快速修复(配置 + Gateway 网关 + 旧版服务)。
|
||||
|
||||
选项:
|
||||
|
||||
- `--no-workspace-suggestions`:禁用工作区记忆提示。
|
||||
- `--yes`:无需提示接受默认值(无头模式)。
|
||||
- `--yes`:无提示接受默认值(无头模式)。
|
||||
- `--non-interactive`:跳过提示;仅应用安全迁移。
|
||||
- `--deep`:扫描系统服务以查找额外的 Gateway网关安装。
|
||||
- `--deep`:扫描系统服务以查找额外的 Gateway 网关安装。
|
||||
|
||||
## 渠道辅助工具
|
||||
|
||||
### `channels`
|
||||
|
||||
管理聊天渠道账号(WhatsApp/Telegram/Discord/Google Chat/Slack/Mattermost(插件)/Signal/iMessage/MS Teams)。
|
||||
管理聊天渠道账户(WhatsApp/Telegram/Discord/Google Chat/Slack/Mattermost(插件)/Signal/iMessage/MS Teams)。
|
||||
|
||||
子命令:
|
||||
|
||||
- `channels list`:显示已配置的渠道和认证配置。
|
||||
- `channels status`:检查 Gateway网关可达性和渠道健康状态(`--probe` 运行额外检查;使用 `openclaw health` 或 `openclaw status --deep` 进行 Gateway网关健康探测)。
|
||||
- 提示:`channels status` 在检测到常见配置错误时会打印警告并提供修复建议(然后引导你使用 `openclaw doctor`)。
|
||||
- `channels logs`:显示来自 Gateway网关日志文件的最近渠道日志。
|
||||
- `channels add`:不传参数时以向导模式设置;传入参数则切换为非交互模式。
|
||||
- `channels remove`:默认仅禁用;传入 `--delete` 可无提示删除配置条目。
|
||||
- `channels list`:显示已配置的渠道和认证配置文件。
|
||||
- `channels status`:检查 Gateway 网关可达性和渠道健康状况(`--probe` 运行额外检查;使用 `openclaw health` 或 `openclaw status --deep` 进行 Gateway 网关健康探测)。
|
||||
- 提示:`channels status` 在检测到常见配置错误时会打印带有建议修复的警告(然后指向 `openclaw doctor`)。
|
||||
- `channels logs`:显示 Gateway 网关日志文件中最近的渠道日志。
|
||||
- `channels add`:不传标志时使用向导式设置;标志切换到非交互模式。
|
||||
- `channels remove`:默认禁用;传 `--delete` 可无提示删除配置条目。
|
||||
- `channels login`:交互式渠道登录(仅限 WhatsApp Web)。
|
||||
- `channels logout`:登出渠道会话(如果支持)。
|
||||
- `channels logout`:登出渠道会话(如支持)。
|
||||
|
||||
通用选项:
|
||||
|
||||
- `--channel <name>`:`whatsapp|telegram|discord|googlechat|slack|mattermost|signal|imessage|msteams`
|
||||
- `--account <id>`:渠道账号 ID(默认 `default`)
|
||||
- `--name <label>`:账号的显示名称
|
||||
- `--account <id>`:渠道账户 id(默认 `default`)
|
||||
- `--name <label>`:账户的显示名称
|
||||
|
||||
`channels login` 选项:
|
||||
|
||||
@@ -406,7 +406,7 @@ openclaw [--dev] [--profile <name>] <command>
|
||||
`channels list` 选项:
|
||||
|
||||
- `--no-usage`:跳过模型提供商用量/配额快照(仅限 OAuth/API 支持的)。
|
||||
- `--json`:输出 JSON(除非设置了 `--no-usage`,否则包含用量信息)。
|
||||
- `--json`:输出 JSON(除非设置 `--no-usage`,否则包含用量)。
|
||||
|
||||
`channels logs` 选项:
|
||||
|
||||
@@ -428,25 +428,25 @@ openclaw status --deep
|
||||
|
||||
### `skills`
|
||||
|
||||
列出和检查可用 Skills 及就绪信息。
|
||||
列出和检查可用的 Skills 及就绪信息。
|
||||
|
||||
子命令:
|
||||
|
||||
- `skills list`:列出 Skills(无子命令时的默认行为)。
|
||||
- `skills info <name>`:显示某个 Skills 的详情。
|
||||
- `skills info <name>`:显示单个 Skill 的详情。
|
||||
- `skills check`:就绪与缺失需求的摘要。
|
||||
|
||||
选项:
|
||||
|
||||
- `--eligible`:仅显示就绪的 Skills。
|
||||
- `--json`:输出 JSON(无样式)。
|
||||
- `-v`、`--verbose`:包含缺失需求的详情。
|
||||
- `-v`、`--verbose`:包含缺失需求详情。
|
||||
|
||||
提示:使用 `npx clawhub` 搜索、安装和同步 Skills。
|
||||
|
||||
### `pairing`
|
||||
|
||||
跨渠道审批私聊配对请求。
|
||||
批准跨渠道的私信配对请求。
|
||||
|
||||
子命令:
|
||||
|
||||
@@ -455,12 +455,12 @@ openclaw status --deep
|
||||
|
||||
### `webhooks gmail`
|
||||
|
||||
Gmail Pub/Sub 钩子设置与运行。参见 [/automation/gmail-pubsub](/automation/gmail-pubsub)。
|
||||
Gmail Pub/Sub 钩子设置 + 运行器。参见 [/automation/gmail-pubsub](/automation/gmail-pubsub)。
|
||||
|
||||
子命令:
|
||||
|
||||
- `webhooks gmail setup`(需要 `--account <email>`;支持 `--project`、`--topic`、`--subscription`、`--label`、`--hook-url`、`--hook-token`、`--push-token`、`--bind`、`--port`、`--path`、`--include-body`、`--max-bytes`、`--renew-minutes`、`--tailscale`、`--tailscale-path`、`--tailscale-target`、`--push-endpoint`、`--json`)
|
||||
- `webhooks gmail run`(相同参数的运行时覆盖)
|
||||
- `webhooks gmail run`(相同标志的运行时覆盖)
|
||||
|
||||
### `dns setup`
|
||||
|
||||
@@ -470,11 +470,11 @@ Gmail Pub/Sub 钩子设置与运行。参见 [/automation/gmail-pubsub](/automat
|
||||
|
||||
- `--apply`:安装/更新 CoreDNS 配置(需要 sudo;仅限 macOS)。
|
||||
|
||||
## 消息与智能体
|
||||
## 消息 + 智能体
|
||||
|
||||
### `message`
|
||||
|
||||
统一的出站消息和渠道操作。
|
||||
统一的出站消息 + 渠道操作。
|
||||
|
||||
参见:[/cli/message](/cli/message)
|
||||
|
||||
@@ -497,7 +497,7 @@ Gmail Pub/Sub 钩子设置与运行。参见 [/automation/gmail-pubsub](/automat
|
||||
|
||||
### `agent`
|
||||
|
||||
通过 Gateway网关(或 `--local` 嵌入模式)运行一个智能体回合。
|
||||
通过 Gateway 网关运行一个智能体回合(或使用 `--local` 嵌入式运行)。
|
||||
|
||||
必需:
|
||||
|
||||
@@ -505,7 +505,7 @@ Gmail Pub/Sub 钩子设置与运行。参见 [/automation/gmail-pubsub](/automat
|
||||
|
||||
选项:
|
||||
|
||||
- `--to <dest>`(用于会话键和可选的投递)
|
||||
- `--to <dest>`(用于会话键和可选发送)
|
||||
- `--session-id <id>`
|
||||
- `--thinking <off|minimal|low|medium|high|xhigh>`(仅限 GPT-5.2 + Codex 模型)
|
||||
- `--verbose <on|full|off>`
|
||||
@@ -530,7 +530,7 @@ Gmail Pub/Sub 钩子设置与运行。参见 [/automation/gmail-pubsub](/automat
|
||||
|
||||
#### `agents add [name]`
|
||||
|
||||
添加新的隔离智能体。除非传入参数(或 `--non-interactive`),否则运行引导向导;非交互模式下 `--workspace` 为必需。
|
||||
添加新的隔离智能体。除非传入标志(或 `--non-interactive`),否则运行引导向导;非交互模式下 `--workspace` 是必需的。
|
||||
|
||||
选项:
|
||||
|
||||
@@ -541,11 +541,11 @@ Gmail Pub/Sub 钩子设置与运行。参见 [/automation/gmail-pubsub](/automat
|
||||
- `--non-interactive`
|
||||
- `--json`
|
||||
|
||||
绑定规格使用 `channel[:accountId]`。当 WhatsApp 省略 `accountId` 时,使用默认账号 ID。
|
||||
绑定规范使用 `channel[:accountId]`。对于 WhatsApp,省略 `accountId` 时使用默认账户 id。
|
||||
|
||||
#### `agents delete <id>`
|
||||
|
||||
删除智能体并清理其工作区和状态。
|
||||
删除智能体并清理其工作区 + 状态。
|
||||
|
||||
选项:
|
||||
|
||||
@@ -554,13 +554,13 @@ Gmail Pub/Sub 钩子设置与运行。参见 [/automation/gmail-pubsub](/automat
|
||||
|
||||
### `acp`
|
||||
|
||||
运行将 IDE 连接到 Gateway网关的 ACP 桥接。
|
||||
运行连接 IDE 到 Gateway 网关的 ACP 桥接。
|
||||
|
||||
参见 [`acp`](/cli/acp) 获取完整选项和示例。
|
||||
完整选项和示例参见 [`acp`](/cli/acp)。
|
||||
|
||||
### `status`
|
||||
|
||||
显示已关联会话的健康状态和最近的接收者。
|
||||
显示关联会话健康状况和最近的收件人。
|
||||
|
||||
选项:
|
||||
|
||||
@@ -574,28 +574,28 @@ Gmail Pub/Sub 钩子设置与运行。参见 [/automation/gmail-pubsub](/automat
|
||||
|
||||
说明:
|
||||
|
||||
- 概览在可用时包含 Gateway网关 + 节点主机服务状态。
|
||||
- 概览包含 Gateway 网关 + 节点主机服务状态(如可用)。
|
||||
|
||||
### 用量追踪
|
||||
### 用量跟踪
|
||||
|
||||
当 OAuth/API 凭证可用时,OpenClaw 可以展示提供商的用量/配额信息。
|
||||
当 OAuth/API 凭证可用时,OpenClaw 可以显示提供商用量/配额。
|
||||
|
||||
展示位置:
|
||||
显示位置:
|
||||
|
||||
- `/status`(可用时添加简短的提供商用量行)
|
||||
- `openclaw status --usage`(打印完整的提供商用量明细)
|
||||
- macOS 菜单栏(Context 下的用量部分)
|
||||
- `openclaw status --usage`(打印完整的提供商明细)
|
||||
- macOS 菜单栏(上下文下的用量部分)
|
||||
|
||||
说明:
|
||||
|
||||
- 数据直接来自提供商的用量端点(非估算值)。
|
||||
- 提供商:Anthropic、GitHub Copilot、OpenAI Codex OAuth,以及启用相应提供商插件时的 Gemini CLI/Antigravity。
|
||||
- 如果没有匹配的凭证,用量信息将被隐藏。
|
||||
- 详情:参见 [用量追踪](/concepts/usage-tracking)。
|
||||
- 数据直接来自提供商用量端点(非估算)。
|
||||
- 提供商:Anthropic、GitHub Copilot、OpenAI Codex OAuth,以及启用这些提供商插件时的 Gemini CLI/Antigravity。
|
||||
- 如果没有匹配的凭证,用量会被隐藏。
|
||||
- 详情:参见[用量跟踪](/concepts/usage-tracking)。
|
||||
|
||||
### `health`
|
||||
|
||||
从运行中的 Gateway网关获取健康状态。
|
||||
从运行中的 Gateway 网关获取健康状态。
|
||||
|
||||
选项:
|
||||
|
||||
@@ -605,7 +605,7 @@ Gmail Pub/Sub 钩子设置与运行。参见 [/automation/gmail-pubsub](/automat
|
||||
|
||||
### `sessions`
|
||||
|
||||
列出已存储的对话会话。
|
||||
列出存储的对话会话。
|
||||
|
||||
选项:
|
||||
|
||||
@@ -629,11 +629,11 @@ Gmail Pub/Sub 钩子设置与运行。参见 [/automation/gmail-pubsub](/automat
|
||||
|
||||
说明:
|
||||
|
||||
- `--non-interactive` 需要同时指定 `--scope` 和 `--yes`。
|
||||
- `--non-interactive` 需要 `--scope` 和 `--yes`。
|
||||
|
||||
### `uninstall`
|
||||
|
||||
卸载 Gateway网关服务和本地数据(CLI 保留)。
|
||||
卸载 Gateway 网关服务 + 本地数据(CLI 保留)。
|
||||
|
||||
选项:
|
||||
|
||||
@@ -650,11 +650,11 @@ Gmail Pub/Sub 钩子设置与运行。参见 [/automation/gmail-pubsub](/automat
|
||||
|
||||
- `--non-interactive` 需要 `--yes` 和明确的范围(或 `--all`)。
|
||||
|
||||
## Gateway网关
|
||||
## Gateway 网关
|
||||
|
||||
### `gateway`
|
||||
|
||||
运行 WebSocket Gateway网关。
|
||||
运行 WebSocket Gateway 网关。
|
||||
|
||||
选项:
|
||||
|
||||
@@ -667,7 +667,7 @@ Gmail Pub/Sub 钩子设置与运行。参见 [/automation/gmail-pubsub](/automat
|
||||
- `--tailscale-reset-on-exit`
|
||||
- `--allow-unconfigured`
|
||||
- `--dev`
|
||||
- `--reset`(重置开发配置 + 凭证 + 会话 + 工作区)
|
||||
- `--reset`(重置 dev 配置 + 凭证 + 会话 + 工作区)
|
||||
- `--force`(终止端口上的现有监听器)
|
||||
- `--verbose`
|
||||
- `--claude-cli-logs`
|
||||
@@ -678,11 +678,11 @@ Gmail Pub/Sub 钩子设置与运行。参见 [/automation/gmail-pubsub](/automat
|
||||
|
||||
### `gateway service`
|
||||
|
||||
管理 Gateway网关服务(launchd/systemd/schtasks)。
|
||||
管理 Gateway 网关服务(launchd/systemd/schtasks)。
|
||||
|
||||
子命令:
|
||||
|
||||
- `gateway status`(默认探测 Gateway网关 RPC)
|
||||
- `gateway status`(默认探测 Gateway 网关 RPC)
|
||||
- `gateway install`(服务安装)
|
||||
- `gateway uninstall`
|
||||
- `gateway start`
|
||||
@@ -691,21 +691,21 @@ Gmail Pub/Sub 钩子设置与运行。参见 [/automation/gmail-pubsub](/automat
|
||||
|
||||
说明:
|
||||
|
||||
- `gateway status` 默认使用服务解析的端口/配置探测 Gateway网关 RPC(可通过 `--url/--token/--password` 覆盖)。
|
||||
- `gateway status` 支持 `--no-probe`、`--deep` 和 `--json` 用于脚本编写。
|
||||
- `gateway status` 还会在检测到旧版或额外的 Gateway网关服务时展示(`--deep` 添加系统级扫描)。以配置文件命名的 OpenClaw 服务被视为正式服务,不会被标记为"额外"。
|
||||
- `gateway status` 会打印 CLI 使用的配置路径与服务可能使用的配置(服务环境变量),以及解析后的探测目标 URL。
|
||||
- `gateway install|uninstall|start|stop|restart` 支持 `--json` 用于脚本编写(默认输出保持人类可读)。
|
||||
- `gateway install` 默认使用 Node 运行时;**不建议**使用 bun(WhatsApp/Telegram 存在 bug)。
|
||||
- `gateway status` 默认使用服务解析的端口/配置探测 Gateway 网关 RPC(使用 `--url/--token/--password` 覆盖)。
|
||||
- `gateway status` 支持 `--no-probe`、`--deep` 和 `--json` 用于脚本化。
|
||||
- `gateway status` 在检测到旧版或额外的 Gateway 网关服务时也会显示(`--deep` 添加系统级扫描)。配置文件命名的 OpenClaw 服务被视为一等公民,不会被标记为"额外"。
|
||||
- `gateway status` 打印 CLI 使用的配置路径与服务可能使用的配置(服务环境),以及解析的探测目标 URL。
|
||||
- `gateway install|uninstall|start|stop|restart` 支持 `--json` 用于脚本化(默认输出保持人类友好)。
|
||||
- `gateway install` 默认使用 Node 运行时;**不建议**使用 bun(WhatsApp/Telegram bug)。
|
||||
- `gateway install` 选项:`--port`、`--runtime`、`--token`、`--force`、`--json`。
|
||||
|
||||
### `logs`
|
||||
|
||||
通过 RPC 追踪 Gateway网关文件日志。
|
||||
通过 RPC 跟踪 Gateway 网关文件日志。
|
||||
|
||||
说明:
|
||||
|
||||
- TTY 会话渲染彩色结构化视图;非 TTY 回退为纯文本。
|
||||
- TTY 会话渲染彩色、结构化视图;非 TTY 回退到纯文本。
|
||||
- `--json` 输出行分隔的 JSON(每行一个日志事件)。
|
||||
|
||||
示例:
|
||||
@@ -720,7 +720,7 @@ openclaw logs --no-color
|
||||
|
||||
### `gateway <subcommand>`
|
||||
|
||||
Gateway网关 CLI 辅助工具(RPC 子命令使用 `--url`、`--token`、`--password`、`--timeout`、`--expect-final`)。
|
||||
Gateway 网关 CLI 辅助工具(RPC 子命令使用 `--url`、`--token`、`--password`、`--timeout`、`--expect-final`)。
|
||||
|
||||
子命令:
|
||||
|
||||
@@ -732,7 +732,7 @@ Gateway网关 CLI 辅助工具(RPC 子命令使用 `--url`、`--token`、`--pa
|
||||
- `gateway install|uninstall|start|stop|restart`
|
||||
- `gateway run`
|
||||
|
||||
常用 RPC:
|
||||
常见 RPC:
|
||||
|
||||
- `config.apply`(验证 + 写入配置 + 重启 + 唤醒)
|
||||
- `config.patch`(合并部分更新 + 重启 + 唤醒)
|
||||
@@ -742,9 +742,9 @@ Gateway网关 CLI 辅助工具(RPC 子命令使用 `--url`、`--token`、`--pa
|
||||
|
||||
## 模型
|
||||
|
||||
参见 [/concepts/models](/concepts/models) 了解回退行为和扫描策略。
|
||||
回退行为和扫描策略参见 [/concepts/models](/concepts/models)。
|
||||
|
||||
推荐的 Anthropic 认证方式(setup-token):
|
||||
首选 Anthropic 认证(setup-token):
|
||||
|
||||
```bash
|
||||
claude setup-token
|
||||
@@ -777,16 +777,15 @@ openclaw models status
|
||||
|
||||
- `--json`
|
||||
- `--plain`
|
||||
- `--check`(退出码 1=已过期/缺失,2=即将过期)
|
||||
- `--probe`(对已配置的认证配置进行实时探测)
|
||||
- `--check`(退出码 1=过期/缺失,2=即将过期)
|
||||
- `--probe`(对已配置认证配置文件进行实时探测)
|
||||
- `--probe-provider <name>`
|
||||
- `--probe-profile <id>`(可重复或逗号分隔)
|
||||
- `--probe-profile <id>`(重复或逗号分隔)
|
||||
- `--probe-timeout <ms>`
|
||||
- `--probe-concurrency <n>`
|
||||
- `--probe-max-tokens <n>`
|
||||
|
||||
始终包含认证概览和认证存储中配置的 OAuth 过期状态。
|
||||
`--probe` 运行实时请求(可能消耗令牌并触发速率限制)。
|
||||
始终包含认证概览和认证存储中配置文件的 OAuth 过期状态。`--probe` 运行实时请求(可能消耗令牌并触发速率限制)。
|
||||
|
||||
### `models set <model>`
|
||||
|
||||
@@ -859,7 +858,7 @@ openclaw models status
|
||||
|
||||
### `system event`
|
||||
|
||||
入队系统事件并可选触发心跳(Gateway网关 RPC)。
|
||||
将系统事件加入队列并可选触发心跳(Gateway 网关 RPC)。
|
||||
|
||||
必需:
|
||||
|
||||
@@ -873,7 +872,7 @@ openclaw models status
|
||||
|
||||
### `system heartbeat last|enable|disable`
|
||||
|
||||
心跳控制(Gateway网关 RPC)。
|
||||
心跳控制(Gateway 网关 RPC)。
|
||||
|
||||
选项:
|
||||
|
||||
@@ -882,7 +881,7 @@ openclaw models status
|
||||
|
||||
### `system presence`
|
||||
|
||||
列出系统存在条目(Gateway网关 RPC)。
|
||||
列出系统存在条目(Gateway 网关 RPC)。
|
||||
|
||||
选项:
|
||||
|
||||
@@ -891,14 +890,14 @@ openclaw models status
|
||||
|
||||
## 定时任务
|
||||
|
||||
管理调度作业(Gateway网关 RPC)。参见 [/automation/cron-jobs](/automation/cron-jobs)。
|
||||
管理计划任务(Gateway 网关 RPC)。参见 [/automation/cron-jobs](/automation/cron-jobs)。
|
||||
|
||||
子命令:
|
||||
|
||||
- `cron status [--json]`
|
||||
- `cron list [--all] [--json]`(默认表格输出;使用 `--json` 获取原始数据)
|
||||
- `cron add`(别名:`create`;需要 `--name` 和 `--at` | `--every` | `--cron` 三选一,以及 `--system-event` | `--message` 二选一的负载)
|
||||
- `cron edit <id>`(修补字段)
|
||||
- `cron add`(别名:`create`;需要 `--name` 和 `--at` | `--every` | `--cron` 三选一,以及 `--system-event` | `--message` 负载二选一)
|
||||
- `cron edit <id>`(补丁字段)
|
||||
- `cron rm <id>`(别名:`remove`、`delete`)
|
||||
- `cron enable <id>`
|
||||
- `cron disable <id>`
|
||||
@@ -922,7 +921,7 @@ openclaw models status
|
||||
|
||||
## 节点
|
||||
|
||||
`nodes` 与 Gateway网关通信并操作已配对的节点。参见 [/nodes](/nodes)。
|
||||
`nodes` 与 Gateway 网关通信并针对已配对的节点。参见 [/nodes](/nodes)。
|
||||
|
||||
通用选项:
|
||||
|
||||
@@ -938,16 +937,16 @@ openclaw models status
|
||||
- `nodes reject <requestId>`
|
||||
- `nodes rename --node <id|name|ip> --name <displayName>`
|
||||
- `nodes invoke --node <id|name|ip> --command <command> [--params <json>] [--invoke-timeout <ms>] [--idempotency-key <key>]`
|
||||
- `nodes run --node <id|name|ip> [--cwd <path>] [--env KEY=VAL] [--command-timeout <ms>] [--needs-screen-recording] [--invoke-timeout <ms>] <command...>`(Mac 节点或无头节点主机)
|
||||
- `nodes notify --node <id|name|ip> [--title <text>] [--body <text>] [--sound <name>] [--priority <passive|active|timeSensitive>] [--delivery <system|overlay|auto>] [--invoke-timeout <ms>]`(仅限 Mac)
|
||||
- `nodes run --node <id|name|ip> [--cwd <path>] [--env KEY=VAL] [--command-timeout <ms>] [--needs-screen-recording] [--invoke-timeout <ms>] <command...>`(mac 节点或无头节点主机)
|
||||
- `nodes notify --node <id|name|ip> [--title <text>] [--body <text>] [--sound <name>] [--priority <passive|active|timeSensitive>] [--delivery <system|overlay|auto>] [--invoke-timeout <ms>]`(仅限 mac)
|
||||
|
||||
摄像头:
|
||||
相机:
|
||||
|
||||
- `nodes camera list --node <id|name|ip>`
|
||||
- `nodes camera snap --node <id|name|ip> [--facing front|back|both] [--device-id <id>] [--max-width <px>] [--quality <0-1>] [--delay-ms <ms>] [--invoke-timeout <ms>]`
|
||||
- `nodes camera clip --node <id|name|ip> [--facing front|back] [--device-id <id>] [--duration <ms|10s|1m>] [--no-audio] [--invoke-timeout <ms>]`
|
||||
|
||||
画布与屏幕:
|
||||
画布 + 屏幕:
|
||||
|
||||
- `nodes canvas snapshot --node <id|name|ip> [--format png|jpg|jpeg] [--max-width <px>] [--quality <0-1>] [--invoke-timeout <ms>]`
|
||||
- `nodes canvas present --node <id|name|ip> [--target <urlOrPath>] [--x <px>] [--y <px>] [--width <px>] [--height <px>] [--invoke-timeout <ms>]`
|
||||
@@ -1018,7 +1017,7 @@ openclaw models status
|
||||
|
||||
### `tui`
|
||||
|
||||
打开连接到 Gateway网关的终端 UI。
|
||||
打开连接到 Gateway 网关的终端 UI。
|
||||
|
||||
选项:
|
||||
|
||||
|
||||
@@ -1,21 +1,21 @@
|
||||
---
|
||||
read_when:
|
||||
- 需要远程查看 Gateway网关日志(无需 SSH)
|
||||
- 需要 JSON 格式的日志行以供工具使用
|
||||
summary: 通过 RPC 查看 Gateway网关日志的 `openclaw logs` CLI 参考
|
||||
- 你需要远程跟踪 Gateway 网关日志(无需 SSH)
|
||||
- 你需要 JSON 日志行用于工具处理
|
||||
summary: "`openclaw logs` 的 CLI 参考(通过 RPC 跟踪 Gateway 网关日志)"
|
||||
title: logs
|
||||
x-i18n:
|
||||
generated_at: "2026-02-01T20:21:08Z"
|
||||
generated_at: "2026-02-03T07:44:57Z"
|
||||
model: claude-opus-4-5
|
||||
provider: pi
|
||||
source_hash: 911a57f0f3b78412c26312f7bf87a5a26418ab7b74e5e2eb40f16edefb6c6b8e
|
||||
source_path: cli/logs.md
|
||||
workflow: 14
|
||||
workflow: 15
|
||||
---
|
||||
|
||||
# `openclaw logs`
|
||||
|
||||
通过 RPC 实时查看 Gateway网关文件日志(支持远程模式)。
|
||||
通过 RPC 跟踪 Gateway 网关文件日志(在远程模式下可用)。
|
||||
|
||||
相关内容:
|
||||
|
||||
|
||||
@@ -2,37 +2,37 @@
|
||||
read_when:
|
||||
- 运行无头节点主机
|
||||
- 为 system.run 配对非 macOS 节点
|
||||
summary: "`openclaw node`(无头节点主机)的 CLI 参考"
|
||||
summary: "`openclaw node` 的 CLI 参考(无头节点主机)"
|
||||
title: node
|
||||
x-i18n:
|
||||
generated_at: "2026-02-01T20:21:18Z"
|
||||
generated_at: "2026-02-03T07:45:07Z"
|
||||
model: claude-opus-4-5
|
||||
provider: pi
|
||||
source_hash: a8b1a57712663e2285c9ecd306fe57d067eb3e6820d7d8aec650b41b022d995a
|
||||
source_path: cli/node.md
|
||||
workflow: 14
|
||||
workflow: 15
|
||||
---
|
||||
|
||||
# `openclaw node`
|
||||
|
||||
运行一个**无头节点主机**,连接到 Gateway网关 WebSocket 并在本机上暴露
|
||||
运行一个**无头节点主机**,连接到 Gateway 网关 WebSocket 并在此机器上暴露
|
||||
`system.run` / `system.which`。
|
||||
|
||||
## 为什么使用节点主机?
|
||||
|
||||
当你希望智能体**在网络中的其他机器上运行命令**,而无需在那些机器上安装完整的 macOS 伴侣应用时,可以使用节点主机。
|
||||
当你希望智能体**在网络中的其他机器上运行命令**,而无需在那里安装完整的 macOS 配套应用时,请使用节点主机。
|
||||
|
||||
常见用例:
|
||||
|
||||
- 在远程 Linux/Windows 机器上运行命令(构建服务器、实验室机器、NAS)。
|
||||
- 在 Gateway网关上保持执行**沙箱隔离**,但将已批准的运行委派给其他主机。
|
||||
- 在 Gateway 网关上保持执行的**沙箱隔离**,但将批准的运行委托给其他主机。
|
||||
- 为自动化或 CI 节点提供轻量级、无头的执行目标。
|
||||
|
||||
执行仍受**执行审批**和节点主机上的按智能体白名单保护,因此你可以保持命令访问的范围明确可控。
|
||||
执行仍然受**执行批准**和节点主机上的每智能体允许列表保护,因此你可以保持命令访问的范围明确。
|
||||
|
||||
## 浏览器代理(零配置)
|
||||
|
||||
如果节点上的 `browser.enabled` 未被禁用,节点主机会自动通告浏览器代理。这使智能体无需额外配置即可在该节点上使用浏览器自动化。
|
||||
如果节点上的 `browser.enabled` 未被禁用,节点主机会自动广播浏览器代理。这让智能体无需额外配置即可在该节点上使用浏览器自动化。
|
||||
|
||||
如需在节点上禁用:
|
||||
|
||||
@@ -46,7 +46,7 @@ x-i18n:
|
||||
}
|
||||
```
|
||||
|
||||
## 前台运行
|
||||
## 运行(前台)
|
||||
|
||||
```bash
|
||||
openclaw node run --host <gateway-host> --port 18789
|
||||
@@ -54,14 +54,14 @@ openclaw node run --host <gateway-host> --port 18789
|
||||
|
||||
选项:
|
||||
|
||||
- `--host <host>`:Gateway网关 WebSocket 主机(默认:`127.0.0.1`)
|
||||
- `--port <port>`:Gateway网关 WebSocket 端口(默认:`18789`)
|
||||
- `--tls`:为 Gateway网关连接使用 TLS
|
||||
- `--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(清除配对令牌)
|
||||
- `--node-id <id>`:覆盖节点 id(清除配对 token)
|
||||
- `--display-name <name>`:覆盖节点显示名称
|
||||
|
||||
## 服务(后台运行)
|
||||
## 服务(后台)
|
||||
|
||||
将无头节点主机安装为用户服务。
|
||||
|
||||
@@ -71,11 +71,11 @@ openclaw node install --host <gateway-host> --port 18789
|
||||
|
||||
选项:
|
||||
|
||||
- `--host <host>`:Gateway网关 WebSocket 主机(默认:`127.0.0.1`)
|
||||
- `--port <port>`:Gateway网关 WebSocket 端口(默认:`18789`)
|
||||
- `--tls`:为 Gateway网关连接使用 TLS
|
||||
- `--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(清除配对令牌)
|
||||
- `--node-id <id>`:覆盖节点 id(清除配对 token)
|
||||
- `--display-name <name>`:覆盖节点显示名称
|
||||
- `--runtime <runtime>`:服务运行时(`node` 或 `bun`)
|
||||
- `--force`:如果已安装则重新安装/覆盖
|
||||
@@ -89,13 +89,13 @@ openclaw node restart
|
||||
openclaw node uninstall
|
||||
```
|
||||
|
||||
使用 `openclaw node run` 进行前台节点主机运行(无服务)。
|
||||
使用 `openclaw node run` 运行前台节点主机(无服务)。
|
||||
|
||||
服务命令支持 `--json` 以获取机器可读输出。
|
||||
服务命令接受 `--json` 以获取机器可读输出。
|
||||
|
||||
## 配对
|
||||
|
||||
首次连接会在 Gateway网关上创建一个待处理的节点配对请求。
|
||||
首次连接会在 Gateway 网关上创建待处理的节点配对请求。
|
||||
通过以下方式批准:
|
||||
|
||||
```bash
|
||||
@@ -103,13 +103,13 @@ openclaw nodes pending
|
||||
openclaw nodes approve <requestId>
|
||||
```
|
||||
|
||||
节点主机将其节点 ID、令牌、显示名称和 Gateway网关连接信息存储在
|
||||
节点主机将其节点 id、token、显示名称和 Gateway 网关连接信息存储在
|
||||
`~/.openclaw/node.json` 中。
|
||||
|
||||
## 执行审批
|
||||
## 执行批准
|
||||
|
||||
`system.run` 受本地执行审批控制:
|
||||
`system.run` 受本地执行批准限制:
|
||||
|
||||
- `~/.openclaw/exec-approvals.json`
|
||||
- [执行审批](/tools/exec-approvals)
|
||||
- `openclaw approvals --node <id|name|ip>`(从 Gateway网关编辑)
|
||||
- [执行批准](/tools/exec-approvals)
|
||||
- `openclaw approvals --node <id|name|ip>`(从 Gateway 网关编辑)
|
||||
|
||||
@@ -1,21 +1,21 @@
|
||||
---
|
||||
read_when:
|
||||
- 正在管理配对节点(摄像头、屏幕、画布)
|
||||
- 需要批准请求或调用节点命令
|
||||
summary: 管理配对节点(列表/状态/批准/调用,摄像头/画布/屏幕)的 `openclaw nodes` CLI 参考
|
||||
- 你正在管理已配对的节点(摄像头、屏幕、画布)
|
||||
- 你需要批准请求或调用节点命令
|
||||
summary: "`openclaw nodes` 的 CLI 参考(列表/状态/批准/调用,摄像头/画布/屏幕)"
|
||||
title: nodes
|
||||
x-i18n:
|
||||
generated_at: "2026-02-01T20:21:19Z"
|
||||
generated_at: "2026-02-03T10:04:26Z"
|
||||
model: claude-opus-4-5
|
||||
provider: pi
|
||||
source_hash: 23da6efdd659a82dbbc4afd18eb4ab1020a2892f69c28d610f912c8a799f734c
|
||||
source_path: cli/nodes.md
|
||||
workflow: 14
|
||||
workflow: 15
|
||||
---
|
||||
|
||||
# `openclaw nodes`
|
||||
|
||||
管理配对节点(设备)并调用节点功能。
|
||||
管理已配对的节点(设备)并调用节点功能。
|
||||
|
||||
相关内容:
|
||||
|
||||
@@ -23,7 +23,7 @@ x-i18n:
|
||||
- 摄像头:[摄像头节点](/nodes/camera)
|
||||
- 图像:[图像节点](/nodes/images)
|
||||
|
||||
常用选项:
|
||||
通用选项:
|
||||
|
||||
- `--url`、`--token`、`--timeout`、`--json`
|
||||
|
||||
@@ -40,8 +40,9 @@ openclaw nodes status --connected
|
||||
openclaw nodes status --last-connected 24h
|
||||
```
|
||||
|
||||
`nodes list` 输出待处理/已配对的表格。已配对的行包含最近一次连接的时间间隔(Last Connect)。
|
||||
使用 `--connected` 仅显示当前已连接的节点。使用 `--last-connected <duration>` 筛选在指定时间段内连接过的节点(例如 `24h`、`7d`)。
|
||||
`nodes list` 打印待处理/已配对表格。已配对行包含最近连接时长(Last Connect)。
|
||||
使用 `--connected` 仅显示当前已连接的节点。使用 `--last-connected <duration>`
|
||||
筛选在指定时间段内连接过的节点(例如 `24h`、`7d`)。
|
||||
|
||||
## 调用 / 运行
|
||||
|
||||
@@ -55,24 +56,24 @@ openclaw nodes run --agent main --node <id|name|ip> --raw "git status"
|
||||
调用标志:
|
||||
|
||||
- `--params <json>`:JSON 对象字符串(默认 `{}`)。
|
||||
- `--invoke-timeout <ms>`:节点调用超时时间(默认 `15000`)。
|
||||
- `--invoke-timeout <ms>`:节点调用超时(默认 `15000`)。
|
||||
- `--idempotency-key <key>`:可选的幂等键。
|
||||
|
||||
### Exec 风格的默认行为
|
||||
### Exec 风格默认值
|
||||
|
||||
`nodes run` 模拟模型的 exec 行为(默认值 + 审批):
|
||||
`nodes run` 与模型的 exec 行为一致(默认值 + 审批):
|
||||
|
||||
- 读取 `tools.exec.*`(以及 `agents.list[].tools.exec.*` 的覆盖配置)。
|
||||
- 在调用 `system.run` 之前使用 exec 审批(`exec.approval.request`)。
|
||||
- 当设置了 `tools.exec.node` 时,可以省略 `--node`。
|
||||
- 需要一个声明支持 `system.run` 的节点(macOS 伴侣应用或无头节点主机)。
|
||||
- 读取 `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`)。
|
||||
- `--env <key=val>`:环境变量覆盖(可重复)。
|
||||
- `--command-timeout <ms>`:命令超时。
|
||||
- `--invoke-timeout <ms>`:节点调用超时(默认 `30000`)。
|
||||
- `--needs-screen-recording`:要求屏幕录制权限。
|
||||
- `--raw <command>`:运行 shell 字符串(`/bin/sh -lc` 或 `cmd.exe /c`)。
|
||||
- `--agent <id>`:智能体范围的审批/白名单(默认为已配置的智能体)。
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
---
|
||||
read_when:
|
||||
- 你想要通过引导式设置配置 Gateway网关、工作区、认证、渠道和 Skills
|
||||
summary: "`openclaw onboard`(交互式新手引导向导)的 CLI 参考"
|
||||
- 你想要 Gateway 网关、工作区、认证、渠道和 Skills 的引导式设置
|
||||
summary: "`openclaw onboard` 的 CLI 参考(交互式新手引导向导)"
|
||||
title: onboard
|
||||
x-i18n:
|
||||
generated_at: "2026-02-01T20:21:15Z"
|
||||
generated_at: "2026-02-03T07:45:00Z"
|
||||
model: claude-opus-4-5
|
||||
provider: pi
|
||||
source_hash: a661049a6983233986a880a68440a3bcc6869ee2c4c6f5e9f3ab8ff973e22f60
|
||||
source_path: cli/onboard.md
|
||||
workflow: 14
|
||||
workflow: 15
|
||||
---
|
||||
|
||||
# `openclaw onboard`
|
||||
|
||||
交互式新手引导向导(本地或远程 Gateway网关设置)。
|
||||
交互式新手引导向导(本地或远程 Gateway 网关设置)。
|
||||
|
||||
相关内容:
|
||||
|
||||
@@ -31,6 +31,6 @@ openclaw onboard --mode remote --remote-url ws://gateway-host:18789
|
||||
|
||||
流程说明:
|
||||
|
||||
- `quickstart`:最少提示,自动生成 Gateway网关令牌。
|
||||
- `quickstart`:最少提示,自动生成 Gateway 网关令牌。
|
||||
- `manual`:完整的端口/绑定/认证提示(`advanced` 的别名)。
|
||||
- 最快开始聊天的方式:`openclaw dashboard`(控制台 UI,无需渠道设置)。
|
||||
- 最快开始聊天:`openclaw dashboard`(控制 UI,无需渠道设置)。
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
---
|
||||
read_when:
|
||||
- 你正在使用配对模式的私信功能,需要批准发送者
|
||||
summary: "`openclaw pairing`(批准/列出配对请求)的 CLI 参考"
|
||||
- 你正在使用配对模式私信并需要批准发送者
|
||||
summary: "`openclaw pairing` 的 CLI 参考(批准/列出配对请求)"
|
||||
title: pairing
|
||||
x-i18n:
|
||||
generated_at: "2026-02-01T20:21:19Z"
|
||||
generated_at: "2026-02-03T07:45:02Z"
|
||||
model: claude-opus-4-5
|
||||
provider: pi
|
||||
source_hash: e0bc9707294463c95d13e0deb67d834cfad6a105ab44baf4c25592e5de65ddf5
|
||||
source_path: cli/pairing.md
|
||||
workflow: 14
|
||||
workflow: 15
|
||||
---
|
||||
|
||||
# `openclaw pairing`
|
||||
|
||||
@@ -1,26 +1,26 @@
|
||||
---
|
||||
read_when:
|
||||
- 你想安装或管理进程内 Gateway网关插件
|
||||
- 你想安装或管理进程内 Gateway 网关插件
|
||||
- 你想调试插件加载失败问题
|
||||
summary: "`openclaw plugins` 的 CLI 参考(list、install、enable/disable、doctor)"
|
||||
summary: "`openclaw plugins` 的 CLI 参考(列出、安装、启用/禁用、诊断)"
|
||||
title: plugins
|
||||
x-i18n:
|
||||
generated_at: "2026-02-01T20:21:23Z"
|
||||
generated_at: "2026-02-03T07:45:08Z"
|
||||
model: claude-opus-4-5
|
||||
provider: pi
|
||||
source_hash: c6bf76b1e766b912ec30a0101d455151c88f1a778bffa121cdd1d0b4fbe73e1c
|
||||
source_path: cli/plugins.md
|
||||
workflow: 14
|
||||
workflow: 15
|
||||
---
|
||||
|
||||
# `openclaw plugins`
|
||||
|
||||
管理 Gateway网关插件/扩展(进程内加载)。
|
||||
管理 Gateway 网关插件/扩展(进程内加载)。
|
||||
|
||||
相关内容:
|
||||
|
||||
- 插件系统:[插件](/plugin)
|
||||
- 插件清单 + schema:[插件清单](/plugins/manifest)
|
||||
- 插件清单 + 模式:[插件清单](/plugins/manifest)
|
||||
- 安全加固:[安全](/gateway/security)
|
||||
|
||||
## 命令
|
||||
@@ -35,9 +35,9 @@ openclaw plugins update <id>
|
||||
openclaw plugins update --all
|
||||
```
|
||||
|
||||
内置插件随 OpenClaw 一起分发,但默认处于禁用状态。使用 `plugins enable` 来激活它们。
|
||||
内置插件随 OpenClaw 一起发布,但默认禁用。使用 `plugins enable` 来激活它们。
|
||||
|
||||
所有插件必须附带一个 `openclaw.plugin.json` 文件,其中包含内联 JSON Schema(`configSchema`,即使为空也需要)。缺失或无效的清单或 schema 会导致插件无法加载,并使配置验证失败。
|
||||
所有插件必须提供 `openclaw.plugin.json` 文件,其中包含内联 JSON Schema(`configSchema`,即使为空)。缺少或无效的清单或模式会阻止插件加载并导致配置验证失败。
|
||||
|
||||
### 安装
|
||||
|
||||
@@ -45,11 +45,11 @@ openclaw plugins update --all
|
||||
openclaw plugins install <path-or-spec>
|
||||
```
|
||||
|
||||
安全提示:安装插件等同于运行代码,请优先使用固定版本。
|
||||
安全提示:将插件安装视为运行代码。优先使用固定版本。
|
||||
|
||||
支持的归档格式:`.zip`、`.tgz`、`.tar.gz`、`.tar`。
|
||||
|
||||
使用 `--link` 可避免复制本地目录(会添加到 `plugins.load.paths`):
|
||||
使用 `--link` 避免复制本地目录(添加到 `plugins.load.paths`):
|
||||
|
||||
```bash
|
||||
openclaw plugins install -l ./my-plugin
|
||||
|
||||
@@ -1,30 +1,30 @@
|
||||
---
|
||||
read_when: 你正在管理沙箱容器或调试沙箱/工具策略行为。
|
||||
read_when: You are managing sandbox containers or debugging sandbox/tool-policy behavior.
|
||||
status: active
|
||||
summary: 管理沙箱容器并检查生效的沙箱策略
|
||||
title: Sandbox CLI
|
||||
title: 沙箱 CLI
|
||||
x-i18n:
|
||||
generated_at: "2026-02-01T20:21:35Z"
|
||||
generated_at: "2026-02-03T07:45:18Z"
|
||||
model: claude-opus-4-5
|
||||
provider: pi
|
||||
source_hash: 6e1186f26c77e188206ce5e198ab624d6b38bc7bb7c06e4d2281b6935c39e347
|
||||
source_path: cli/sandbox.md
|
||||
workflow: 14
|
||||
workflow: 15
|
||||
---
|
||||
|
||||
# Sandbox CLI
|
||||
# 沙箱 CLI
|
||||
|
||||
管理基于 Docker 的沙箱容器,用于隔离智能体执行。
|
||||
|
||||
## 概述
|
||||
|
||||
OpenClaw 可以在隔离的 Docker 容器中运行智能体以确保安全性。`sandbox` 命令帮助你管理这些容器,尤其是在更新或配置变更之后。
|
||||
OpenClaw 可以在隔离的 Docker 容器中运行智能体以确保安全。`sandbox` 命令帮助你管理这些容器,特别是在更新或配置更改后。
|
||||
|
||||
## 命令
|
||||
|
||||
### `openclaw sandbox explain`
|
||||
|
||||
检查**生效的**沙箱模式/作用域/工作区访问权限、沙箱工具策略以及提权门控(附带修复建议的配置键路径)。
|
||||
检查**生效的**沙箱模式/作用域/工作区访问权限、沙箱工具策略和提权门控(附带修复配置的键路径)。
|
||||
|
||||
```bash
|
||||
openclaw sandbox explain
|
||||
@@ -39,62 +39,62 @@ openclaw sandbox explain --json
|
||||
|
||||
```bash
|
||||
openclaw sandbox list
|
||||
openclaw sandbox list --browser # 仅列出浏览器容器
|
||||
openclaw sandbox list --json # JSON 输出
|
||||
openclaw sandbox list --browser # List only browser containers
|
||||
openclaw sandbox list --json # JSON output
|
||||
```
|
||||
|
||||
**输出包括:**
|
||||
|
||||
- 容器名称和状态(运行中/已停止)
|
||||
- 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 # 跳过确认提示
|
||||
openclaw sandbox recreate --all # Recreate all containers
|
||||
openclaw sandbox recreate --session main # Specific session
|
||||
openclaw sandbox recreate --agent mybot # Specific agent
|
||||
openclaw sandbox recreate --browser # Only browser containers
|
||||
openclaw sandbox recreate --all --force # Skip confirmation
|
||||
```
|
||||
|
||||
**选项:**
|
||||
|
||||
- `--all`:重新创建所有沙箱容器
|
||||
- `--session <key>`:重新创建指定会话的容器
|
||||
- `--agent <id>`:重新创建指定智能体的容器
|
||||
- `--session <key>`:重新创建特定会话的容器
|
||||
- `--agent <id>`:重新创建特定智能体的容器
|
||||
- `--browser`:仅重新创建浏览器容器
|
||||
- `--force`:跳过确认提示
|
||||
|
||||
**重要提示:** 容器会在智能体下次使用时自动重新创建。
|
||||
**重要:** 容器会在智能体下次使用时自动重新创建。
|
||||
|
||||
## 使用场景
|
||||
|
||||
### 更新 Docker 镜像后
|
||||
|
||||
```bash
|
||||
# 拉取新镜像
|
||||
# Pull new image
|
||||
docker pull openclaw-sandbox:latest
|
||||
docker tag openclaw-sandbox:latest openclaw-sandbox:bookworm-slim
|
||||
|
||||
# 更新配置以使用新镜像
|
||||
# 编辑配置:agents.defaults.sandbox.docker.image(或 agents.list[].sandbox.docker.image)
|
||||
# Update config to use new image
|
||||
# Edit config: agents.defaults.sandbox.docker.image (or agents.list[].sandbox.docker.image)
|
||||
|
||||
# 重新创建容器
|
||||
# Recreate containers
|
||||
openclaw sandbox recreate --all
|
||||
```
|
||||
|
||||
### 更改沙箱配置后
|
||||
|
||||
```bash
|
||||
# 编辑配置:agents.defaults.sandbox.*(或 agents.list[].sandbox.*)
|
||||
# Edit config: agents.defaults.sandbox.* (or agents.list[].sandbox.*)
|
||||
|
||||
# 重新创建以应用新配置
|
||||
# Recreate to apply new config
|
||||
openclaw sandbox recreate --all
|
||||
```
|
||||
|
||||
@@ -102,32 +102,32 @@ openclaw sandbox recreate --all
|
||||
|
||||
```bash
|
||||
openclaw sandbox recreate --all
|
||||
# 或仅针对某个智能体:
|
||||
# or just one agent:
|
||||
openclaw sandbox recreate --agent family
|
||||
```
|
||||
|
||||
### 仅针对特定智能体
|
||||
|
||||
```bash
|
||||
# 仅更新某个智能体的容器
|
||||
# Update only one agent's containers
|
||||
openclaw sandbox recreate --agent alfred
|
||||
```
|
||||
|
||||
## 为什么需要这样做?
|
||||
## 为什么需要这个?
|
||||
|
||||
**问题:** 当你更新沙箱 Docker 镜像或配置时:
|
||||
|
||||
- 现有容器会继续使用旧设置运行
|
||||
- 容器仅在空闲 24 小时后才会被清理
|
||||
- 经常使用的智能体会无限期地保持旧容器运行
|
||||
- 现有容器继续使用旧设置运行
|
||||
- 容器仅在空闲 24 小时后才被清理
|
||||
- 经常使用的智能体会无限期保持旧容器运行
|
||||
|
||||
**解决方案:** 使用 `openclaw sandbox recreate` 强制移除旧容器。它们会在下次需要时自动使用当前设置重新创建。
|
||||
|
||||
提示:建议使用 `openclaw sandbox recreate` 而非手动执行 `docker rm`。它使用 Gateway网关的容器命名规则,避免在作用域/会话键发生变化时出现不匹配问题。
|
||||
提示:优先使用 `openclaw sandbox recreate` 而不是手动 `docker rm`。它使用 Gateway 网关的容器命名规则,避免在作用域/会话键更改时出现不匹配。
|
||||
|
||||
## 配置
|
||||
|
||||
沙箱设置位于 `~/.openclaw/openclaw.json` 中的 `agents.defaults.sandbox` 下(按智能体覆盖的配置放在 `agents.list[].sandbox` 中):
|
||||
沙箱设置位于 `~/.openclaw/openclaw.json` 的 `agents.defaults.sandbox` 下(每个智能体的覆盖设置在 `agents.list[].sandbox` 中):
|
||||
|
||||
```jsonc
|
||||
{
|
||||
@@ -139,11 +139,11 @@ openclaw sandbox recreate --agent alfred
|
||||
"docker": {
|
||||
"image": "openclaw-sandbox:bookworm-slim",
|
||||
"containerPrefix": "openclaw-sbx-",
|
||||
// ... 更多 Docker 选项
|
||||
// ... more Docker options
|
||||
},
|
||||
"prune": {
|
||||
"idleHours": 24, // 空闲 24 小时后自动清理
|
||||
"maxAgeDays": 7, // 7 天后自动清理
|
||||
"idleHours": 24, // Auto-prune after 24h idle
|
||||
"maxAgeDays": 7, // Auto-prune after 7 days
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
@@ -1,23 +1,23 @@
|
||||
---
|
||||
read_when:
|
||||
- 想要对配置/状态进行快速安全审计
|
||||
- 想要应用安全的"修复"建议(chmod、收紧默认值)
|
||||
summary: 审计和修复常见安全隐患的 `openclaw security` CLI 参考
|
||||
- 你想对配置/状态运行快速安全审计
|
||||
- 你想应用安全的"修复"建议(chmod、收紧默认值)
|
||||
summary: "`openclaw security` 的 CLI 参考(审计和修复常见安全隐患)"
|
||||
title: security
|
||||
x-i18n:
|
||||
generated_at: "2026-02-01T20:21:24Z"
|
||||
generated_at: "2026-02-03T07:45:13Z"
|
||||
model: claude-opus-4-5
|
||||
provider: pi
|
||||
source_hash: 19705b0fff848fa6f302b4ed09b7660c64e09048dba517c7f6a833d2db40bebf
|
||||
source_path: cli/security.md
|
||||
workflow: 14
|
||||
workflow: 15
|
||||
---
|
||||
|
||||
# `openclaw security`
|
||||
|
||||
安全工具(审计 + 可选修复)。
|
||||
|
||||
相关内容:
|
||||
相关:
|
||||
|
||||
- 安全指南:[安全](/gateway/security)
|
||||
|
||||
@@ -29,5 +29,5 @@ openclaw security audit --deep
|
||||
openclaw security audit --fix
|
||||
```
|
||||
|
||||
当多个私信发送者共享主会话时,审计会发出警告,并建议共享收件箱使用 `session.dmScope="per-channel-peer"`(多账户渠道则使用 `per-account-channel-peer`)。
|
||||
审计还会在小模型(`<=300B`)未启用沙箱且启用了 web/browser 工具时发出警告。
|
||||
当多个私信发送者共享主会话时,审计会发出警告,并建议对共享收件箱使用 `session.dmScope="per-channel-peer"`(或多账户渠道使用 `per-account-channel-peer`)。
|
||||
当使用小模型(`<=300B`)且未启用沙箱隔离但启用了 web/browser 工具时,它也会发出警告。
|
||||
|
||||
@@ -1,26 +1,26 @@
|
||||
---
|
||||
read_when:
|
||||
- 想要查看哪些 Skills 可用且可以运行
|
||||
- 想要调试 Skills 缺失的二进制文件/环境变量/配置
|
||||
summary: Skills 列表/信息/检查及 Skills 资格的 `openclaw skills` CLI 参考
|
||||
- 你想查看哪些 Skills 可用并准备好运行
|
||||
- 你想调试 Skills 缺少的二进制文件/环境变量/配置
|
||||
summary: "`openclaw skills` 的 CLI 参考(列出/信息/检查)和 skill 资格"
|
||||
title: skills
|
||||
x-i18n:
|
||||
generated_at: "2026-02-01T20:21:28Z"
|
||||
generated_at: "2026-02-03T07:45:14Z"
|
||||
model: claude-opus-4-5
|
||||
provider: pi
|
||||
source_hash: 7878442c88a27ec8033f3125c319e9a6a85a1c497a404a06112ad45185c261b0
|
||||
source_path: cli/skills.md
|
||||
workflow: 14
|
||||
workflow: 15
|
||||
---
|
||||
|
||||
# `openclaw skills`
|
||||
|
||||
检查 Skills(内置 + 工作区 + 托管覆盖),查看哪些符合条件以及哪些缺少依赖。
|
||||
检查 Skills(内置 + 工作区 + 托管覆盖)并查看哪些符合条件,哪些缺少要求。
|
||||
|
||||
相关内容:
|
||||
|
||||
- Skills 系统:[Skills](/tools/skills)
|
||||
- Skills配置:[Skills配置](/tools/skills-config)
|
||||
- Skills 配置:[Skills 配置](/tools/skills-config)
|
||||
- ClawHub 安装:[ClawHub](/tools/clawhub)
|
||||
|
||||
## 命令
|
||||
|
||||
@@ -1,21 +1,21 @@
|
||||
---
|
||||
read_when:
|
||||
- 你想快速诊断渠道健康状况及近期会话接收者
|
||||
- 你想获取可粘贴的完整状态信息用于调试
|
||||
summary: "`openclaw status`(诊断、探测、使用情况快照)的 CLI 参考"
|
||||
- 你想快速诊断渠道健康状况 + 最近的会话接收者
|
||||
- 你想获取可粘贴的"all"状态用于调试
|
||||
summary: "`openclaw status` 的 CLI 参考(诊断、探测、使用量快照)"
|
||||
title: status
|
||||
x-i18n:
|
||||
generated_at: "2026-02-01T20:21:30Z"
|
||||
generated_at: "2026-02-03T07:45:21Z"
|
||||
model: claude-opus-4-5
|
||||
provider: pi
|
||||
source_hash: 2bbf5579c48034fc15c2cbd5506c50456230b17e4a74c06318968c590d8f1501
|
||||
source_path: cli/status.md
|
||||
workflow: 14
|
||||
workflow: 15
|
||||
---
|
||||
|
||||
# `openclaw status`
|
||||
|
||||
渠道和会话的诊断信息。
|
||||
渠道 + 会话的诊断。
|
||||
|
||||
```bash
|
||||
openclaw status
|
||||
@@ -24,10 +24,10 @@ openclaw status --deep
|
||||
openclaw status --usage
|
||||
```
|
||||
|
||||
说明:
|
||||
注意事项:
|
||||
|
||||
- `--deep` 会运行实时探测(WhatsApp Web + Telegram + Discord + Google Chat + Slack + Signal)。
|
||||
- `--deep` 运行实时探测(WhatsApp Web + Telegram + Discord + Google Chat + Slack + Signal)。
|
||||
- 当配置了多个智能体时,输出包含每个智能体的会话存储。
|
||||
- 概览包含 Gateway网关和节点主机服务的安装/运行状态(如可用)。
|
||||
- 概览包含更新渠道和 git SHA(适用于源码检出)。
|
||||
- 更新信息会显示在概览中;如果有可用更新,状态会提示运行 `openclaw update`(参见[更新](/install/updating))。
|
||||
- 概览包含 Gateway 网关 + 节点主机服务安装/运行时状态(如果可用)。
|
||||
- 概览包含更新渠道 + git SHA(用于源代码检出)。
|
||||
- 更新信息显示在概览中;如果有可用更新,status 会打印提示运行 `openclaw update`(参见[更新](/install/updating))。
|
||||
|
||||
@@ -1,22 +1,22 @@
|
||||
---
|
||||
read_when:
|
||||
- 你想在不创建 cron 任务的情况下将系统事件加入队列
|
||||
- 你想在不创建 cron 作业的情况下入队系统事件
|
||||
- 你需要启用或禁用心跳
|
||||
- 你想检查系统存在状态条目
|
||||
summary: "`openclaw system` 的 CLI 参考(系统事件、心跳、存在状态)"
|
||||
- 你想检查系统在线状态条目
|
||||
summary: "`openclaw system` 的 CLI 参考(系统事件、心跳、在线状态)"
|
||||
title: system
|
||||
x-i18n:
|
||||
generated_at: "2026-02-01T20:21:34Z"
|
||||
generated_at: "2026-02-03T07:45:23Z"
|
||||
model: claude-opus-4-5
|
||||
provider: pi
|
||||
source_hash: 36ae5dbdec327f5a32f7ef44bdc1f161bad69868de62f5071bb4d25a71bfdfe9
|
||||
source_path: cli/system.md
|
||||
workflow: 14
|
||||
workflow: 15
|
||||
---
|
||||
|
||||
# `openclaw system`
|
||||
|
||||
Gateway网关的系统级辅助工具:将系统事件加入队列、控制心跳以及查看存在状态。
|
||||
Gateway 网关的系统级辅助工具:入队系统事件、控制心跳和查看在线状态。
|
||||
|
||||
## 常用命令
|
||||
|
||||
@@ -29,11 +29,11 @@ openclaw system presence
|
||||
|
||||
## `system event`
|
||||
|
||||
在**主**会话上将系统事件加入队列。下一次心跳会将其作为 `System:` 行注入到提示中。使用 `--mode now` 可立即触发心跳;`next-heartbeat` 则等待下一次计划的心跳周期。
|
||||
在**主**会话上入队系统事件。下一次心跳会将其作为 `System:` 行注入到提示中。使用 `--mode now` 立即触发心跳;`next-heartbeat` 等待下一个计划的心跳时刻。
|
||||
|
||||
标志:
|
||||
|
||||
- `--text <text>`:必需的系统事件文本。
|
||||
- `--text <text>`:必填的系统事件文本。
|
||||
- `--mode <mode>`:`now` 或 `next-heartbeat`(默认)。
|
||||
- `--json`:机器可读输出。
|
||||
|
||||
@@ -41,8 +41,8 @@ openclaw system presence
|
||||
|
||||
心跳控制:
|
||||
|
||||
- `last`:显示上一次心跳事件。
|
||||
- `enable`:重新开启心跳(如果之前被禁用,请使用此命令)。
|
||||
- `last`:显示最后一次心跳事件。
|
||||
- `enable`:重新开启心跳(如果之前被禁用,使用此命令)。
|
||||
- `disable`:暂停心跳。
|
||||
|
||||
标志:
|
||||
@@ -51,13 +51,13 @@ openclaw system presence
|
||||
|
||||
## `system presence`
|
||||
|
||||
列出 Gateway网关已知的当前系统存在状态条目(节点、实例及类似状态行)。
|
||||
列出 Gateway 网关已知的当前系统在线状态条目(节点、实例和类似状态行)。
|
||||
|
||||
标志:
|
||||
|
||||
- `--json`:机器可读输出。
|
||||
|
||||
## 注意事项
|
||||
## 注意
|
||||
|
||||
- 需要当前配置(本地或远程)可访问的运行中 Gateway网关。
|
||||
- 需要一个运行中的 Gateway 网关,可通过你当前的配置访问(本地或远程)。
|
||||
- 系统事件是临时的,不会在重启后持久化。
|
||||
|
||||
@@ -1,23 +1,23 @@
|
||||
---
|
||||
read_when:
|
||||
- 想要使用 Gateway网关的终端 UI(支持远程)
|
||||
- 想要从脚本传递 url/token/session
|
||||
summary: 连接到 Gateway网关的终端 UI 的 `openclaw tui` CLI 参考
|
||||
- 你想要一个连接 Gateway 网关的终端 UI(支持远程)
|
||||
- 你想从脚本传递 url/token/session
|
||||
summary: "`openclaw tui` 的 CLI 参考(连接到 Gateway 网关的终端 UI)"
|
||||
title: tui
|
||||
x-i18n:
|
||||
generated_at: "2026-02-01T20:21:31Z"
|
||||
generated_at: "2026-02-03T07:45:20Z"
|
||||
model: claude-opus-4-5
|
||||
provider: pi
|
||||
source_hash: f0a97d92e08746a9d6a4f31d361ccad9aea4c3dc61cfafb310d88715f61cfb64
|
||||
source_path: cli/tui.md
|
||||
workflow: 14
|
||||
workflow: 15
|
||||
---
|
||||
|
||||
# `openclaw tui`
|
||||
|
||||
打开连接到 Gateway网关的终端 UI。
|
||||
打开连接到 Gateway 网关的终端 UI。
|
||||
|
||||
相关内容:
|
||||
相关:
|
||||
|
||||
- TUI 指南:[TUI](/tui)
|
||||
|
||||
|
||||
@@ -1,21 +1,21 @@
|
||||
---
|
||||
read_when:
|
||||
- 你想移除 Gateway网关服务和/或本地状态
|
||||
- 你想移除 Gateway 网关服务和/或本地状态
|
||||
- 你想先进行试运行
|
||||
summary: "`openclaw uninstall`(移除 Gateway网关服务 + 本地数据)的 CLI 参考"
|
||||
summary: "`openclaw uninstall` 的 CLI 参考(移除 Gateway 网关服务 + 本地数据)"
|
||||
title: uninstall
|
||||
x-i18n:
|
||||
generated_at: "2026-02-01T20:21:33Z"
|
||||
generated_at: "2026-02-03T10:04:23Z"
|
||||
model: claude-opus-4-5
|
||||
provider: pi
|
||||
source_hash: 8d6c3890923f18f95c12b76443d649a6b404934ebd054fb86a9fa1abae843fe4
|
||||
source_path: cli/uninstall.md
|
||||
workflow: 14
|
||||
workflow: 15
|
||||
---
|
||||
|
||||
# `openclaw uninstall`
|
||||
|
||||
卸载 Gateway网关服务 + 本地数据(CLI 保留)。
|
||||
卸载 Gateway 网关服务 + 本地数据(CLI 保留)。
|
||||
|
||||
```bash
|
||||
openclaw uninstall
|
||||
|
||||
@@ -2,22 +2,22 @@
|
||||
read_when:
|
||||
- 你想安全地更新源码检出
|
||||
- 你需要了解 `--update` 简写行为
|
||||
summary: "`openclaw update`(安全的源码更新 + Gateway网关自动重启)的 CLI 参考"
|
||||
summary: "`openclaw update` 的 CLI 参考(相对安全的源码更新 + Gateway 网关自动重启)"
|
||||
title: update
|
||||
x-i18n:
|
||||
generated_at: "2026-02-01T20:21:45Z"
|
||||
generated_at: "2026-02-03T07:45:34Z"
|
||||
model: claude-opus-4-5
|
||||
provider: pi
|
||||
source_hash: 3a08e8ac797612c498eef54ecb83e61c9a1ee5de09162a01dbb4b3bd72897206
|
||||
source_path: cli/update.md
|
||||
workflow: 14
|
||||
workflow: 15
|
||||
---
|
||||
|
||||
# `openclaw update`
|
||||
|
||||
安全更新 OpenClaw 并在 stable/beta/dev 渠道之间切换。
|
||||
|
||||
如果你通过 **npm/pnpm** 安装(全局安装,无 git 元数据),更新将通过[更新](/install/updating)中的包管理器流程进行。
|
||||
如果你通过 **npm/pnpm** 安装(全局安装,无 git 元数据),更新通过 [更新](/install/updating) 中的包管理器流程进行。
|
||||
|
||||
## 用法
|
||||
|
||||
@@ -35,17 +35,17 @@ openclaw --update
|
||||
|
||||
## 选项
|
||||
|
||||
- `--no-restart`:成功更新后跳过重启 Gateway网关服务。
|
||||
- `--no-restart`:成功更新后跳过重启 Gateway 网关服务。
|
||||
- `--channel <stable|beta|dev>`:设置更新渠道(git + npm;持久化到配置中)。
|
||||
- `--tag <dist-tag|version>`:仅为本次更新覆盖 npm dist-tag 或版本。
|
||||
- `--json`:输出机器可读的 `UpdateRunResult` JSON。
|
||||
- `--timeout <seconds>`:每步超时时间(默认为 1200 秒)。
|
||||
- `--json`:打印机器可读的 `UpdateRunResult` JSON。
|
||||
- `--timeout <seconds>`:每步超时时间(默认 1200 秒)。
|
||||
|
||||
注意:降级需要确认,因为旧版本可能会破坏配置。
|
||||
|
||||
## `update status`
|
||||
|
||||
显示当前活跃的更新渠道 + git 标签/分支/SHA(适用于源码检出),以及更新可用性。
|
||||
显示当前更新渠道 + git 标签/分支/SHA(对于源码检出),以及更新可用性。
|
||||
|
||||
```bash
|
||||
openclaw update status
|
||||
@@ -55,12 +55,12 @@ openclaw update status --timeout 10
|
||||
|
||||
选项:
|
||||
|
||||
- `--json`:输出机器可读的状态 JSON。
|
||||
- `--timeout <seconds>`:检查超时时间(默认为 3 秒)。
|
||||
- `--json`:打印机器可读的状态 JSON。
|
||||
- `--timeout <seconds>`:检查超时时间(默认 3 秒)。
|
||||
|
||||
## `update wizard`
|
||||
|
||||
交互式流程,用于选择更新渠道并确认更新后是否重启 Gateway网关(默认重启)。如果你选择 `dev` 但没有 git 检出,它会提供创建一个的选项。
|
||||
交互式流程,用于选择更新渠道并确认是否在更新后重启 Gateway 网关(默认重启)。如果你选择 `dev` 但没有 git 检出,它会提供创建一个的选项。
|
||||
|
||||
## 工作原理
|
||||
|
||||
@@ -77,21 +77,21 @@ openclaw update status --timeout 10
|
||||
- `beta`:检出最新的 `-beta` 标签,然后构建 + doctor。
|
||||
- `dev`:检出 `main`,然后 fetch + rebase。
|
||||
|
||||
概要流程:
|
||||
高层概述:
|
||||
|
||||
1. 要求工作树干净(无未提交的更改)。
|
||||
1. 需要干净的工作树(无未提交的更改)。
|
||||
2. 切换到所选渠道(标签或分支)。
|
||||
3. 拉取上游(仅 dev)。
|
||||
4. 仅 dev:在临时工作树中进行预检 lint + TypeScript 构建;如果最新提交失败,会向前回溯最多 10 个提交以找到最新的可成功构建的提交。
|
||||
3. 获取上游(仅 dev)。
|
||||
4. 仅 dev:在临时工作树中预检 lint + TypeScript 构建;如果最新提交失败,回退最多 10 个提交以找到最新的干净构建。
|
||||
5. Rebase 到所选提交(仅 dev)。
|
||||
6. 安装依赖(优先使用 pnpm;回退到 npm)。
|
||||
7. 构建项目 + 构建控制台 UI。
|
||||
6. 安装依赖(优先使用 pnpm;npm 作为备选)。
|
||||
7. 构建 + 构建控制界面。
|
||||
8. 运行 `openclaw doctor` 作为最终的"安全更新"检查。
|
||||
9. 将插件同步到活跃渠道(dev 使用内置扩展;stable/beta 使用 npm)并更新通过 npm 安装的插件。
|
||||
9. 将插件同步到当前渠道(dev 使用捆绑的扩展;stable/beta 使用 npm)并更新 npm 安装的插件。
|
||||
|
||||
## `--update` 简写
|
||||
|
||||
`openclaw --update` 会重写为 `openclaw update`(便于在 shell 和启动脚本中使用)。
|
||||
`openclaw --update` 会重写为 `openclaw update`(便于 shell 和启动脚本使用)。
|
||||
|
||||
## 另请参阅
|
||||
|
||||
|
||||
Reference in New Issue
Block a user