Files
openclaw/docs/zh-CN/cli/approvals.md
Josh Palmer 5676a6b38d Docs: normalize zh-CN terminology + tone
What: switch to 你/你的 tone; standardize Skills/Gateway网关/local loopback/私信 wording
Why: align zh-CN docs with issue 6995 feedback + idiomatic tech style
Tests: pnpm docs:build
2026-02-02 16:38:25 +01:00

58 lines
1.8 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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