What problem does it solve?
Prevents OpenClaw gateway crashes caused by AI or humans editing openclaw.json without validation by enforcing backups, schema checks, and semantic guards before config changes reach the gateway.
Core Features & Use Cases
- Auto-backup and rollback: Captures timestamped copies before edits and restores them automatically if the gateway health check fails after apply --restart flows.
- Deep validation: Runs JSON syntax, schema-required fields (commands.native*), semantic checks (model names, browser profile color, placeholders), critical field diff warnings, and hooks into git commits for staged config files.
- Safe patch workflows: Provides scripts for apply, rollback, diff, and safe-config-patch that merge patches, validate merged results, signal the gateway to reload, and warn about critical field removals.
Quick Start
Ask the guard to run scripts/config-guard.sh check on your openclaw.json before committing any edits to keep the gateway safe.