previewctl validate
Usage
previewctl validateDescription
Validates the .previewctl/preview.yml configuration file in the current directory.
Checks for:
- Valid YAML syntax
- Required fields (
version,services) - Valid build types (
dockerfile,nixpacks,railpack) - Valid
depends_onreferences (no missing services) - No circular dependencies in the service graph
- Valid environment variable template syntax
Examples
cd my-projectpreviewctl validateOn success:
preview config is validOn failure:
Error: service "api" depends on "db" which is not definedWhen to use
- Before running
previewctl upto catch config errors early - In CI pipelines to validate config changes in pull requests
- After editing
preview.ymlto verify syntax