CLI commands
èšå®
openclaw.json çšã®é察話ãã«ããŒ: ãã¹ã§å€ã get/set/patch/unset ãããã¹ããŒããåºåãããæ€èšŒããããŸãã¯ã¢ã¯ãã£ããªãã¡ã€ã«ãã¹ãåºåããããµãã³ãã³ããªãã§ openclaw config ãå®è¡ãããšãopenclaw configure ãšåãã¬ã€ãä»ããŠã£ã¶ãŒããéãã
ã«ãŒããªãã·ã§ã³
OPENCLAW_DOCS_MARKER:paramOpen:IHBhdGg9Ii0tc2VjdGlvbiA8c2VjdGlvbg
" type="string">
ãµãã³ãã³ããªãã§ openclaw config ãå®è¡ãããšãã«ç¹°ãè¿ãæå®ã§ãããã¬ã€ãä»ãã»ããã¢ããã®ã»ã¯ã·ã§ã³ãã£ã«ã¿ãŒã
ã¬ã€ãä»ãã»ã¯ã·ã§ã³: workspaceãmodelãwebãgatewayãdaemonãchannelsãpluginsãskillsãhealthã
äŸ
openclaw config fileopenclaw config --section modelopenclaw config --section gateway --section daemonopenclaw config schemaopenclaw config get browser.executablePathopenclaw 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 --mergeopenclaw config set channels.discord.token --ref-provider default --ref-source env --ref-id DISCORD_BOT_TOKENopenclaw config set secrets.providers.vaultfile --provider-source file --provider-path /etc/openclaw/secrets.json --provider-mode jsonopenclaw config patch --file ./openclaw.patch.json5 --dry-runopenclaw config unset plugins.entries.brave.config.webSearch.apiKeyopenclaw config set channels.discord.token --ref-provider default --ref-source env --ref-id DISCORD_BOT_TOKEN --dry-runopenclaw config validateopenclaw config validate --jsonãã¹
ãããèšæ³ãŸãã¯ãã©ã±ããèšæ³ãã·ã§ã«ã®äŸã§ã¯ãzsh ã [0] ã glob å±éããªãããã«ããã©ã±ãããã¹ãåŒçšç¬Šã§å²ã:
openclaw config get agents.defaults.workspaceopenclaw config get 'agents.list[0].id'openclaw config get agents.listopenclaw config set 'agents.list[1].tools.exec.node' "node-id-or-name"config get
墚æ¶ãæžã¿ã®èšå®ã¹ãããã·ã§ããããå€ãèªã¿åãïŒã·ãŒã¯ã¬ããã¯åºåãããªãïŒã--json ã¯çã®å€ã JSON ãšããŠåºåããããã以å€ã®å Žåãæåå/æ°å€/çåœå€ã¯ãã®ãŸãŸåºåããããªããžã§ã¯ã/é
åã¯æŽåœ¢æžã¿ JSON ãšããŠåºåãããã
openclaw config get browser.executablePathopenclaw config get agents.defaults.model --jsonconfig file
OPENCLAW_CONFIG_PATH ãŸãã¯ããã©ã«ãã®å Žæãã解決ããããã¢ã¯ãã£ããªèšå®ãã¡ã€ã«ã®ãã¹ãåºåããããã®ãã¹ã¯ã·ã³ããªãã¯ãªã³ã¯ã§ã¯ãªãéåžžãã¡ã€ã«ãæããæžã蟌ã¿å®å
šæ§ãåç
§ã
config schema
openclaw.json çšã«çæããã JSON ã¹ããŒãã stdout ã«åºåããã
What it includes
- çŸåšã®ã«ãŒãèšå®ã¹ããŒãã«å ãããšãã£ã¿ãŒããŒã«çšã®ã«ãŒã
$schemaæååãã£ãŒã«ãã - Control UI ã§äœ¿çšããããã£ãŒã«ã
title/descriptionã®ããã¥ã¡ã³ãã¡ã¿ããŒã¿ã - ãã¹ãããããªããžã§ã¯ããã¯ã€ã«ãã«ãŒãïŒ
*ïŒãé åé ç®ïŒ[]ïŒããŒãã¯ãäžèŽãããã£ãŒã«ãããã¥ã¡ã³ããååšããå Žåãåãtitle/descriptionã¡ã¿ããŒã¿ãç¶æ¿ããã anyOf/oneOf/allOfãã©ã³ããåãããã¥ã¡ã³ãã¡ã¿ããŒã¿ãç¶æ¿ããã- ã©ã³ã¿ã€ã ãããã§ã¹ããèªã¿èŸŒããå Žåã¯ããã¹ããšãã©ãŒãã®ã©ã€ã Plugin + ãã£ã³ãã«ã¹ããŒãã¡ã¿ããŒã¿ã
- çŸåšã®èšå®ãç¡å¹ãªå Žåã§ããã¯ãªãŒã³ãªãã©ãŒã«ããã¯ã¹ããŒãã
Related runtime RPC
config.schema.lookup ã¯ãæµ
ãã¹ããŒãããŒãïŒtitleãdescriptionãtypeãenumãconstãå
±éã®å¢çïŒãäžèŽãã UI ãã³ãã¡ã¿ããŒã¿ãçŽäžã®åã®èŠçŽãå«ããæ£èŠåæžã¿ã®èšå®ãã¹ã 1 ã€è¿ããControl UI ãŸãã¯ã«ã¹ã¿ã ã¯ã©ã€ã¢ã³ãã§ããã¹åäœã®ããªã«ããŠã³ã«äœ¿çšããã
openclaw config schemaopenclaw config schema > openclaw.schema.jsonconfig validate
Gateway ãèµ·åããã«ãçŸåšã®èšå®ãã¢ã¯ãã£ããªã¹ããŒãã«å¯ŸããŠæ€èšŒããã
openclaw config validateopenclaw config validate --jsonå€
å€ã¯å¯èœãªå Žå JSON5 ãšããŠè§£æããããã以å€ã®å Žåã¯çã®æååãšããŠæ±ããããæååãã©ãŒã«ããã¯ãªãã§æšæº JSON ãèŠæ±ããã«ã¯ --strict-json ã䜿çšããïŒãã®å Žåãã³ã¡ã³ããæ«å°Ÿã«ã³ããåŒçšç¬ŠãªãããŒãªã©ã® JSON5 å°çšæ§æã¯æåŠãããïŒã--json 㯠config set ã«ããã --strict-json ã®ã¬ã¬ã·ãŒãšã€ãªã¢ã¹ã
openclaw config set agents.defaults.heartbeat.every "0m"openclaw config set gateway.port 19001 --strict-jsonopenclaw config set channels.whatsapp.groups '["*"]' --strict-jsonconfig get <path> --json ã¯ã端æ«çšã«æŽåœ¢ãããããã¹ãã§ã¯ãªããçã®å€ã JSON ãšããŠåºåããã
ãããã®ãããã«ãšã³ããªã远å ãããšã㯠--merge ã䜿çšãã:
openclaw config set agents.defaults.models '{"openai/gpt-5.4":{}}' --strict-json --mergeopenclaw config set models.providers.ollama.models '[{"id":"llama3.2","name":"Llama 3.2"}]' --strict-json --mergeæå®ããå€ãæå³çã«å¯Ÿè±¡å€å
šäœã«ããå Žåã«ã®ã¿ã--replace ã䜿çšããã
config set ã¢ãŒã
Value mode
openclaw config set <path> <value>SecretRef builder mode
openclaw config set channels.discord.token \ --ref-provider default \ --ref-source env \ --ref-id DISCORD_BOT_TOKENProvider builder mode
secrets.providers.<alias> ãã¹ã®ã¿ã察象ã«ãã:
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 5000Batch mode
openclaw config set --batch-json '[ { "path": "secrets.providers.default", "provider": { "source": "env" } }, { "path": "channels.discord.token", "ref": { "source": "env", "provider": "default", "id": "DISCORD_BOT_TOKEN" } }]'openclaw config set --batch-file ./config-set.batch.json --dry-runãããè§£æã§ã¯åžžã«ããããã€ããŒãïŒ--batch-json/--batch-fileïŒãä¿¡é Œã§ããæ
å ±æºãšããŠäœ¿ãããã--strict-json / --json ã¯ãããè§£æã®åäœã倿Žããªãã
JSON ãã¹/å€ã¢ãŒã㯠SecretRef ãšãããã€ããŒã«ãçŽæ¥äœ¿çšã§ãã:
openclaw 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ãããã€ããŒãã«ããŒãã©ã°
ãããã€ããŒãã«ããŒã®å¯Ÿè±¡ã«ã¯ããã¹ãšã㊠secrets.providers.<alias> ã䜿çšããå¿
èŠãããã
Common flags
--provider-source <env|file|exec>--provider-timeout-ms <ms>ïŒfileãexecïŒ
Env provider (--provider-source env)
--provider-allowlist <ENV_VAR>ïŒç¹°ãè¿ãæå®å¯ïŒ
File provider (--provider-source file)
--provider-path <path>ïŒå¿ é ïŒ--provider-mode <singleValue|json>--provider-max-bytes <bytes>--provider-allow-insecure-path
Exec provider (--provider-source exec)
--provider-command <path>ïŒå¿ é ïŒ--provider-arg <arg>ïŒç¹°ãè¿ãæå®å¯ïŒ--provider-no-output-timeout-ms <ms>--provider-max-output-bytes <bytes>--provider-json-only--provider-env <KEY=VALUE>ïŒç¹°ãè¿ãæå®å¯ïŒ--provider-pass-env <ENV_VAR>ïŒç¹°ãè¿ãæå®å¯ïŒ--provider-trusted-dir <path>ïŒç¹°ãè¿ãæå®å¯ïŒ--provider-allow-insecure-path--provider-allow-symlink-command
匷åããã exec ãããã€ããŒã®äŸ:
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-json-only \ --provider-pass-env VAULT_TOKEN \ --provider-trusted-dir /usr/local/bin \ --provider-timeout-ms 5000config patch
ãã¹ããŒã¹ã® config set ã³ãã³ãã倿°å®è¡ãã代ããã«ãèšå®ã®åœ¢ããã JSON5 ãããã貌ãä»ããããã€ãããããªããžã§ã¯ãã¯ååž°çã«ããŒãžãããé
åãšã¹ã«ã©ãŒå€ã¯å¯Ÿè±¡ã眮ãæããnull ã¯å¯Ÿè±¡ãã¹ãåé€ããã
openclaw config patch --file ./openclaw.patch.json5 --dry-runopenclaw config patch --file ./openclaw.patch.json5ãªã¢ãŒãã»ããã¢ããã¹ã¯ãªããã§ã¯ãstdin çµç±ã§ãããããã€ããã:
ssh user@gateway-host 'openclaw config patch --stdin --dry-run' < ./openclaw.patch.json5ssh user@gateway-host 'openclaw config patch --stdin' < ./openclaw.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 } }, }, }, },}1 ã€ã®ãªããžã§ã¯ããŸãã¯é
åãååž°çã«ãããããã®ã§ã¯ãªããæå®ããå€ãã®ãã®ã«ããå¿
èŠãããå Žå㯠--replace-path <path> ã䜿çšãã:
openclaw config patch --file ./discord.patch.json5 --replace-path 'channels.discord.guilds["123"].channels'--dry-run ã¯ãæžã蟌ãŸãã«ã¹ããŒããš SecretRef ã®è§£æ±ºå¯èœæ§ãã§ãã¯ãå®è¡ãããexec ããŒã¹ã® SecretRef 㯠dry-run äžã¯ããã©ã«ãã§ã¹ãããããããdry-run ã§ãããã€ããŒã³ãã³ããæå³çã«å®è¡ãããå Žå㯠--allow-exec ã远å ããã
Dry run
--dry-run 㯠openclaw.json ã«æžã蟌ãŸãã«å€æŽãæ€èšŒãããconfig setãconfig patchãconfig unset ã§äœ¿çšã§ããã
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ãã©ã€ã©ã³ã®åäœ
- ãã«ããŒã¢ãŒã: 倿Žããã ref/provider ã«å¯Ÿã㊠SecretRef ã®è§£æ±ºå¯èœæ§ãã§ãã¯ãå®è¡ããŸãã
- JSON ã¢ãŒã (
--strict-jsonã--jsonããŸãã¯ãããã¢ãŒã): ã¹ããŒãæ€èšŒã«å ã㊠SecretRef ã®è§£æ±ºå¯èœæ§ãã§ãã¯ãå®è¡ããŸãã - ããªã·ãŒæ€èšŒã¯å€æŽåŸã®å®å
šãª config ã«å¯ŸããŠå®è¡ãããããã芪ãªããžã§ã¯ãã®æžã蟌㿠(ããšãã°
hooksããªããžã§ã¯ããšããŠèšå®ããå Žå) ã§æªå¯Ÿå¿ãµãŒãã§ã¹ã®æ€èšŒãè¿åããããšã¯ã§ããŸããã - Exec SecretRef ãã§ãã¯ã¯ãã³ãã³ãã®å¯äœçšãé¿ããããããã©ã«ãã§ã¹ããããããŸãããªããã€ã³ããã«ã¯
--allow-execãæž¡ããŸã (ããã«ãã provider ã³ãã³ããå®è¡ãããå ŽåããããŸã)ã--allow-execã¯ãã©ã€ã©ã³å°çšã§ã--dry-runãªãã§ã¯ãšã©ãŒã«ãªããŸãã
--dry-run --json ã®ãã£ãŒã«ã
ok: ãã©ã€ã©ã³ãæåãããã©ããoperations: è©äŸ¡ãããä»£å ¥ã®æ°checks: ã¹ããŒã/解決å¯èœæ§ãã§ãã¯ãå®è¡ããããã©ããchecks.resolvabilityComplete: 解決å¯èœæ§ãã§ãã¯ãå®äºãŸã§å®è¡ããããã©ãã (exec ref ãã¹ããããããå Žå㯠false)refsChecked: ãã©ã€ã©ã³äžã«å®éã«è§£æ±ºããã ref ã®æ°skippedExecRefs:--allow-execãèšå®ãããŠããªãã£ãããã¹ãããããã exec ref ã®æ°errors:ok=falseã®å Žåã®ãæ§é åããã missing-pathãschemaããŸã㯠resolvability ã®å€±æ
JSON åºåã®åœ¢ç¶
{ ok: boolean, operations: number, configPath: string, inputModes: ["value" | "json" | "builder" | "unset", ...], checks: { schema: boolean, resolvability: boolean, resolvabilityComplete: boolean, }, refsChecked: number, skippedExecRefs: number, errors?: [ { kind: "missing-path" | "schema" | "resolvability", message: string, ref?: string, // resolvability ãšã©ãŒã®å Žåã«ååš }, ],}æåäŸ
{ "ok": true, "operations": 1, "configPath": "~/.openclaw/openclaw.json", "inputModes": ["builder"], "checks": { "schema": false, "resolvability": true, "resolvabilityComplete": true }, "refsChecked": 1, "skippedExecRefs": 0}倱æäŸ
{ "ok": false, "operations": 1, "configPath": "~/.openclaw/openclaw.json", "inputModes": ["builder"], "checks": { "schema": false, "resolvability": true, "resolvabilityComplete": true }, "refsChecked": 1, "skippedExecRefs": 0, "errors": [ { "kind": "resolvability", "message": "Error: Environment variable \"MISSING_TEST_SECRET\" is not set.", "ref": "env:default:MISSING_TEST_SECRET" } ]}ãã©ã€ã©ã³ã倱æããå Žå
config schema validation failed: 倿ŽåŸã® config 圢ç¶ãç¡å¹ã§ããpath/value ãŸã㯠provider/ref ãªããžã§ã¯ãã®åœ¢ç¶ãä¿®æ£ããŠãã ãããConfig policy validation failed: unsupported SecretRef usage: ãã®èªèšŒæ å ±ããã¬ãŒã³ããã¹ã/æååå ¥åã«æ»ããŠãã ãããSecretRef ã¯å¯Ÿå¿ãµãŒãã§ã¹ã®ã¿ã«ä¿æããŸããSecretRef assignment(s) could not be resolved: åç §ããã provider/ref ã¯çŸåšè§£æ±ºã§ããŸãã (env var ã®äžè¶³ãç¡å¹ãªãã¡ã€ã«ãã€ã³ã¿ãŒãexec provider ã®å€±æããŸã㯠provider/source ã®äžäžèŽ)ãDry run note: skipped <n> exec SecretRef resolvability check(s): exec ã®è§£æ±ºå¯èœæ§æ€èšŒãå¿ èŠãªå Žåã¯ã--allow-execãä»ããŠåå®è¡ããŠãã ããã- ãããã¢ãŒãã§ã¯ã倱æãããšã³ããªãä¿®æ£ããæžã蟌ãåã«
--dry-runãåå®è¡ããŠãã ããã
倿Žã®é©çš
config set / config patch / config unset ãæåãããã³ã«ãCLI 㯠Gateway ã®åèµ·åãå¿
èŠãã©ããã瀺ã 3 çš®é¡ã®ãã³ãã®ãããããåºåããŸãã
| ãã³ã | æå³ |
|---|---|
Restart the gateway to apply. |
倿Žããããã¹ã«ã¯å®å šãªåèµ·åãå¿ èŠã§ãã |
Change will apply without restarting the gateway. |
ããããªããŒããèªåçã«åæ ããŸãã |
No gateway restart needed. |
ã©ã³ã¿ã€ã ã«é¢é£ãã倿Žã¯ãããŸããã |
plugins.entries (ãŸãã¯ãã®ä»»æã®ãµããã¹) ãžã®æžã蟌ã¿ã¯åžžã«åèµ·åãå¿
èŠã§ããCLI ã¯ãã¹ãŠã® Plugin ã®ãªããŒãã¡ã¿ããŒã¿ãèªã¿èŸŒãŸããŠããããšã蚌æã§ããªãããã§ãã
æžã蟌ã¿ã®å®å šæ§
openclaw config set ãšãã®ä»ã® OpenClaw ææã® config ã©ã€ã¿ãŒã¯ããã£ã¹ã¯ã«ã³ãããããåã«å€æŽåŸã®å®å
šãª config ãæ€èšŒããŸããæ°ãããã€ããŒããã¹ããŒãæ€èšŒã«å€±æããå Žåãç Žå£çãªäžæžãã«èŠããå Žåãã¢ã¯ãã£ã㪠config ã¯ãã®ãŸãŸæ®ãããæåŠããããã€ããŒãã¯é£ã« openclaw.json.rejected.* ãšããŠä¿åãããŸãã
å°ããªç·šéã«ã¯ CLI æžã蟌ã¿ãæšå¥šããŸãã
openclaw config set gateway.reload.mode hybrid --dry-runopenclaw config set gateway.reload.mode hybridopenclaw config validateæžã蟌ã¿ãæåŠãããå Žåã¯ãä¿åããããã€ããŒãã確èªããå®å šãª config 圢ç¶ãä¿®æ£ããŠãã ããã
CONFIG="$(openclaw config file)"ls -lt "$CONFIG".rejected.* 2>/dev/null | headopenclaw config validateãšãã£ã¿ãŒã§ã®çŽæ¥æžã蟌ã¿ãåŒãç¶ãå¯èœã§ãããå®è¡äžã® Gateway ã¯æ€èšŒããããŸã§ããããä¿¡é ŒãããŠããªããã®ãšããŠæ±ããŸããç¡å¹ãªçŽæ¥ç·šéã¯èµ·åã«å€±æããããããããªããŒãã§ã¹ããããããŸããGateway 㯠openclaw.json ãæžãæããŸãããæ¥é èŸä»ã/äžæžãããã config ã修埩ããããæåŸã«æ£åžžã ã£ãã³ããŒã埩å
ããã«ã¯ãopenclaw doctor --fix ãå®è¡ããŠãã ãããGateway ã®ãã©ãã«ã·ã¥ãŒãã£ã³ã°ãåç
§ããŠãã ããã
ãã¡ã€ã«å
šäœã®ãªã«ããªãŒã¯ doctor 修埩å°çšã§ããPlugin ã¹ããŒã倿Žã minHostVersion ã®ããã¯ãmodelsãprovidersãauth profilesãchannelsãGateway å
¬éãtoolsãmemoryãbrowserãcron config ãªã©ã®ç¡é¢ä¿ãªãŠãŒã¶ãŒèšå®ãããŒã«ããã¯ããã®ã§ã¯ãªããæç¢ºãªãšã©ãŒãšããŠæ±ãããŸãã
修埩ã«ãŒã
openclaw config validate ãéã£ãåŸã¯ãlocal TUI ã䜿ã£ãŠãåãã¿ãŒããã«ããå倿Žãæ€èšŒããªãããåã蟌ã¿ãšãŒãžã§ã³ãã«ã¢ã¯ãã£ã㪠config ãš docs ã®æ¯èŒããããŸãã
openclaw chatTUI å
ã§ã¯ãå
é ã® ! ã«ãããªãã©ã«ãªããŒã«ã«ã·ã§ã«ã³ãã³ããå®è¡ãããŸã (ã»ãã·ã§ã³ããšã« 1 åã®ç¢ºèªããã³ããåŸ)ã
!openclaw config file!openclaw docs gateway auth token secretref!openclaw config validate!openclaw doctordocs ãšæ¯èŒ
ãšãŒãžã§ã³ãã«ãçŸåšã® config ãé¢é£ãã docs ããŒãžãšæ¯èŒããæå°ã®ä¿®æ£ãææ¡ããããäŸé ŒããŸãã
察象ãçµã£ãç·šéãé©çš
openclaw config set ãŸã㯠openclaw configure ã§å¯Ÿè±¡ãçµã£ãç·šéãé©çšããŸãã
åæ€èšŒ
å倿ŽåŸã« openclaw config validate ãåå®è¡ããŸãã
ã©ã³ã¿ã€ã åé¡ã«å¯Ÿãã doctor
æ€èšŒã«éã£ãŠãã©ã³ã¿ã€ã ããŸã æ£åžžã§ãªãå Žåã¯ãç§»è¡ãšä¿®åŸ©ã®æ¯æŽã®ããã« openclaw doctor ãŸã㯠openclaw doctor --fix ãå®è¡ããŸãã