vigocli config validate
Check .vgo files for YAML correctness, structural validity, and idempotency.
Usage
vigocli config validate <file.vgo> [file2.vgo ...] [flags]
Checks Performed
- YAML syntax -- valid YAML, proper indentation, no tabs
- Structure -- required fields present (
name, resources withname+type) - Idempotency --
execresources must haveonlyiforunlessguard - Cross-references --
depends_on,notify,subscribes,beforemust reference existing resource names - Known types -- unknown resource types blocked unless
skip_validation: trueis set - Redundant triggers -- both
notifyandsubscribeson the same pair is an error
For envoy files (those with a top-level envoys: key), validates that each entry has a match field.
Accepts .vgo, .yaml, and .yml file extensions.
Examples
Validate a single configcrate
vigocli config validate stacks/configcrates/nginx.vgo
stacks/configcrates/nginx.vgo: OK
Validate multiple files
vigocli config validate stacks/configcrates/*.vgo
stacks/configcrates/nginx.vgo: OK
stacks/configcrates/postgres.vgo: OK
stacks/configcrates/app.vgo: [error] app: resource "deploy" (exec) missing idempotency guard (add onlyif or unless)
Exit codes
0-- all checks pass1-- validation errors found
Relationship to Config Publish
vigocli config validate checks individual files in isolation. vigocli config publish runs a more comprehensive pipeline that includes the configcrate linter (YAML repair, normalization, auto-commenting with #~ prefixes) plus full cross-tree validation. Use validate for quick spot-checks; use config publish --dry-run for the full validation pipeline.
Related
- config edit -- edit .vgo files with validation on save
- envoys preview -- preview planned changes
- doctor -- server health checks including config validation
- config publish -- full validation + linting pipeline