Alternatives to yamlfmt
Format YAML files consistently from the command line. The listings below can replace it for an important use case. Each note says what changes if you switch.
The original
yamlfmt
Format YAML files consistently from the command line.
Replacements
Listings that take over the same core job as yamlfmt.
Prettier
An opinionated code formatter for JavaScript, TypeScript, CSS, HTML, Markdown and other languages.
Prettier is an opinionated MIT-licensed formatter covering many languages beyond YAML, including JavaScript, CSS and Markdown, with few configuration options and wide editor integration.
Similar software
Related functionality, not a direct replacement.
YAMLlint
An online YAML validator that checks pasted YAML and returns a clean UTF-8 version.
pre-commit
A command-line framework for managing and running multi-language Git pre-commit hooks across projects.
prek
Run code checks using existing pre-commit hooks and configurations.
shfmt
Apply consistent formatting to shell scripts.
Hadolint
Dockerfile linter that also checks the shell commands inside it.
Conftest
Writes tests against configuration files using Open Policy Agent rules.