@ltotal/openclaw-config-guard
v1.0.2
Published
A publishable CLI that modularizes OpenClaw config files and keeps them hot-reload friendly.
Maintainers
Readme
openclaw-config-guard
@ltotal/openclaw-config-guard is a publishable npm CLI that watches an OpenClaw config directory, splits large openclaw.json sections into conf.d/*.json, and touches the root config when sub-config files change so OpenClaw can hot-reload consistently.
The CLI provides:
start,stop,restart,status, andlogscommands for managing the background guardwatchfor foreground debuggingconfigfor an interactive settings wizard covering:TARGET_DIRMAX_BACKUPSSTABILITY_WAITUSE_POLLINGPOLL_INTERVALSUB_EXTKEYS_TO_EXTRACT
Install
npm install -g @ltotal/openclaw-config-guardNode.js 20.19.0 or newer is required.
Or run it without a global install:
npx @ltotal/openclaw-config-guard helpCommands
openclaw-config-guard config
openclaw-config-guard start
openclaw-config-guard status
openclaw-config-guard logs
openclaw-config-guard restart
openclaw-config-guard stopFor local debugging, you can also run the watcher in the foreground:
openclaw-config-guard watchConfig Wizard
The wizard stores settings in:
~/.openclaw-config-guard/config.jsonDefault values:
{
"targetDir": "~/.openclaw",
"maxBackups": 6,
"stabilityWait": 5000,
"usePolling": false,
"pollInterval": 500,
"subExt": ".json",
"keysToExtract": [
"agents",
"gateway",
"hooks",
"models",
"skills",
"channels",
"plugins",
"bindings"
]
}Runtime Files
The CLI keeps its own runtime files under:
~/.openclaw-config-guard/config.json: saved wizard settingsstate.json: active background process metadataguard.log: watcher logsguard.log.1toguard.log.3: rotated log files when the active log exceeds 1 MiB
Publishing checklist
- Confirm the GitHub URLs in
package.jsonmatch the real repository. - Run
npm run release:check. - Publish with
npm run publish:npm -- --access public.
Development
npm install
npm test
npm run release:check
node ./bin/openclaw-config-guard.js help