OpenClaw JSON Schema brings a live JSON Schema for openclaw.json into VS Code: completion, hover docs, Problems-panel validation, and extra real-time checks while you edit.
Features
- Dynamic schema — Runs
openclaw config schemaand wires the result into VS Code’s JSON language service. - IntelliSense — Key names, enums, and structure hints from your installed OpenClaw version.
- Problems integration — Invalid keys and types surface in the Problems view.
- AJV diagnostics — Additional validation as you type (e.g. invalid enum values) with configurable debounce.
- Commands — Refresh schema on demand and inspect last refresh / error status.
How it works
- On activation, the extension runs
openclaw config schema. - The emitted JSON Schema is stored under the extension’s global storage path.
json.schemasis updated so matching files (by defaultopenclaw.json) use that schema.- VS Code’s built-in JSON support handles completion, hovers, and schema-based errors.
- The extension layers AJV validation for faster, finer-grained feedback while editing.
Requirements
- The OpenClaw CLI installed and available as
openclawon yourPATH(or set a custom executable path in settings). openclaw config schemamust print valid JSON Schema to stdout.
Usage
After installation, the schema is refreshed automatically on startup (unless disabled). You can also:
| Command | Action |
|---|---|
| OpenClaw JSON Schema: Refresh Schema | Re-fetch schema from the CLI and re-apply mappings. |
| OpenClaw JSON Schema: Show Status | Show last successful refresh time, last error (if any), and file patterns. |
Edit any openclaw.json that matches your file match globs to get completion and diagnostics.
Extension settings
| Setting | Description |
|---|---|
openclawJsonSchema.openclawPath |
Executable used for openclaw (default: openclaw). |
openclawJsonSchema.autoRefreshOnStartup |
Refresh schema when VS Code starts (default: true). |
openclawJsonSchema.fileMatch |
Glob patterns for files that use the schema (default: openclaw.json, **/openclaw.json). |
openclawJsonSchema.diagnosticsDebounceMs |
Delay before re-running AJV validation in ms (default: 80; use 0 for immediate updates). |
Troubleshooting
- CLI errors — If the command fails, you’ll see an error and can open the OpenClaw JSON Schema output channel for details.
- Schema changed after upgrading OpenClaw — Run Refresh Schema once so completion and validation match the new CLI output.
Links
License
MIT — see LICENSE.