Caricamento in corso...
Caricamento in corso...
Last synced: Today, 22:00
Technical reference for the OpenClaw framework. Real-time synchronization with the official documentation engine.
Use this file to discover all available pages before exploring further.
Config helpers for non-interactive edits in
openclaw.jsonopenclaw configureSupported guided sections:
workspacemodelwebgatewaydaemonchannelspluginsskillshealthbashopenclaw config file openclaw config --section model openclaw config --section gateway --section daemon openclaw config schema openclaw config get browser.executablePath openclaw config set browser.executablePath "/usr/bin/google-chrome" openclaw config set browser.profiles.work.executablePath "/Applications/Google Chrome.app/Contents/MacOS/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 set agents.defaults.models '{"openai/gpt-5.4":{}}' --strict-json --merge openclaw config set channels.discord.token --ref-provider default --ref-source env --ref-id DISCORD_BOT_TOKEN openclaw config set secrets.providers.vaultfile --provider-source file --provider-path /etc/openclaw/secrets.json --provider-mode json openclaw config patch --file ./openclaw.patch.json5 --dry-run openclaw config unset plugins.entries.brave.config.webSearch.apiKey openclaw config set channels.discord.token --ref-provider default --ref-source env --ref-id DISCORD_BOT_TOKEN --dry-run openclaw config validate openclaw config validate --json
config schemaPrint the generated JSON schema for
openclaw.jsonbashopenclaw config schema
Pipe it into a file when you want to inspect or validate it with other tools:
bashopenclaw config schema > openclaw.schema.json
Paths use dot or bracket notation:
bashopenclaw config get agents.defaults.workspace openclaw config get agents.list[0].id
Use the agent list index to target a specific agent:
bashopenclaw config get agents.list openclaw config set agents.list[1].tools.exec.node "node-id-or-name"
Values are parsed as JSON5 when possible; otherwise they are treated as strings. Use
--strict-json--jsonbashopenclaw config set agents.defaults.heartbeat.every "0m" openclaw config set gateway.port 19001 --strict-json openclaw config set channels.whatsapp.groups '["*"]' --strict-json
config get <path> --jsonUse
--mergebashopenclaw config set agents.defaults.models '{"openai/gpt-5.4":{}}' --strict-json --merge openclaw config set models.providers.ollama.models '[{"id":"llama3.2","name":"Llama 3.2"}]' --strict-json --merge
Use
--replaceconfig setopenclaw config settext```bash} openclaw config set secrets.providers.vault \ --provider-source exec \ --provider-command /usr/local/bin/openclaw-vault \ --provider-arg read \ --provider-arg openai/api-key \ --provider-timeout-ms 5000 ```
text```bash} openclaw config set --batch-file ./config-set.batch.json --dry-run ```
Batch parsing always uses the batch payload (
--batch-json--batch-file--strict-json--jsonconfig patchUse
config patchconfig setnullbashopenclaw config patch --file ./openclaw.patch.json5 --dry-run openclaw config patch --file ./openclaw.patch.json5
You can also pipe a patch over stdin, which is useful for remote setup scripts:
bashssh openclaw-host 'openclaw config patch --stdin --dry-run' < ./openclaw.patch.json5 ssh openclaw-host 'openclaw config patch --stdin' < ./openclaw.patch.json5
Example patch:
json5{ channels: { slack: { enabled: true, mode: "socket", botToken: { source: "env", provider: "default", id: "SLACK_BOT_TOKEN" }, appToken: { source: "env", provider: "default", id: "SLACK_APP_TOKEN" }, groupPolicy: "open", requireMention: false, }, discord: { enabled: true, token: { source: "env", provider: "default", id: "DISCORD_BOT_TOKEN" }, dmPolicy: "disabled", dm: { enabled: false }, groupPolicy: "allowlist", }, }, agents: { defaults: { model: { primary: "openai/gpt-5.5" }, models: { "openai/gpt-5.5": { params: { fastMode: true } }, }, }, }, }
Use
--replace-path <path>bashopenclaw config patch --file ./discord.patch.json5 --replace-path 'channels.discord.guilds["123"].channels'
--dry-run--allow-execJSON path/value mode remains supported for both SecretRefs and providers:
bashopenclaw config set channels.discord.token \ '{"source":"env","provider":"default","id":"DISCORD_BOT_TOKEN"}' \ --strict-json openclaw config set secrets.providers.vaultfile \ '{"source":"file","path":"/etc/openclaw/secrets.json","mode":"json"}' \ --strict-json
Provider builder targets must use
secrets.providers.<alias>Hardened exec provider example:
bashopenclaw config set secrets.providers.vault \ --provider-source exec \ --provider-command /usr/local/bin/openclaw-vault \ --provider-arg read \ --provider-arg openai/api-key \ --provider-json-only \ --provider-pass-env VAULT_TOKEN \ --provider-trusted-dir /usr/local/bin \ --provider-timeout-ms 5000
Use
--dry-runopenclaw.jsonbashopenclaw config set channels.discord.token \ --ref-provider default \ --ref-source env \ --ref-id DISCORD_BOT_TOKEN \ --dry-run openclaw config set channels.discord.token \ --ref-provider default \ --ref-source env \ --ref-id DISCORD_BOT_TOKEN \ --dry-run \ --json openclaw config set channels.discord.token \ --ref-provider vault \ --ref-source exec \ --ref-id discord/token \ --dry-run \ --allow-exec
json5{ ok: boolean, operations: number, configPath: string, inputModes: ["value" | "json" | "builder", ...], checks: { schema: boolean, resolvability: boolean, resolvabilityComplete: boolean, }, refsChecked: number, skippedExecRefs: number, errors?: [ { kind: "schema" | "resolvability", message: string, ref?: string, // present for resolvability errors }, ], }
openclaw config setopenclaw.json.rejected.*Prefer CLI writes for small edits:
bashopenclaw config set gateway.reload.mode hybrid --dry-run openclaw config set gateway.reload.mode hybrid openclaw config validate
If a write is rejected, inspect the saved payload and fix the full config shape:
bashCONFIG="$(openclaw config file)" ls -lt "$CONFIG".rejected.* 2>/dev/null | head openclaw config validate
Direct editor writes are still allowed, but the running Gateway treats them as untrusted until they validate. Invalid direct edits can be restored from the last-known-good backup during startup or hot reload. See Gateway troubleshooting.
Whole-file recovery is reserved for globally broken config, such as parse errors, root-level schema failures, legacy migration failures, or mixed plugin and root failures. If validation fails only under
plugins.entries.<id>...openclaw.json.last-goodminHostVersionconfig fileOPENCLAW_CONFIG_PATHRestart the gateway after edits.
Validate the current config against the active schema without starting the gateway.
bashopenclaw config validate openclaw config validate --json
After
openclaw config validatebashopenclaw chat
Then inside the TUI:
text!openclaw config file !openclaw docs gateway auth token secretref !openclaw config validate !openclaw doctor
Typical repair loop:
© 2024 TaskFlow Mirror
Powered by TaskFlow Sync Engine