yamlfmt
An extensible command line tool or library to format yaml files
...It focuses on practical concerns unique to YAML—multi-document streams, anchors and aliases, comments, and block scalars—so a reformat doesn’t destroy semantics or helpful annotations. The tool ships as a single, distributable binary and can also be used as a library, making it simple to drop into CI and editor workflows. Configuration is file-based, allowing teams to pin indentation, line wrapping, and other house-style choices repo-wide. By normalizing structure while preserving meaning, it reduces diff noise and merge friction in configs, Kubernetes manifests, and automation playbooks. The project is intentionally extensible, so organizations can add custom formatters or rules without forking.