Skip to main content

Configuration Keys

All keys supported in .cfv.toml. See the Configuration File guide for usage details.

Top-level keys​

KeyTypeDefaultEquivalent Flag
exclude-dirsarray of strings[]--exclude-dirs
exclude-file-typesarray of strings[]--exclude-file-types
ignore-filesarray of strings[]--ignore-file
file-typesarray of stringsall--file-types
depthinteger (≥ 0)unlimited--depth
reporterarray of strings["standard"]--reporter
groupbyarray of strings[]--groupby
quietbooleanfalse--quiet
require-schemabooleanfalse--require-schema
no-schemabooleanfalse--no-schema
schemastorebooleanfalse--schemastore
schemastore-pathstring—--schemastore-path
globbingbooleanfalse--globbing
gitignorebooleanfalse--gitignore

Table keys​

KeyTypeEquivalent Flag
schema-maptable (pattern = path)--schema-map
type-maptable (pattern = type)--type-map
validatorstable—

Validator options​

KeyTypeDefaultDescription
validators.csv.delimiterstring","Field delimiter. Use "\t" for tab.
validators.csv.commentstring—Lines starting with this character are skipped.
validators.csv.lazy-quotesbooleanfalseAllow bare quotes in unquoted fields.
validators.json.forbid-duplicate-keysbooleanfalseReport duplicate keys in objects as errors.
validators.ini.forbid-duplicate-keysbooleanfalseReport duplicate keys within the same section as errors.

YAML duplicate keys are always rejected by the parser regardless of configuration.

Format keys​

The [format] table controls formatting behavior for cfv format.

KeyTypeDefaultDescription
indentinteger2Spaces per indent level.
use-tabsbooleanfalseUse tabs instead of spaces for indentation.
sort-keysbooleanfalseSort mapping keys alphabetically.
trailing-newlinebooleantrueEnsure file ends with a newline.
line-endingstring"lf"Line ending style: "lf" or "crlf".
quote-stylestring"double"Quote style: "preserve", "double", or "single" (YAML only).
trailing-commasstring"all"Trailing commas on expanded collections: "all", "none", or "preserve" (match the file; JSONC only).
indent-sequencesbooleantrueIndent YAML sequences used as mapping values by one additional level. Set to false for compact sequence indentation.

Per-format overrides​

Use [format.<type>] tables to override settings for a specific format. The same keys as [format] are supported.

[format]
indent = 2
sort-keys = false

[format.yaml]
indent = 2
quote-style = "double"
indent-sequences = false

[format.json]
indent = 4

[format.toml]
sort-keys = true

Supported format types: yaml, json, jsonc, toml, hcl, xml, ini, properties, env.

Resolution order​

Settings resolve with this priority (highest wins):

  1. CLI flags (--indent, --sort-keys)
  2. Per-format config ([format.yaml])
  3. Global format config ([format])
  4. Built-in defaults