返回顶部
o

openclaw-config-masterOpenClaw配置编辑

Edit and validate OpenClaw Gateway config (openclaw.json / JSON5). Covers all config areas — gateway, agents, channels, models, auth, tools, commands, session, hooks, secrets, acp, messages, plugins, skills, $include. Use when adding/changing config keys or diagnosing openclaw doctor/config validation errors, to avoid schema mismatches that prevent the Gateway from starting or weaken security policies.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.3.3
安全检测
已通过
209
下载量
免费
免费
0
收藏
概述
安装方式
版本历史

openclaw-config-master

OpenClaw Config

一句话

用 schema-first 工作流安全编辑 OpenClaw 配置文件,验证先行,避免无效 key 导致 Gateway 无法启动或安全策略被破坏。



核心要点(5条)

  1. 1. Schema 先行 — 不猜 key,用 gateway config.schema.lookup path=目标路径 获取权威 schema
  2. 在线修改 — 优先用 gateway config.patch 在线修改(自动验证+重启),备选 openclaw config set CLI
  3. 验证不可跳 — config.patch 自动验证;手动编辑后必须跑 openclaw doctor
  4. 严格模式 — 大多数对象是 .strict(),未知 key 会导致 Gateway 拒绝启动
  5. 不轻易用 --fix — openclaw doctor --fix/--yes 会写文件,需用户明确同意
  6. 受保护路径 — 部分敏感路径(如 tools.exec.ask)config.patch 无法修改,会返回 cannot change protected config paths 错误。遇此情况需直接编辑 openclaw.json 后 openclaw gateway restart

配置覆盖范围(全部顶层 key)

顶层 key子模块说明
gatewayport, mode, bind, auth, tailscale, nodes, controlUi网关核心:端口、模式、认证、Tailscale、节点策略
agents
defaults, list | Agent 配置:默认模型/工具/工作区 + agent 列表 | | channels | telegram, feishu, discord, slack, whatsapp, signal, imessage, ... | 渠道配置:每个渠道的连接、策略、审批 | | models | providers, mode, bedrockDiscovery | 模型目录:提供者定义、合并模式、Bedrock 发现 | | auth | profiles | 认证配置:API Key / OAuth 认证档案 | | tools | exec, web, fs, media, links, sessions, loopDetection, message, agentToAgent, elevated, subagents, sandbox, sessions_spawn, profile, allow, alsoAllow, deny, byProvider | 工具策略:执行、网络、文件系统、媒体、沙箱、子代理 | | commands | bash, config, mcp, plugins, debug, restart, text, native, nativeSkills, allowFrom, ownerDisplay, ... | 命令控制:聊天命令开关、权限、提权规则 | | session | scope, dmScope, reset, resetByType, resetByChannel, store, typingMode, identityLinks, threadBindings, maintenance, sendPolicy, agentToAgent, ... | 会话管理:路由、重置策略、存储、线程绑定、维护 | | hooks | internal, external | 钩子:内部钩子(session-memory)+ 外部钩子 | | secrets | providers | 密钥管理:文件/环境变量等密钥提供者 | | acp | enabled, backend, defaultAgent, allowedAgents | ACP 后端:Agent 托管运行时配置 | | messages | ackReactionScope | 消息行为:确认反应范围等 | | plugins | enabled, allow, deny, load, slots, entries, installs | 插件系统:启用/禁用、加载路径、安装记录 | | skills | (skills 配置) | 技能配置 | | meta | lastTouchedVersion, lastTouchAt | 系统元数据(自动管理) | | wizard | lastRunAt, lastRunVersion, lastRunCommand, lastRunMode | 向导元数据(自动管理) | | $include | — | 模块化配置:分割到多个 JSON5 文件 |

工作流程

重要:在提供任何配置指导之前,必须按以下步骤执行前置检查。

第一步:查官方文档(必做)

每次修改配置前,必须先查阅官方最新文档确认字段和用法。 技能内的文档可能滞后于官方更新。

在线文档(权威来源)

