openclaw approvals / openclaw exec-policy
管理本地主机、Gateway 主机或节点主机的 exec 审批。
# 查看审批状态
openclaw exec-policy show
openclaw exec-policy show --json
# 应用预设
openclaw exec-policy preset yolo # 允许所有
openclaw exec-policy preset cautious # 谨慎模式
# 设置策略
openclaw exec-policy set --host gateway --security full
# 管理白名单
openclaw approvals allowlist add "/usr/bin/git"
openclaw approvals allowlist add --node <id> "/usr/bin/uname"
openclaw approvals allowlist list
openclaw approvals allowlist remove "/usr/bin/git"注意:exec-policy 仅本地,不推送到 Gateway 或节点主机。
openclaw sandbox
管理沙箱运行时(Docker/SSH/OpenShell)。
# 查看有效沙箱策略
openclaw sandbox explain
openclaw sandbox explain --session agent:main:main
openclaw sandbox explain --agent work
openclaw sandbox explain --json
# 列出沙箱
openclaw sandbox list
# 重建沙箱(更新后)
openclaw sandbox recreate
openclaw sandbox recreate --scope agentopenclaw tui / openclaw chat
终端 UI,连接 Gateway 或本地嵌入式运行时。
# 连接 Gateway
openclaw tui
openclaw tui --url ws://127.0.0.1:18789 --token <token>
openclaw tui --session main
# 本地嵌入式模式(无 Gateway)
openclaw tui --local
openclaw chat # 等同于 tui --local
openclaw terminal # 等同于 tui --local
# 发送初始消息
openclaw tui --message "Hello"
openclaw tui --local --thinking highopenclaw infer
直接推理命令(不通过 Agent 循环)。
openclaw infer model run -m "Hello"
openclaw infer model run --model anthropic/claude-opus-4-6 -m "Hello"
openclaw infer model run --stream-raw # 原始流输出(调试推理泄漏)相关
- concepts/tool-exec-approvals — exec 审批概念
- concepts/gateway-sandboxing — 沙箱配置
- concepts/cli-index — CLI 命令索引