first commit
This commit is contained in:
173
content/cli/acp.md
Normal file
173
content/cli/acp.md
Normal file
@@ -0,0 +1,173 @@
|
||||
---
|
||||
read_when:
|
||||
- 设置基于 ACP 的 IDE 集成
|
||||
- 调试到 Gateway 网关的 ACP 会话路由
|
||||
summary: 运行用于 IDE 集成的 ACP 桥接器
|
||||
title: acp
|
||||
x-i18n:
|
||||
generated_at: "2026-02-03T07:44:38Z"
|
||||
model: claude-opus-4-5
|
||||
provider: pi
|
||||
source_hash: 0c09844297da250bc1a558423e7e534d6b6be9045de12d797c07ecd64a0c63ed
|
||||
source_path: cli/acp.md
|
||||
workflow: 15
|
||||
---
|
||||
|
||||
# acp
|
||||
|
||||
运行与 OpenClaw Gateway 网关通信的 ACP(Agent Client Protocol)桥接器。
|
||||
|
||||
此命令通过 stdio 使用 ACP 协议与 IDE 通信,并通过 WebSocket 将提示转发到 Gateway 网关。它将 ACP 会话映射到 Gateway 网关会话键。
|
||||
|
||||
## 用法
|
||||
|
||||
```bash
|
||||
openclaw acp
|
||||
|
||||
# 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 桥接器并让你交互式输入提示。
|
||||
|
||||
```bash
|
||||
openclaw acp client
|
||||
|
||||
# Point the spawned bridge at a remote Gateway
|
||||
openclaw acp client --server-args --url wss://gateway-host:18789 --token <token>
|
||||
|
||||
# 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。
|
||||
|
||||
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`:详细客户端日志。
|
||||
30
content/cli/agent.md
Normal file
30
content/cli/agent.md
Normal file
@@ -0,0 +1,30 @@
|
||||
---
|
||||
read_when:
|
||||
- 你想从脚本运行一个智能体回合(可选发送回复)
|
||||
summary: "`openclaw agent` 的 CLI 参考(通过 Gateway 网关发送一个智能体回合)"
|
||||
title: agent
|
||||
x-i18n:
|
||||
generated_at: "2026-02-03T07:44:38Z"
|
||||
model: claude-opus-4-5
|
||||
provider: pi
|
||||
source_hash: dcf12fb94e207c68645f58235792596d65afecf8216b8f9ab3acb01e03b50a33
|
||||
source_path: cli/agent.md
|
||||
workflow: 15
|
||||
---
|
||||
|
||||
# `openclaw agent`
|
||||
|
||||
通过 Gateway 网关运行智能体回合(使用 `--local` 进行嵌入式运行)。使用 `--agent <id>` 直接指定已配置的智能体。
|
||||
|
||||
相关内容:
|
||||
|
||||
- 智能体发送工具:[Agent send](/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
content/cli/agents.md
Normal file
82
content/cli/agents.md
Normal 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",
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
}
|
||||
```
|
||||
57
content/cli/approvals.md
Normal file
57
content/cli/approvals.md
Normal file
@@ -0,0 +1,57 @@
|
||||
---
|
||||
read_when:
|
||||
- 你想通过 CLI 编辑执行审批
|
||||
- 你需要管理 Gateway 网关或节点主机上的允许列表
|
||||
summary: CLI 参考:`openclaw approvals`(Gateway 网关或节点主机的执行审批)
|
||||
title: approvals
|
||||
x-i18n:
|
||||
generated_at: "2026-02-03T10:04:09Z"
|
||||
model: claude-opus-4-5
|
||||
provider: pi
|
||||
source_hash: 4329cdaaec2c5f5d619415b6431196512d4834dc1ccd7363576f03dd9b845130
|
||||
source_path: cli/approvals.md
|
||||
workflow: 15
|
||||
---
|
||||
|
||||
# `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、name、ip 或 id 前缀)。
|
||||
- `--agent` 默认为 `"*"`,表示适用于所有智能体。
|
||||
- 节点主机必须公开 `system.execApprovals.get/set`(macOS 应用或无头节点主机)。
|
||||
- 审批文件按主机存储在 `~/.openclaw/exec-approvals.json`。
|
||||
114
content/cli/browser.md
Normal file
114
content/cli/browser.md
Normal file
@@ -0,0 +1,114 @@
|
||||
---
|
||||
read_when:
|
||||
- 你使用 `openclaw browser` 并想要常见任务的示例
|
||||
- 你想通过 node host 控制在另一台机器上运行的浏览器
|
||||
- 你想使用 Chrome 扩展中继(通过工具栏按钮附加/分离)
|
||||
summary: "`openclaw browser` 的 CLI 参考(配置文件、标签页、操作、扩展中继)"
|
||||
title: browser
|
||||
x-i18n:
|
||||
generated_at: "2026-02-03T07:44:49Z"
|
||||
model: claude-opus-4-5
|
||||
provider: pi
|
||||
source_hash: af35adfd68726fd519c704d046451effd330458c2b8305e713137fb07b2571fd
|
||||
source_path: cli/browser.md
|
||||
workflow: 15
|
||||
---
|
||||
|
||||
# `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
|
||||
```
|
||||
|
||||
导航/点击/输入(基于 ref 的 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)
|
||||
|
||||
## 远程浏览器控制(node host 代理)
|
||||
|
||||
如果 Gateway 网关与浏览器运行在不同的机器上,在有 Chrome/Brave/Edge/Chromium 的机器上运行 **node host**。Gateway 网关会将浏览器操作代理到该节点(无需单独的浏览器控制服务器)。
|
||||
|
||||
使用 `gateway.nodes.browser.mode` 控制自动路由,使用 `gateway.nodes.browser.node` 在连接多个节点时固定特定节点。
|
||||
|
||||
安全 + 远程设置:[浏览器工具](/tools/browser)、[远程访问](/gateway/remote)、[Tailscale](/gateway/tailscale)、[安全](/gateway/security)
|
||||
86
content/cli/channels.md
Normal file
86
content/cli/channels.md
Normal 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-03T07:44:51Z"
|
||||
model: claude-opus-4-5
|
||||
provider: pi
|
||||
source_hash: 16ab1642f247bfa96e8e08dfeb1eedfccb148f40d91099f5423f971df2b54e20
|
||||
source_path: cli/channels.md
|
||||
workflow: 15
|
||||
---
|
||||
|
||||
# `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 + user scopes;Telegram bot 标志 + webhook;Signal daemon 版本;MS Teams app token + Graph roles/scopes(在已知处标注)。没有探测功能的渠道报告 `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` 强制指定目标类型。
|
||||
- 当多个条目共享相同名称时,解析优先选择活跃的匹配项。
|
||||
21
content/cli/clawbot.md
Normal file
21
content/cli/clawbot.md
Normal file
@@ -0,0 +1,21 @@
|
||||
---
|
||||
summary: "CLI reference for `openclaw clawbot` (legacy alias namespace)"
|
||||
read_when:
|
||||
- You maintain older scripts using `openclaw clawbot ...`
|
||||
- You need migration guidance to current commands
|
||||
title: "clawbot"
|
||||
---
|
||||
|
||||
# `openclaw clawbot`
|
||||
|
||||
Legacy alias namespace kept for backwards compatibility.
|
||||
|
||||
Current supported alias:
|
||||
|
||||
- `openclaw clawbot qr` (same behavior as [`openclaw qr`](/cli/qr))
|
||||
|
||||
## Migration
|
||||
|
||||
Prefer modern top-level commands directly:
|
||||
|
||||
- `openclaw clawbot qr` -> `openclaw qr`
|
||||
35
content/cli/completion.md
Normal file
35
content/cli/completion.md
Normal file
@@ -0,0 +1,35 @@
|
||||
---
|
||||
summary: "CLI reference for `openclaw completion` (generate/install shell completion scripts)"
|
||||
read_when:
|
||||
- You want shell completions for zsh/bash/fish/PowerShell
|
||||
- You need to cache completion scripts under OpenClaw state
|
||||
title: "completion"
|
||||
---
|
||||
|
||||
# `openclaw completion`
|
||||
|
||||
Generate shell completion scripts and optionally install them into your shell profile.
|
||||
|
||||
## Usage
|
||||
|
||||
```bash
|
||||
openclaw completion
|
||||
openclaw completion --shell zsh
|
||||
openclaw completion --install
|
||||
openclaw completion --shell fish --install
|
||||
openclaw completion --write-state
|
||||
openclaw completion --shell bash --write-state
|
||||
```
|
||||
|
||||
## Options
|
||||
|
||||
- `-s, --shell <shell>`: shell target (`zsh`, `bash`, `powershell`, `fish`; default: `zsh`)
|
||||
- `-i, --install`: install completion by adding a source line to your shell profile
|
||||
- `--write-state`: write completion script(s) to `$OPENCLAW_STATE_DIR/completions` without printing to stdout
|
||||
- `-y, --yes`: skip install confirmation prompts
|
||||
|
||||
## Notes
|
||||
|
||||
- `--install` writes a small "OpenClaw Completion" block into your shell profile and points it at the cached script.
|
||||
- Without `--install` or `--write-state`, the command prints the script to stdout.
|
||||
- Completion generation eagerly loads command trees so nested subcommands are included.
|
||||
57
content/cli/config.md
Normal file
57
content/cli/config.md
Normal file
@@ -0,0 +1,57 @@
|
||||
---
|
||||
read_when:
|
||||
- 你想以非交互方式读取或编辑配置
|
||||
summary: "`openclaw config` 的 CLI 参考(获取/设置/取消设置配置值)"
|
||||
title: config
|
||||
x-i18n:
|
||||
generated_at: "2026-02-03T10:04:13Z"
|
||||
model: claude-opus-4-5
|
||||
provider: pi
|
||||
source_hash: d60a35f5330f22bc99a0df090590586109d329ddd2ca294aeed191a22560c1c2
|
||||
source_path: cli/config.md
|
||||
workflow: 15
|
||||
---
|
||||
|
||||
# `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 网关。
|
||||
38
content/cli/configure.md
Normal file
38
content/cli/configure.md
Normal file
@@ -0,0 +1,38 @@
|
||||
---
|
||||
read_when:
|
||||
- 你想交互式地调整凭证、设备或智能体默认设置
|
||||
summary: "`openclaw configure` 的 CLI 参考(交互式配置提示)"
|
||||
title: configure
|
||||
x-i18n:
|
||||
generated_at: "2026-02-03T07:44:46Z"
|
||||
model: claude-opus-4-5
|
||||
provider: pi
|
||||
source_hash: 9cb2bb5237b02b3a2dca71b5e43b11bd6b9939b9e4aa9ce1882457464b51efd2
|
||||
source_path: cli/configure.md
|
||||
workflow: 15
|
||||
---
|
||||
|
||||
# `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
|
||||
```
|
||||
43
content/cli/cron.md
Normal file
43
content/cli/cron.md
Normal file
@@ -0,0 +1,43 @@
|
||||
---
|
||||
read_when:
|
||||
- 你需要定时作业和唤醒功能
|
||||
- 你正在调试 cron 执行和日志
|
||||
summary: "`openclaw cron` 的 CLI 参考(调度和运行后台作业)"
|
||||
title: cron
|
||||
x-i18n:
|
||||
generated_at: "2026-02-03T07:44:47Z"
|
||||
model: claude-opus-4-5
|
||||
provider: pi
|
||||
source_hash: bc9317c824f3b6339df657cc269961d9b5f121da65ec2b23a07d454e6d611135
|
||||
source_path: cli/cron.md
|
||||
workflow: 15
|
||||
---
|
||||
|
||||
# `openclaw cron`
|
||||
|
||||
管理 Gateway 网关调度器的 cron 作业。
|
||||
|
||||
相关内容:
|
||||
|
||||
- Cron 作业:[Cron 作业](/automation/cron-jobs)
|
||||
|
||||
提示:运行 `openclaw cron --help` 查看完整的命令集。
|
||||
|
||||
说明:隔离式 `cron add` 任务默认使用 `--announce` 投递摘要。使用 `--no-deliver` 仅内部运行。
|
||||
`--deliver` 仍作为 `--announce` 的弃用别名保留。
|
||||
|
||||
说明:一次性(`--at`)任务成功后默认删除。使用 `--keep-after-run` 保留。
|
||||
|
||||
## 常见编辑
|
||||
|
||||
更新投递设置而不更改消息:
|
||||
|
||||
```bash
|
||||
openclaw cron edit <job-id> --announce --channel telegram --to "123456789"
|
||||
```
|
||||
|
||||
为隔离的作业禁用投递:
|
||||
|
||||
```bash
|
||||
openclaw cron edit <job-id> --no-deliver
|
||||
```
|
||||
43
content/cli/daemon.md
Normal file
43
content/cli/daemon.md
Normal file
@@ -0,0 +1,43 @@
|
||||
---
|
||||
summary: "CLI reference for `openclaw daemon` (legacy alias for gateway service management)"
|
||||
read_when:
|
||||
- You still use `openclaw daemon ...` in scripts
|
||||
- You need service lifecycle commands (install/start/stop/restart/status)
|
||||
title: "daemon"
|
||||
---
|
||||
|
||||
# `openclaw daemon`
|
||||
|
||||
Legacy alias for Gateway service management commands.
|
||||
|
||||
`openclaw daemon ...` maps to the same service control surface as `openclaw gateway ...` service commands.
|
||||
|
||||
## Usage
|
||||
|
||||
```bash
|
||||
openclaw daemon status
|
||||
openclaw daemon install
|
||||
openclaw daemon start
|
||||
openclaw daemon stop
|
||||
openclaw daemon restart
|
||||
openclaw daemon uninstall
|
||||
```
|
||||
|
||||
## Subcommands
|
||||
|
||||
- `status`: show service install state and probe Gateway health
|
||||
- `install`: install service (`launchd`/`systemd`/`schtasks`)
|
||||
- `uninstall`: remove service
|
||||
- `start`: start service
|
||||
- `stop`: stop service
|
||||
- `restart`: restart service
|
||||
|
||||
## Common options
|
||||
|
||||
- `status`: `--url`, `--token`, `--password`, `--timeout`, `--no-probe`, `--deep`, `--json`
|
||||
- `install`: `--port`, `--runtime <node|bun>`, `--token`, `--force`, `--json`
|
||||
- lifecycle (`uninstall|start|stop|restart`): `--json`
|
||||
|
||||
## Prefer
|
||||
|
||||
Use [`openclaw gateway`](/cli/gateway) for current docs and examples.
|
||||
23
content/cli/dashboard.md
Normal file
23
content/cli/dashboard.md
Normal 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
content/cli/devices.md
Normal file
74
content/cli/devices.md
Normal file
@@ -0,0 +1,74 @@
|
||||
---
|
||||
read_when:
|
||||
- 你正在批准设备配对请求
|
||||
- 你需要轮换或撤销设备 token
|
||||
summary: "`openclaw devices` 的 CLI 参考(设备配对 + token 轮换/撤销)"
|
||||
title: devices
|
||||
x-i18n:
|
||||
generated_at: "2026-02-03T07:44:52Z"
|
||||
model: claude-opus-4-5
|
||||
provider: pi
|
||||
source_hash: 52f903817d2886c1dc29b85d30168d1edff7944bd120a1e139159c9d99a1f517
|
||||
source_path: cli/devices.md
|
||||
workflow: 15
|
||||
---
|
||||
|
||||
# `openclaw devices`
|
||||
|
||||
管理设备配对请求和设备范围的 token。
|
||||
|
||||
## 命令
|
||||
|
||||
### `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...>]`
|
||||
|
||||
为特定角色轮换设备 token(可选更新 scope)。
|
||||
|
||||
```
|
||||
openclaw devices rotate --device <deviceId> --role operator --scope operator.read --scope operator.write
|
||||
```
|
||||
|
||||
### `openclaw devices revoke --device <id> --role <role>`
|
||||
|
||||
为特定角色撤销设备 token。
|
||||
|
||||
```
|
||||
openclaw devices revoke --device <deviceId> --role node
|
||||
```
|
||||
|
||||
## 通用选项
|
||||
|
||||
- `--url <url>`:Gateway 网关 WebSocket URL(配置后默认使用 `gateway.remote.url`)。
|
||||
- `--token <token>`:Gateway 网关 token(如需要)。
|
||||
- `--password <password>`:Gateway 网关密码(密码认证)。
|
||||
- `--timeout <ms>`:RPC 超时。
|
||||
- `--json`:JSON 输出(推荐用于脚本)。
|
||||
|
||||
## 注意事项
|
||||
|
||||
- Token 轮换会返回新 token(敏感信息)。请像对待密钥一样对待它。
|
||||
- 这些命令需要 `operator.pairing`(或 `operator.admin`)scope。
|
||||
70
content/cli/directory.md
Normal file
70
content/cli/directory.md
Normal 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(插件):用户 ID(Bot 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
content/cli/dns.md
Normal file
30
content/cli/dns.md
Normal file
@@ -0,0 +1,30 @@
|
||||
---
|
||||
read_when:
|
||||
- 你想通过 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-03T07:44:52Z"
|
||||
model: claude-opus-4-5
|
||||
provider: pi
|
||||
source_hash: d2011e41982ffb4b71ab98211574529bc1c8b7769ab1838abddd593f42b12380
|
||||
source_path: cli/dns.md
|
||||
workflow: 15
|
||||
---
|
||||
|
||||
# `openclaw dns`
|
||||
|
||||
用于广域设备发现(Tailscale + CoreDNS)的 DNS 辅助工具。目前专注于 macOS + Homebrew CoreDNS。
|
||||
|
||||
相关内容:
|
||||
|
||||
- Gateway 网关设备发现:[设备发现](/gateway/discovery)
|
||||
- 广域设备发现配置:[配置](/gateway/configuration)
|
||||
|
||||
## 设置
|
||||
|
||||
```bash
|
||||
openclaw dns setup
|
||||
openclaw dns setup --apply
|
||||
```
|
||||
22
content/cli/docs.md
Normal file
22
content/cli/docs.md
Normal file
@@ -0,0 +1,22 @@
|
||||
---
|
||||
read_when:
|
||||
- 你想从终端搜索实时 OpenClaw 文档
|
||||
summary: "`openclaw docs` 的 CLI 参考(搜索实时文档索引)"
|
||||
title: docs
|
||||
x-i18n:
|
||||
generated_at: "2026-02-03T07:44:50Z"
|
||||
model: claude-opus-4-5
|
||||
provider: pi
|
||||
source_hash: 7a4000e91f7c6ed1140f684e2d1849577651e9389c5c90532a74db58c0b86d47
|
||||
source_path: cli/docs.md
|
||||
workflow: 15
|
||||
---
|
||||
|
||||
# `openclaw docs`
|
||||
|
||||
搜索实时文档索引。
|
||||
|
||||
```bash
|
||||
openclaw docs browser extension
|
||||
openclaw docs sandbox allowHostControl
|
||||
```
|
||||
48
content/cli/doctor.md
Normal file
48
content/cli/doctor.md
Normal file
@@ -0,0 +1,48 @@
|
||||
---
|
||||
read_when:
|
||||
- 你遇到连接/认证问题,需要引导式修复
|
||||
- 你更新后想进行完整性检查
|
||||
summary: "`openclaw doctor` 的 CLI 参考(健康检查 + 引导式修复)"
|
||||
title: doctor
|
||||
x-i18n:
|
||||
generated_at: "2026-02-03T10:04:15Z"
|
||||
model: claude-opus-4-5
|
||||
provider: pi
|
||||
source_hash: 92310aa3f3d111e91a74ce1150359d5d8a8d70a856666d9419e16c60d78209f2
|
||||
source_path: cli/doctor.md
|
||||
workflow: 15
|
||||
---
|
||||
|
||||
# `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
content/cli/gateway.md
Normal file
206
content/cli/gateway.md
Normal 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-03T07:45:15Z"
|
||||
model: claude-opus-4-5
|
||||
provider: pi
|
||||
source_hash: 054dd48056e4784f153c6511c8eb35b56f239db8d4e629661841a00259e9abbf
|
||||
source_path: cli/gateway.md
|
||||
workflow: 15
|
||||
---
|
||||
|
||||
# Gateway 网关 CLI
|
||||
|
||||
Gateway 网关是 OpenClaw 的 WebSocket 服务器(渠道、节点、会话、hooks)。
|
||||
|
||||
本页中的子命令位于 `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` 进行临时/开发运行。
|
||||
- 在没有认证的情况下绑定到 loopback 之外的地址会被阻止(安全护栏)。
|
||||
- `SIGUSR1` 在授权时触发进程内重启(启用 `commands.restart` 或使用 gateway 工具/config apply/update)。
|
||||
- `SIGINT`/`SIGTERM` 处理程序会停止 Gateway 网关进程,但不会恢复任何自定义终端状态。如果你用 TUI 或 raw-mode 输入包装 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(loopback)**即使配置了远程也会探测**。
|
||||
|
||||
如果多个 Gateway 网关可达,它会打印所有。当你使用隔离的配置文件/端口(例如救援机器人)时支持多个 Gateway 网关,但大多数安装仍然运行单个 Gateway 网关。
|
||||
|
||||
```bash
|
||||
openclaw gateway probe
|
||||
openclaw gateway probe --json
|
||||
```
|
||||
|
||||
#### 通过 SSH 远程(Mac 应用对等)
|
||||
|
||||
macOS 应用的"通过 SSH 远程"模式使用本地端口转发,因此远程 Gateway 网关(可能仅绑定到 loopback)变得可以通过 `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` 用于脚本。
|
||||
|
||||
## 发现 Gateway 网关(Bonjour)
|
||||
|
||||
`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
content/cli/health.md
Normal file
28
content/cli/health.md
Normal file
@@ -0,0 +1,28 @@
|
||||
---
|
||||
read_when:
|
||||
- 你想快速检查运行中的 Gateway 网关健康状态
|
||||
summary: "`openclaw health` 的 CLI 参考(通过 RPC 获取 Gateway 网关健康端点)"
|
||||
title: health
|
||||
x-i18n:
|
||||
generated_at: "2026-02-03T07:44:55Z"
|
||||
model: claude-opus-4-5
|
||||
provider: pi
|
||||
source_hash: 82a78a5a97123f7a5736699ae8d793592a736f336c5caced9eba06d14d973fd7
|
||||
source_path: cli/health.md
|
||||
workflow: 15
|
||||
---
|
||||
|
||||
# `openclaw health`
|
||||
|
||||
从运行中的 Gateway 网关获取健康状态。
|
||||
|
||||
```bash
|
||||
openclaw health
|
||||
openclaw health --json
|
||||
openclaw health --verbose
|
||||
```
|
||||
|
||||
注意:
|
||||
|
||||
- `--verbose` 运行实时探测,并在配置了多个账户时打印每个账户的耗时。
|
||||
- 当配置了多个智能体时,输出包括每个智能体的会话存储。
|
||||
298
content/cli/hooks.md
Normal file
298
content/cli/hooks.md
Normal file
@@ -0,0 +1,298 @@
|
||||
---
|
||||
read_when:
|
||||
- 你想管理智能体钩子
|
||||
- 你想安装或更新钩子
|
||||
summary: CLI 参考:`openclaw hooks`(智能体钩子)
|
||||
title: hooks
|
||||
x-i18n:
|
||||
generated_at: "2026-02-03T10:04:32Z"
|
||||
model: claude-opus-4-5
|
||||
provider: pi
|
||||
source_hash: e2032e61ff4b9135cb2708d92eb7889ac627b85a5fc153e3d5b84265f7bd7bc6
|
||||
source_path: cli/hooks.md
|
||||
workflow: 15
|
||||
---
|
||||
|
||||
# `openclaw hooks`
|
||||
|
||||
管理智能体钩子(针对 `/new`、`/reset` 等命令以及 Gateway 网关启动的事件驱动自动化)。
|
||||
|
||||
相关内容:
|
||||
|
||||
- 钩子:[钩子](/automation/hooks)
|
||||
- 插件钩子:[插件](/tools/plugin#plugin-hooks)
|
||||
|
||||
## 列出所有钩子
|
||||
|
||||
```bash
|
||||
openclaw hooks list
|
||||
```
|
||||
|
||||
列出从工作区、托管目录和内置目录中发现的所有钩子。
|
||||
|
||||
**选项:**
|
||||
|
||||
- `--eligible`:仅显示符合条件的钩子(满足要求)
|
||||
- `--json`:以 JSON 格式输出
|
||||
- `-v, --verbose`:显示详细信息,包括缺失的要求
|
||||
|
||||
**示例输出:**
|
||||
|
||||
```
|
||||
Hooks (3/3 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
|
||||
```
|
||||
|
||||
**示例(详细模式):**
|
||||
|
||||
```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/automation/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 文档](/automation/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 文档](/automation/hooks#command-logger)
|
||||
|
||||
### boot-md
|
||||
|
||||
在 Gateway 网关启动时(渠道启动后)运行 `BOOT.md`。
|
||||
|
||||
**事件**:`gateway:startup`
|
||||
|
||||
**启用**:
|
||||
|
||||
```bash
|
||||
openclaw hooks enable boot-md
|
||||
```
|
||||
|
||||
**参见:** [boot-md 文档](/automation/hooks#boot-md)
|
||||
1032
content/cli/index.md
Normal file
1032
content/cli/index.md
Normal file
File diff suppressed because it is too large
Load Diff
31
content/cli/logs.md
Normal file
31
content/cli/logs.md
Normal file
@@ -0,0 +1,31 @@
|
||||
---
|
||||
read_when:
|
||||
- 你需要远程跟踪 Gateway 网关日志(无需 SSH)
|
||||
- 你需要 JSON 日志行用于工具处理
|
||||
summary: "`openclaw logs` 的 CLI 参考(通过 RPC 跟踪 Gateway 网关日志)"
|
||||
title: logs
|
||||
x-i18n:
|
||||
generated_at: "2026-02-03T07:44:57Z"
|
||||
model: claude-opus-4-5
|
||||
provider: pi
|
||||
source_hash: 911a57f0f3b78412c26312f7bf87a5a26418ab7b74e5e2eb40f16edefb6c6b8e
|
||||
source_path: cli/logs.md
|
||||
workflow: 15
|
||||
---
|
||||
|
||||
# `openclaw logs`
|
||||
|
||||
通过 RPC 跟踪 Gateway 网关文件日志(在远程模式下可用)。
|
||||
|
||||
相关内容:
|
||||
|
||||
- 日志概述:[日志](/logging)
|
||||
|
||||
## 示例
|
||||
|
||||
```bash
|
||||
openclaw logs
|
||||
openclaw logs --follow
|
||||
openclaw logs --json
|
||||
openclaw logs --limit 500
|
||||
```
|
||||
52
content/cli/memory.md
Normal file
52
content/cli/memory.md
Normal 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)
|
||||
- 插件:[插件](/tools/plugin)
|
||||
|
||||
## 示例
|
||||
|
||||
```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
content/cli/message.md
Normal file
246
content/cli/message.md
Normal 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`):
|
||||
|
||||
- WhatsApp:E.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
content/cli/models.md
Normal file
85
content/cli/models.md
Normal 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
content/cli/node.md
Normal file
115
content/cli/node.md
Normal file
@@ -0,0 +1,115 @@
|
||||
---
|
||||
read_when:
|
||||
- 运行无头节点主机
|
||||
- 为 system.run 配对非 macOS 节点
|
||||
summary: "`openclaw node` 的 CLI 参考(无头节点主机)"
|
||||
title: node
|
||||
x-i18n:
|
||||
generated_at: "2026-02-03T07:45:07Z"
|
||||
model: claude-opus-4-5
|
||||
provider: pi
|
||||
source_hash: a8b1a57712663e2285c9ecd306fe57d067eb3e6820d7d8aec650b41b022d995a
|
||||
source_path: cli/node.md
|
||||
workflow: 15
|
||||
---
|
||||
|
||||
# `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(清除配对 token)
|
||||
- `--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(清除配对 token)
|
||||
- `--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、token、显示名称和 Gateway 网关连接信息存储在
|
||||
`~/.openclaw/node.json` 中。
|
||||
|
||||
## 执行批准
|
||||
|
||||
`system.run` 受本地执行批准限制:
|
||||
|
||||
- `~/.openclaw/exec-approvals.json`
|
||||
- [执行批准](/tools/exec-approvals)
|
||||
- `openclaw approvals --node <id|name|ip>`(从 Gateway 网关编辑)
|
||||
80
content/cli/nodes.md
Normal file
80
content/cli/nodes.md
Normal file
@@ -0,0 +1,80 @@
|
||||
---
|
||||
read_when:
|
||||
- 你正在管理已配对的节点(摄像头、屏幕、画布)
|
||||
- 你需要批准请求或调用节点命令
|
||||
summary: "`openclaw nodes` 的 CLI 参考(列表/状态/批准/调用,摄像头/画布/屏幕)"
|
||||
title: nodes
|
||||
x-i18n:
|
||||
generated_at: "2026-02-03T10:04:26Z"
|
||||
model: claude-opus-4-5
|
||||
provider: pi
|
||||
source_hash: 23da6efdd659a82dbbc4afd18eb4ab1020a2892f69c28d610f912c8a799f734c
|
||||
source_path: cli/nodes.md
|
||||
workflow: 15
|
||||
---
|
||||
|
||||
# `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
content/cli/onboard.md
Normal file
36
content/cli/onboard.md
Normal file
@@ -0,0 +1,36 @@
|
||||
---
|
||||
read_when:
|
||||
- 你想要 Gateway 网关、工作区、认证、渠道和 Skills 的引导式设置
|
||||
summary: "`openclaw onboard` 的 CLI 参考(交互式新手引导向导)"
|
||||
title: onboard
|
||||
x-i18n:
|
||||
generated_at: "2026-02-03T07:45:00Z"
|
||||
model: claude-opus-4-5
|
||||
provider: pi
|
||||
source_hash: a661049a6983233986a880a68440a3bcc6869ee2c4c6f5e9f3ab8ff973e22f60
|
||||
source_path: cli/onboard.md
|
||||
workflow: 15
|
||||
---
|
||||
|
||||
# `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
content/cli/pairing.md
Normal file
28
content/cli/pairing.md
Normal file
@@ -0,0 +1,28 @@
|
||||
---
|
||||
read_when:
|
||||
- 你正在使用配对模式私信并需要批准发送者
|
||||
summary: "`openclaw pairing` 的 CLI 参考(批准/列出配对请求)"
|
||||
title: pairing
|
||||
x-i18n:
|
||||
generated_at: "2026-02-03T07:45:02Z"
|
||||
model: claude-opus-4-5
|
||||
provider: pi
|
||||
source_hash: e0bc9707294463c95d13e0deb67d834cfad6a105ab44baf4c25592e5de65ddf5
|
||||
source_path: cli/pairing.md
|
||||
workflow: 15
|
||||
---
|
||||
|
||||
# `openclaw pairing`
|
||||
|
||||
批准或检查私信配对请求(适用于支持配对的渠道)。
|
||||
|
||||
相关内容:
|
||||
|
||||
- 配对流程:[配对](/channels/pairing)
|
||||
|
||||
## 命令
|
||||
|
||||
```bash
|
||||
openclaw pairing list whatsapp
|
||||
openclaw pairing approve whatsapp <code> --notify
|
||||
```
|
||||
66
content/cli/plugins.md
Normal file
66
content/cli/plugins.md
Normal file
@@ -0,0 +1,66 @@
|
||||
---
|
||||
read_when:
|
||||
- 你想安装或管理进程内 Gateway 网关插件
|
||||
- 你想调试插件加载失败问题
|
||||
summary: "`openclaw plugins` 的 CLI 参考(列出、安装、启用/禁用、诊断)"
|
||||
title: plugins
|
||||
x-i18n:
|
||||
generated_at: "2026-02-03T07:45:08Z"
|
||||
model: claude-opus-4-5
|
||||
provider: pi
|
||||
source_hash: c6bf76b1e766b912ec30a0101d455151c88f1a778bffa121cdd1d0b4fbe73e1c
|
||||
source_path: cli/plugins.md
|
||||
workflow: 15
|
||||
---
|
||||
|
||||
# `openclaw plugins`
|
||||
|
||||
管理 Gateway 网关插件/扩展(进程内加载)。
|
||||
|
||||
相关内容:
|
||||
|
||||
- 插件系统:[插件](/tools/plugin)
|
||||
- 插件清单 + 模式:[插件清单](/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`,即使为空)。缺少或无效的清单或模式会阻止插件加载并导致配置验证失败。
|
||||
|
||||
### 安装
|
||||
|
||||
```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` 中跟踪)。
|
||||
39
content/cli/qr.md
Normal file
39
content/cli/qr.md
Normal file
@@ -0,0 +1,39 @@
|
||||
---
|
||||
summary: "CLI reference for `openclaw qr` (generate iOS pairing QR + setup code)"
|
||||
read_when:
|
||||
- You want to pair the iOS app with a gateway quickly
|
||||
- You need setup-code output for remote/manual sharing
|
||||
title: "qr"
|
||||
---
|
||||
|
||||
# `openclaw qr`
|
||||
|
||||
Generate an iOS pairing QR and setup code from your current Gateway configuration.
|
||||
|
||||
## Usage
|
||||
|
||||
```bash
|
||||
openclaw qr
|
||||
openclaw qr --setup-code-only
|
||||
openclaw qr --json
|
||||
openclaw qr --remote
|
||||
openclaw qr --url wss://gateway.example/ws --token '<token>'
|
||||
```
|
||||
|
||||
## Options
|
||||
|
||||
- `--remote`: use `gateway.remote.url` plus remote token/password from config
|
||||
- `--url <url>`: override gateway URL used in payload
|
||||
- `--public-url <url>`: override public URL used in payload
|
||||
- `--token <token>`: override gateway token for payload
|
||||
- `--password <password>`: override gateway password for payload
|
||||
- `--setup-code-only`: print only setup code
|
||||
- `--no-ascii`: skip ASCII QR rendering
|
||||
- `--json`: emit JSON (`setupCode`, `gatewayUrl`, `auth`, `urlSource`)
|
||||
|
||||
## Notes
|
||||
|
||||
- `--token` and `--password` are mutually exclusive.
|
||||
- After scanning, approve device pairing with:
|
||||
- `openclaw devices list`
|
||||
- `openclaw devices approve <requestId>`
|
||||
24
content/cli/reset.md
Normal file
24
content/cli/reset.md
Normal 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
content/cli/sandbox.md
Normal file
158
content/cli/sandbox.md
Normal file
@@ -0,0 +1,158 @@
|
||||
---
|
||||
read_when: You are managing sandbox containers or debugging sandbox/tool-policy behavior.
|
||||
status: active
|
||||
summary: 管理沙箱容器并检查生效的沙箱策略
|
||||
title: 沙箱 CLI
|
||||
x-i18n:
|
||||
generated_at: "2026-02-03T07:45:18Z"
|
||||
model: claude-opus-4-5
|
||||
provider: pi
|
||||
source_hash: 6e1186f26c77e188206ce5e198ab624d6b38bc7bb7c06e4d2281b6935c39e347
|
||||
source_path: cli/sandbox.md
|
||||
workflow: 15
|
||||
---
|
||||
|
||||
# 沙箱 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 # List only browser containers
|
||||
openclaw sandbox list --json # JSON output
|
||||
```
|
||||
|
||||
**输出包括:**
|
||||
|
||||
- 容器名称和状态(运行中/已停止)
|
||||
- Docker 镜像及其是否与配置匹配
|
||||
- 创建时间
|
||||
- 空闲时间(自上次使用以来的时间)
|
||||
- 关联的会话/智能体
|
||||
|
||||
### `openclaw sandbox recreate`
|
||||
|
||||
移除沙箱容器以强制使用更新的镜像/配置重新创建。
|
||||
|
||||
```bash
|
||||
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>`:重新创建特定智能体的容器
|
||||
- `--browser`:仅重新创建浏览器容器
|
||||
- `--force`:跳过确认提示
|
||||
|
||||
**重要:** 容器会在智能体下次使用时自动重新创建。
|
||||
|
||||
## 使用场景
|
||||
|
||||
### 更新 Docker 镜像后
|
||||
|
||||
```bash
|
||||
# Pull new image
|
||||
docker pull openclaw-sandbox:latest
|
||||
docker tag openclaw-sandbox:latest openclaw-sandbox:bookworm-slim
|
||||
|
||||
# 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
|
||||
# Edit config: agents.defaults.sandbox.* (or agents.list[].sandbox.*)
|
||||
|
||||
# Recreate to apply new config
|
||||
openclaw sandbox recreate --all
|
||||
```
|
||||
|
||||
### 更改 setupCommand 后
|
||||
|
||||
```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 小时后才被清理
|
||||
- 经常使用的智能体会无限期保持旧容器运行
|
||||
|
||||
**解决方案:** 使用 `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-",
|
||||
// ... more Docker options
|
||||
},
|
||||
"prune": {
|
||||
"idleHours": 24, // Auto-prune after 24h idle
|
||||
"maxAgeDays": 7, // Auto-prune after 7 days
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
```
|
||||
|
||||
## 另请参阅
|
||||
|
||||
- [沙箱文档](/gateway/sandboxing)
|
||||
- [智能体配置](/concepts/agent-workspace)
|
||||
- [Doctor 命令](/gateway/doctor) - 检查沙箱设置
|
||||
163
content/cli/secrets.md
Normal file
163
content/cli/secrets.md
Normal file
@@ -0,0 +1,163 @@
|
||||
---
|
||||
summary: "CLI reference for `openclaw secrets` (reload, audit, configure, apply)"
|
||||
read_when:
|
||||
- Re-resolving secret refs at runtime
|
||||
- Auditing plaintext residues and unresolved refs
|
||||
- Configuring SecretRefs and applying one-way scrub changes
|
||||
title: "secrets"
|
||||
---
|
||||
|
||||
# `openclaw secrets`
|
||||
|
||||
Use `openclaw secrets` to migrate credentials from plaintext to SecretRefs and keep the active secrets runtime healthy.
|
||||
|
||||
Command roles:
|
||||
|
||||
- `reload`: gateway RPC (`secrets.reload`) that re-resolves refs and swaps runtime snapshot only on full success (no config writes).
|
||||
- `audit`: read-only scan of config + auth stores + legacy residues (`.env`, `auth.json`) for plaintext, unresolved refs, and precedence drift.
|
||||
- `configure`: interactive planner for provider setup + target mapping + preflight (TTY required).
|
||||
- `apply`: execute a saved plan (`--dry-run` for validation only), then scrub migrated plaintext residues.
|
||||
|
||||
Recommended operator loop:
|
||||
|
||||
```bash
|
||||
openclaw secrets audit --check
|
||||
openclaw secrets configure
|
||||
openclaw secrets apply --from /tmp/openclaw-secrets-plan.json --dry-run
|
||||
openclaw secrets apply --from /tmp/openclaw-secrets-plan.json
|
||||
openclaw secrets audit --check
|
||||
openclaw secrets reload
|
||||
```
|
||||
|
||||
Exit code note for CI/gates:
|
||||
|
||||
- `audit --check` returns `1` on findings, `2` when refs are unresolved.
|
||||
|
||||
Related:
|
||||
|
||||
- Secrets guide: [Secrets Management](/gateway/secrets)
|
||||
- Security guide: [Security](/gateway/security)
|
||||
|
||||
## Reload runtime snapshot
|
||||
|
||||
Re-resolve secret refs and atomically swap runtime snapshot.
|
||||
|
||||
```bash
|
||||
openclaw secrets reload
|
||||
openclaw secrets reload --json
|
||||
```
|
||||
|
||||
注意事项:
|
||||
|
||||
- Uses gateway RPC method `secrets.reload`.
|
||||
- If resolution fails, gateway keeps last-known-good snapshot and returns an error (no partial activation).
|
||||
- JSON response includes `warningCount`.
|
||||
|
||||
## Audit
|
||||
|
||||
Scan OpenClaw state for:
|
||||
|
||||
- plaintext secret storage
|
||||
- unresolved refs
|
||||
- precedence drift (`auth-profiles` shadowing config refs)
|
||||
- legacy residues (`auth.json`, OAuth out-of-scope notes)
|
||||
|
||||
```bash
|
||||
openclaw secrets audit
|
||||
openclaw secrets audit --check
|
||||
openclaw secrets audit --json
|
||||
```
|
||||
|
||||
Exit behavior:
|
||||
|
||||
- `--check` exits non-zero on findings.
|
||||
- unresolved refs exit with a higher-priority non-zero code.
|
||||
|
||||
Report shape highlights:
|
||||
|
||||
- `status`: `clean | findings | unresolved`
|
||||
- `summary`: `plaintextCount`, `unresolvedRefCount`, `shadowedRefCount`, `legacyResidueCount`
|
||||
- finding codes:
|
||||
- `PLAINTEXT_FOUND`
|
||||
- `REF_UNRESOLVED`
|
||||
- `REF_SHADOWED`
|
||||
- `LEGACY_RESIDUE`
|
||||
|
||||
## Configure (interactive helper)
|
||||
|
||||
Build provider + SecretRef changes interactively, run preflight, and optionally apply:
|
||||
|
||||
```bash
|
||||
openclaw secrets configure
|
||||
openclaw secrets configure --plan-out /tmp/openclaw-secrets-plan.json
|
||||
openclaw secrets configure --apply --yes
|
||||
openclaw secrets configure --providers-only
|
||||
openclaw secrets configure --skip-provider-setup
|
||||
openclaw secrets configure --json
|
||||
```
|
||||
|
||||
Flow:
|
||||
|
||||
- Provider setup first (`add/edit/remove` for `secrets.providers` aliases).
|
||||
- Credential mapping second (select fields and assign `{source, provider, id}` refs).
|
||||
- Preflight and optional apply last.
|
||||
|
||||
Flags:
|
||||
|
||||
- `--providers-only`: configure `secrets.providers` only, skip credential mapping.
|
||||
- `--skip-provider-setup`: skip provider setup and map credentials to existing providers.
|
||||
|
||||
注意事项:
|
||||
|
||||
- Requires an interactive TTY.
|
||||
- You cannot combine `--providers-only` with `--skip-provider-setup`.
|
||||
- `configure` targets secret-bearing fields in `openclaw.json`.
|
||||
- Include all secret-bearing fields you intend to migrate (for example both `models.providers.*.apiKey` and `skills.entries.*.apiKey`) so audit can reach a clean state.
|
||||
- It performs preflight resolution before apply.
|
||||
- Generated plans default to scrub options (`scrubEnv`, `scrubAuthProfilesForProviderTargets`, `scrubLegacyAuthJson` all enabled).
|
||||
- Apply path is one-way for migrated plaintext values.
|
||||
- Without `--apply`, CLI still prompts `Apply this plan now?` after preflight.
|
||||
- With `--apply` (and no `--yes`), CLI prompts an extra irreversible-migration confirmation.
|
||||
|
||||
Exec provider safety note:
|
||||
|
||||
- Homebrew installs often expose symlinked binaries under `/opt/homebrew/bin/*`.
|
||||
- Set `allowSymlinkCommand: true` only when needed for trusted package-manager paths, and pair it with `trustedDirs` (for example `["/opt/homebrew"]`).
|
||||
|
||||
## Apply a saved plan
|
||||
|
||||
Apply or preflight a plan generated previously:
|
||||
|
||||
```bash
|
||||
openclaw secrets apply --from /tmp/openclaw-secrets-plan.json
|
||||
openclaw secrets apply --from /tmp/openclaw-secrets-plan.json --dry-run
|
||||
openclaw secrets apply --from /tmp/openclaw-secrets-plan.json --json
|
||||
```
|
||||
|
||||
Plan contract details (allowed target paths, validation rules, and failure semantics):
|
||||
|
||||
- [Secrets Apply Plan Contract](/gateway/secrets-plan-contract)
|
||||
|
||||
What `apply` may update:
|
||||
|
||||
- `openclaw.json` (SecretRef targets + provider upserts/deletes)
|
||||
- `auth-profiles.json` (provider-target scrubbing)
|
||||
- legacy `auth.json` residues
|
||||
- `~/.openclaw/.env` known secret keys whose values were migrated
|
||||
|
||||
## Why no rollback backups
|
||||
|
||||
`secrets apply` intentionally does not write rollback backups containing old plaintext values.
|
||||
|
||||
Safety comes from strict preflight + atomic-ish apply with best-effort in-memory restore on failure.
|
||||
|
||||
## Example
|
||||
|
||||
```bash
|
||||
# Audit first, then configure, then confirm clean:
|
||||
openclaw secrets audit --check
|
||||
openclaw secrets configure
|
||||
openclaw secrets audit --check
|
||||
```
|
||||
|
||||
If `audit --check` still reports plaintext findings after a partial migration, verify you also migrated skill keys (`skills.entries.*.apiKey`) and any other reported target paths.
|
||||
33
content/cli/security.md
Normal file
33
content/cli/security.md
Normal file
@@ -0,0 +1,33 @@
|
||||
---
|
||||
read_when:
|
||||
- 你想对配置/状态运行快速安全审计
|
||||
- 你想应用安全的"修复"建议(chmod、收紧默认值)
|
||||
summary: "`openclaw security` 的 CLI 参考(审计和修复常见安全隐患)"
|
||||
title: security
|
||||
x-i18n:
|
||||
generated_at: "2026-02-03T07:45:13Z"
|
||||
model: claude-opus-4-5
|
||||
provider: pi
|
||||
source_hash: 19705b0fff848fa6f302b4ed09b7660c64e09048dba517c7f6a833d2db40bebf
|
||||
source_path: cli/security.md
|
||||
workflow: 15
|
||||
---
|
||||
|
||||
# `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 工具时,它也会发出警告。
|
||||
23
content/cli/sessions.md
Normal file
23
content/cli/sessions.md
Normal 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
content/cli/setup.md
Normal file
36
content/cli/setup.md
Normal 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
content/cli/skills.md
Normal file
33
content/cli/skills.md
Normal file
@@ -0,0 +1,33 @@
|
||||
---
|
||||
read_when:
|
||||
- 你想查看哪些 Skills 可用并准备好运行
|
||||
- 你想调试 Skills 缺少的二进制文件/环境变量/配置
|
||||
summary: "`openclaw skills` 的 CLI 参考(列出/信息/检查)和 skill 资格"
|
||||
title: skills
|
||||
x-i18n:
|
||||
generated_at: "2026-02-03T07:45:14Z"
|
||||
model: claude-opus-4-5
|
||||
provider: pi
|
||||
source_hash: 7878442c88a27ec8033f3125c319e9a6a85a1c497a404a06112ad45185c261b0
|
||||
source_path: cli/skills.md
|
||||
workflow: 15
|
||||
---
|
||||
|
||||
# `openclaw skills`
|
||||
|
||||
检查 Skills(内置 + 工作区 + 托管覆盖)并查看哪些符合条件,哪些缺少要求。
|
||||
|
||||
相关内容:
|
||||
|
||||
- Skills 系统:[Skills](/tools/skills)
|
||||
- Skills 配置:[Skills 配置](/tools/skills-config)
|
||||
- ClawHub 安装:[ClawHub](/tools/clawhub)
|
||||
|
||||
## 命令
|
||||
|
||||
```bash
|
||||
openclaw skills list
|
||||
openclaw skills list --eligible
|
||||
openclaw skills info <name>
|
||||
openclaw skills check
|
||||
```
|
||||
33
content/cli/status.md
Normal file
33
content/cli/status.md
Normal file
@@ -0,0 +1,33 @@
|
||||
---
|
||||
read_when:
|
||||
- 你想快速诊断渠道健康状况 + 最近的会话接收者
|
||||
- 你想获取可粘贴的"all"状态用于调试
|
||||
summary: "`openclaw status` 的 CLI 参考(诊断、探测、使用量快照)"
|
||||
title: status
|
||||
x-i18n:
|
||||
generated_at: "2026-02-03T07:45:21Z"
|
||||
model: claude-opus-4-5
|
||||
provider: pi
|
||||
source_hash: 2bbf5579c48034fc15c2cbd5506c50456230b17e4a74c06318968c590d8f1501
|
||||
source_path: cli/status.md
|
||||
workflow: 15
|
||||
---
|
||||
|
||||
# `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(用于源代码检出)。
|
||||
- 更新信息显示在概览中;如果有可用更新,status 会打印提示运行 `openclaw update`(参见[更新](/install/updating))。
|
||||
63
content/cli/system.md
Normal file
63
content/cli/system.md
Normal file
@@ -0,0 +1,63 @@
|
||||
---
|
||||
read_when:
|
||||
- 你想在不创建 cron 作业的情况下入队系统事件
|
||||
- 你需要启用或禁用心跳
|
||||
- 你想检查系统在线状态条目
|
||||
summary: "`openclaw system` 的 CLI 参考(系统事件、心跳、在线状态)"
|
||||
title: system
|
||||
x-i18n:
|
||||
generated_at: "2026-02-03T07:45:23Z"
|
||||
model: claude-opus-4-5
|
||||
provider: pi
|
||||
source_hash: 36ae5dbdec327f5a32f7ef44bdc1f161bad69868de62f5071bb4d25a71bfdfe9
|
||||
source_path: cli/system.md
|
||||
workflow: 15
|
||||
---
|
||||
|
||||
# `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
content/cli/tui.md
Normal file
30
content/cli/tui.md
Normal file
@@ -0,0 +1,30 @@
|
||||
---
|
||||
read_when:
|
||||
- 你想要一个连接 Gateway 网关的终端 UI(支持远程)
|
||||
- 你想从脚本传递 url/token/session
|
||||
summary: "`openclaw tui` 的 CLI 参考(连接到 Gateway 网关的终端 UI)"
|
||||
title: tui
|
||||
x-i18n:
|
||||
generated_at: "2026-02-03T07:45:20Z"
|
||||
model: claude-opus-4-5
|
||||
provider: pi
|
||||
source_hash: f0a97d92e08746a9d6a4f31d361ccad9aea4c3dc61cfafb310d88715f61cfb64
|
||||
source_path: cli/tui.md
|
||||
workflow: 15
|
||||
---
|
||||
|
||||
# `openclaw tui`
|
||||
|
||||
打开连接到 Gateway 网关的终端 UI。
|
||||
|
||||
相关:
|
||||
|
||||
- TUI 指南:[TUI](/web/tui)
|
||||
|
||||
## 示例
|
||||
|
||||
```bash
|
||||
openclaw tui
|
||||
openclaw tui --url ws://127.0.0.1:18789 --token <token>
|
||||
openclaw tui --session main --deliver
|
||||
```
|
||||
24
content/cli/uninstall.md
Normal file
24
content/cli/uninstall.md
Normal file
@@ -0,0 +1,24 @@
|
||||
---
|
||||
read_when:
|
||||
- 你想移除 Gateway 网关服务和/或本地状态
|
||||
- 你想先进行试运行
|
||||
summary: "`openclaw uninstall` 的 CLI 参考(移除 Gateway 网关服务 + 本地数据)"
|
||||
title: uninstall
|
||||
x-i18n:
|
||||
generated_at: "2026-02-03T10:04:23Z"
|
||||
model: claude-opus-4-5
|
||||
provider: pi
|
||||
source_hash: 8d6c3890923f18f95c12b76443d649a6b404934ebd054fb86a9fa1abae843fe4
|
||||
source_path: cli/uninstall.md
|
||||
workflow: 15
|
||||
---
|
||||
|
||||
# `openclaw uninstall`
|
||||
|
||||
卸载 Gateway 网关服务 + 本地数据(CLI 保留)。
|
||||
|
||||
```bash
|
||||
openclaw uninstall
|
||||
openclaw uninstall --all --yes
|
||||
openclaw uninstall --dry-run
|
||||
```
|
||||
101
content/cli/update.md
Normal file
101
content/cli/update.md
Normal file
@@ -0,0 +1,101 @@
|
||||
---
|
||||
read_when:
|
||||
- 你想安全地更新源码检出
|
||||
- 你需要了解 `--update` 简写行为
|
||||
summary: "`openclaw update` 的 CLI 参考(相对安全的源码更新 + Gateway 网关自动重启)"
|
||||
title: update
|
||||
x-i18n:
|
||||
generated_at: "2026-02-03T07:45:34Z"
|
||||
model: claude-opus-4-5
|
||||
provider: pi
|
||||
source_hash: 3a08e8ac797612c498eef54ecb83e61c9a1ee5de09162a01dbb4b3bd72897206
|
||||
source_path: cli/update.md
|
||||
workflow: 15
|
||||
---
|
||||
|
||||
# `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. 构建 + 构建控制界面。
|
||||
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)
|
||||
41
content/cli/voicecall.md
Normal file
41
content/cli/voicecall.md
Normal 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>
|
||||
```
|
||||
|
||||
## 暴露 Webhook(Tailscale)
|
||||
|
||||
```bash
|
||||
openclaw voicecall expose --mode serve
|
||||
openclaw voicecall expose --mode funnel
|
||||
openclaw voicecall unexpose
|
||||
```
|
||||
|
||||
安全提示:仅将 webhook 端点暴露给你信任的网络。尽可能优先使用 Tailscale Serve 而非 Funnel。
|
||||
32
content/cli/webhooks.md
Normal file
32
content/cli/webhooks.md
Normal 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)。
|
||||
Reference in New Issue
Block a user