文档链接用途
配置指南https://docs.openclaw.ai/gateway/configuration所有配置项的完整说明
配置参考
https://docs.openclaw.ai/gateway/configuration-reference | 字段类型、默认值、示例 | | Config CLI | https://docs.openclaw.ai/cli/config | config set/get/unset 用法 | | Update CLI | https://docs.openclaw.ai/cli/update | 版本更新命令 | | Channels CLI | https://docs.openclaw.ai/cli/channels | 渠道管理命令 | | Skills CLI | https://docs.openclaw.ai/cli/skills | 技能管理命令 | | Security CLI | https://docs.openclaw.ai/cli/security | 安全审计命令 | | Models | https://docs.openclaw.ai/gateway/models | 模型提供者配置 | | Agents | https://docs.openclaw.ai/gateway/agents | Agent 配置 | | Tools | https://docs.openclaw.ai/gateway/tools | 工具配置 | | Plugins | https://docs.openclaw.ai/gateway/plugins | 插件配置 | | Cron | https://docs.openclaw.ai/gateway/cron | 定时任务配置 | | Session | https://docs.openclaw.ai/gateway/session | 会话配置 |

内置文档搜索

bash

搜索特定主题的官方文档


openclaw docs configuration
openclaw docs telegram
openclaw docs exec approvals
openclaw docs models
openclaw docs session

在线 Schema 查询

通过 gateway 工具查询(推荐)

gateway config.schema.lookup path=目标路径

CLI 方式

openclaw config schema

何时查什么

场景查什么
添加/修改模型配置参考 + models 文档 + schema lookup
配置渠道
配置参考 + Channels CLI + schema lookup | | 修改安全策略 | 配置指南 + Security CLI + schema lookup | | 会话/重置策略 | 配置参考 + session 文档 + schema lookup | | 工具权限控制 | 配置参考 + tools 文档 + schema lookup | | 版本升级后配置不兼容 | 配置参考 + Update CLI + references/version-migration.md | | 不确定字段名/类型 | 先查 schema lookup,再查配置参考 |

第二步:版本检查

bash

检查本地版本


openclaw --version

检查最新版本

openclaw update status --json

如果本地版本不是最新:提醒用户先更新:openclaw update

第三步:执行修改


两种修改模式

模式 A:在线修改(推荐)

通过 gateway 工具直接修改,自动验证+重启:

1. 查询当前值

gateway config.get path=commands.bash

2. 查询 schema 确认字段合法性

gateway config.schema.lookup path=commands

3. 应用修改(用户确认后)

gateway config.patch raw={commands:{bash:true}} note=启用 bash 命令
  • - config.patch:部分更新,与现有配置合并,适合修改少量字段
  • config.apply:全量替换,适合大规模重构
  • 两者都会自动验证 schema + 写入 + 重启 Gateway
  • note 参数必填,用于重启后通知用户

模式 B:CLI 命令(备选)

无法使用 gateway 工具时,生成命令供用户执行:

bash

设置值


openclaw config set --json

验证

openclaw config validate

重启

openclaw gateway restart

在线修改配置的标准流程

修改任何配置前,按此流程操作:

  1. 1. 查 schema — gateway config.schema.lookup path=目标路径,确认字段名和类型
  2. 读当前值 — gateway config.get path=目标路径,了解现状
  3. 向用户说明 — 描述要改什么、为什么改、预期影响
  4. 执行修改 — 用户确认后,gateway config.patch raw={...} note=变更说明
  5. 验证结果 — 重启后自动通知,检查新配置是否生效

注意:config.patch 会自动写入、验证 schema、重启 Gateway。不需要手动 openclaw doctor。



详细配置参考

gateway — 网关核心

json
gateway: {
port: 18789, // 监听端口
mode:

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 openclaw-config-master-1775981775 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 openclaw-config-master-1775981775 技能

通过命令行安装

skillhub install openclaw-config-master-1775981775

下载

⬇ 下载 openclaw-config-master v1.3.3(免费)

文件大小: 68.34 KB | 发布时间: 2026-4-13 11:18

v1.3.3 最新 2026-4-13 11:18
补充受保护路径说明

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部