cfv is a cross-platform command-line toolchain, written in Go, that validates syntax, schema compliance, and formatting across 18 configuration file types for developers and DevOps engineers.
What it is
Config File Validator, invoked as cfv, is a single static binary with no runtime dependencies that inspects configuration files throughout a repository, reports problems, and repairs what it can. It lives in the Go ecosystem and the developer-tooling/DevOps space, and it can be consumed either as a command-line program or as a Go library. Rather than replacing one parser, it acts as one entry point for many formats at once, covering JSON, JSONC, YAML, TOML, XML, TOON, SARIF, HCL, INI, Properties, ENV, HOCON, CSV, EDITORCONFIG, Justfile, KDL, CUE, and Apple PList XML.
The concrete problem it addresses is that configuration errors are spread across many formats and usually only surface when something deploys. A single cfv check . pass catches syntax errors, schema violations, and formatting problems across the whole tree, and the tool exits with code 1 if any file fails, so the same invocation works locally and in a pipeline. It also replaces ad-hoc per-format scripts: formatting reads your existing .prettierrc, taplo.toml, .yamlfmt, and .editorconfig files rather than imposing its own conventions, and schema validation uses JSON Schema, XSD, and automatic SchemaStore lookup.
Key capabilities
- Runs
cfv check . to validate syntax, enforce schemas, and check formatting across a directory tree, exiting with code 1 on any failure.
- Applies fixes with
cfv check --fix . for formatting, trailing commas, and type coercion, and previews changes as a diff with cfv format --diff ..
- Validates schemas via JSON Schema, XSD, and automatic SchemaStore lookup, selectable with flags such as
--schemastore.
- Emits machine-readable reports through the
standard, json, junit, sarif, and github reporters, for example cfv check --reporter=junit:results.xml.
- The
github reporter emits workflow commands so errors appear as inline pull-request annotations.
- Honours existing formatting configuration in
.prettierrc, taplo.toml, .yamlfmt, and .editorconfig rather than overriding it.
- Is available both as a CLI and as a Go library for programmatic integration.
Who uses it and how
- Teams wiring validation into CI, using
cfv check --reporter=junit:results.xml --schemastore . to produce results a pipeline can parse.
- Projects that want failures surfaced directly on pull requests, via the
github reporter's inline annotations.
- Contributors who want checks before code reaches review, through the published pre-commit hook integration.
- Workflows built around the GitHub Action at
Boeing/validate-configs-action for repository-level config checking.
- Go applications embedding validation logic through the documented Go library integration.
Getting started
Install with brew install config-file-validator or go install github.com/Boeing/config-file-validator/v3/cmd/cfv@latest; Winget (winget install Boeing.config-file-validator), Scoop (scoop install config-file-validator), MacPorts (sudo port install config-file-validator), and prebuilt binaries from GitHub Releases are also published.
How it compares
The project stands alone in this registry: the facts name no comparable tool among similar config-validation utilities, so there is no direct in-registry contrast to draw. Its own positioning is as a single binary covering many formats at once rather than a per-format toolchain.
When to use it — and when not
Choose it when you need one command covering many configuration formats with schema and formatting checks in the same pass, and when a self-contained binary with no runtime dependencies matters to your environment. It is not for files needing structural validation outside the listed formats — schema support is absent for HCL, INI, Properties, ENV, HOCON, CSV, EDITORCONFIG, Justfile, KDL, CUE, and Apple PList XML, and formatting support is narrower still. Twelve open issues and a recent last push suggest active but not bug-free development, and anyone depending on it should confirm the Apache-2.0 licence terms suit their use.
project readme (upstream, from github) — read inline
Config File Validator
cfv is a toolchain for configuration files. It catches syntax errors, schema violations, and formatting problems across your repo and fixes what it can. Single static binary. No runtime dependencies.
Documentation
Read the docs →
Install
brew install config-file-validator
go install github.com/Boeing/config-file-validator/v3/cmd/cfv@latest
Winget, Scoop, MacPorts, binary downloads
- Winget:
winget install Boeing.config-file-validator
- Scoop:
scoop install config-file-validator
- MacPorts:
sudo port install config-file-validator
- Binaries: GitHub Releases
Usage
Validate syntax, enforce schemas, and check formatting:
cfv check .
Fix formatting, trailing commas, and type coercion:
cfv check --fix .
Preview formatting changes as a diff:
cfv format --diff .
Exits with code 1 if any file fails.
Supported Formats
Schema validation uses JSON Schema, XSD, and automatic SchemaStore lookup. Formatting reads your existing .prettierrc, taplo.toml, .yamlfmt, and .editorconfig files. See Formatting and Schema Validation.
CI
cfv check --reporter=junit:results.xml --schemastore .
Reporters: standard, json, junit, sarif, github. The github reporter emits workflow commands so errors appear as inline PR annotations.
A GitHub Action and pre-commit hook are also available.
Contributors
License
Apache 2.0