config-file-validator is a free, open source frameworks & platforms project written in Go and released under Apache-2.0. It has 515 GitHub stars, 117 forks and 12 open issues, and was last pushed 5 hours ago. On this registry it ranks #100 of 103 tracked projects in Frameworks & Platforms, with 5 head-to-head comparisons available.

What is config-file-validator?

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

Code Coverage OpenSSF Scorecard OpenSSF Best Practices Apache 2 License Awesome Go Go Reference Pipeline Status

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

Format Extensions Syntax Format Schema
JSON .json ✅ ✅ ✅
JSONC .jsonc ✅ ✅ ✅
YAML .yaml, .yml ✅ ✅ ✅
TOML .toml ✅ ✅ ✅
XML .xml ✅ ✅ ✅
TOON .toon ✅ — ✅
SARIF .sarif ✅ — ✅
HCL .hcl, .tf, .tfvars ✅ ✅ —
INI .ini ✅ ✅ —
Properties .properties ✅ ✅ —
ENV .env ✅ ✅ —
HOCON .hocon ✅ — —
CSV .csv ✅ — —
EDITORCONFIG .editorconfig ✅ — —
Justfile .just ✅ — —
KDL .kdl ✅ — —
CUE .cue ✅ — —
Apple PList XML .plist ✅ — —

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

Config File Validator contributors

License

Apache 2.0

Frequently asked questions

Is config-file-validator free to use?

config-file-validator is open source under the Apache-2.0 licence. There is no licence fee and no seat count — you can self-host it or, where the project offers one, pay a vendor for a managed version instead.

What does config-file-validator do?

Cross-platform config file CLI toolchain. Validates syntax, schema compliance, and formatting across 18 different configuration file types. Written in Go.

What is config-file-validator written in?

config-file-validator is primarily written in Go. Its source is publicly available at https://github.com/Boeing/config-file-validator, and it has 515 GitHub stars.