yamlfix
« Back to VersTracker
Description:
Simple and configurable YAML formatter that keeps comments
Type: Formula  |  Latest Version: 1.19.1@0  |  Tracked Since: Dec 18, 2025
Links: Homepage  |  formulae.brew.sh
Category: Developer tools
Tags: yaml formatter linting devops configuration
Install: brew install yamlfix
About:
yamlfix is a command-line utility designed to automatically format YAML files while intelligently preserving comments, which are often stripped out by other formatters. It enforces consistent styling and valid syntax, making YAML files more readable and maintainable. This tool is particularly valuable for configuration management in DevOps workflows where documentation within config files is critical.
Key Features:
  • Preserves comments and formatting structure
  • Configurable style rules via pyproject.toml or .yamlfix
  • Handles multi-document YAML files
  • Sorts keys alphabetically (optional)
Use Cases:
  • Standardizing formatting across team configuration files
  • Preparing YAML files for version control (Git) to reduce diffs
  • Automating linting and formatting in CI/CD pipelines
Alternatives:
  • Prettier – Prettier is a generic code formatter that supports YAML but is heavier and less configurable for specific YAML edge cases.
  • yamllint – yamllint focuses on linting (finding errors) rather than fixing formatting, though it can be paired with yamlfix.
Version History
Detected Version Rev Change Commit
Dec 20, 2025 7:28pm 1.19.1 0 VERSION_BUMP 94c5e0fa
Dec 18, 2025 11:24am 1.19.0 0 VERSION_BUMP 7c167276
Oct 25, 2025 9:37am 0 VERSION_BUMP 7eff2b07
Oct 25, 2025 12:57am 0 VERSION_BUMP 34cae765
Oct 11, 2025 4:24pm 0 VERSION_BUMP a7a72eea
Oct 11, 2025 8:02am 0 VERSION_BUMP 20183d71