yamlfmt

Format and validate YAML files with customizable rules

brewmacoslinux
Try with needOr install directly
Source

About

Extensible command-line tool to format YAML files

Commands

yamlfmt

Examples

format a YAML file and save changes$ yamlfmt -in file.yaml
check if YAML files are properly formatted$ yamlfmt *.yaml
format YAML with custom configuration file$ yamlfmt -conf .yamlfmt.yaml file.yaml
format multiple YAML files in a directory$ yamlfmt -in -recursive ./config/
print formatted YAML to stdout without modifying file$ yamlfmt file.yaml