yamlfix is an opinionated YAML formatter that automatically applies consistent styling while preserving comments.
It can process individual files or entire directory trees from the command line and is also available as a Python library.
The formatter corrects indentation, normalizes truthy values, removes unnecessary quotes, adjusts comments and splits long lines. Its behaviour can be customized through pyproject.toml, dedicated TOML configuration files or environment variables.
This is free and open source software.
Key Features
- Formats YAML files while retaining their comments.
- Processes individual files or directories recursively.
- Corrects indentation and normalizes truthy values.
- Removes unnecessary quotation marks from scalar values.
- Supports configurable flow-style and block-style sequences.
- Respects Jinja2 syntax embedded within YAML files.
- Offers command-line and Python library interfaces.
- Reads settings from pyproject.toml, TOML files and environment variables.
- Supports configurable line lengths, whitespace and comment formatting.
- Ensures files contain a single trailing newline.
Website: github.com/lyz-code/yamlfix
Support:
Developer: Lyz
License: GNU General Public License v3.0
yamlfix is written in Python. Learn Python with our recommended free books and free tutorials.
Related Software
| YAML Code Formatters | |
|---|---|
| libfyaml | Fully-featured YAML 1.2 and JSON parser/writer |
| yam | Little formatter for YAML |
| pretty-yaml | Human-readable YAML-serialized data |
Read our verdict in the software roundup.
Explore our comprehensive directory of recommended free and open source software. Our carefully curated collection spans every major software category.This directory is part of our ongoing series of informative articles for Linux enthusiasts. It features hundreds of detailed reviews, along with open source alternatives to proprietary solutions from major corporations such as Google, Microsoft, Apple, Adobe, IBM, Cisco, Oracle, and Autodesk. You’ll also find interesting projects to try, hardware coverage, free programming books and tutorials, and much more. Discovered a useful open source Linux program that we haven’t covered yet? Let us know by completing this form. |

