2026-01-18 15:23:36 +00:00
|
|
|
---
|
2026-01-30 03:15:10 +01:00
|
|
|
summary: "CLI reference for `openclaw approvals` (exec approvals for gateway or node hosts)"
|
2026-01-18 15:23:36 +00:00
|
|
|
read_when:
|
|
|
|
|
- You want to edit exec approvals from the CLI
|
|
|
|
|
- You need to manage allowlists on gateway or node hosts
|
2026-01-31 16:04:03 -05:00
|
|
|
title: "approvals"
|
2026-01-18 15:23:36 +00:00
|
|
|
---
|
|
|
|
|
|
2026-01-30 03:15:10 +01:00
|
|
|
# `openclaw approvals`
|
2026-01-18 15:23:36 +00:00
|
|
|
|
2026-01-21 09:54:48 +00:00
|
|
|
Manage exec approvals for the **local host**, **gateway host**, or a **node host**.
|
|
|
|
|
By default, commands target the local approvals file on disk. Use `--gateway` to target the gateway, or `--node` to target a specific node.
|
2026-01-18 15:23:36 +00:00
|
|
|
|
|
|
|
|
Related:
|
2026-01-31 21:13:13 +09:00
|
|
|
|
2026-01-18 15:23:36 +00:00
|
|
|
- Exec approvals: [Exec approvals](/tools/exec-approvals)
|
|
|
|
|
- Nodes: [Nodes](/nodes)
|
|
|
|
|
|
|
|
|
|
## Common commands
|
|
|
|
|
|
|
|
|
|
```bash
|
2026-01-30 03:15:10 +01:00
|
|
|
openclaw approvals get
|
|
|
|
|
openclaw approvals get --node <id|name|ip>
|
|
|
|
|
openclaw approvals get --gateway
|
2026-01-18 15:23:36 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
|
|
## Replace approvals from a file
|
|
|
|
|
|
|
|
|
|
```bash
|
2026-01-30 03:15:10 +01:00
|
|
|
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
|
2026-01-18 15:23:36 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
|
|
## Allowlist helpers
|
|
|
|
|
|
|
|
|
|
```bash
|
2026-01-30 03:15:10 +01:00
|
|
|
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"
|
2026-01-18 15:23:36 +00:00
|
|
|
|
2026-01-30 03:15:10 +01:00
|
|
|
openclaw approvals allowlist remove "~/Projects/**/bin/rg"
|
2026-01-18 15:23:36 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
|
|
## Notes
|
|
|
|
|
|
2026-01-30 03:15:10 +01:00
|
|
|
- `--node` uses the same resolver as `openclaw nodes` (id, name, ip, or id prefix).
|
2026-01-21 09:54:48 +00:00
|
|
|
- `--agent` defaults to `"*"`, which applies to all agents.
|
2026-01-18 15:23:36 +00:00
|
|
|
- The node host must advertise `system.execApprovals.get/set` (macOS app or headless node host).
|
2026-01-30 03:15:10 +01:00
|
|
|
- Approvals files are stored per host at `~/.openclaw/exec-approvals.json`.
|