yamlfix
A simple opionated yaml formatter that keeps your comments!
Decision gist · record as of 2026-08-14
Yes, if you need YAML formatting with comment preservation and accept GPLv3 licensing. The low install friction, stable maturity, and high download volume indicate a reliable tool. The aging maintenance is not a blocker for a stable formatter, but verify that the opinionated style matches your team's needs before adopting it widely.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.9.1 or later.
- Low install friction with four straightforward runtime dependencies.
- Maintenance status is aging—last release was 239 days ago—but the repository remains active and not archived, suggesting the project is stable rather than abandoned.
License · maintenance · safety
GPL-3.0-only (copyleft) — GPLv3 is a copyleft license; any derivative work or modification must also be licensed under GPLv3. If you are building proprietary software or have license compatibility constraints, this may restrict your use.
last release 2025-12-18 (239 days) · last repo commit 2025-12-18 · 262 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 1,129,395 downloads/mo, #4,320 on PyPI
Alternatives
Verify before relying
pip install yamlfix
import yamlfix
formatted = yamlfix.fix_yaml(yaml_content)- Whether yamlfix can be used as a library API (the snippet assumes it, but the fact sheet emphasizes command-line usage).
- What specific formatting rules the 'opinionated' style enforces and whether they are configurable.
What it is and what it does
yamlfix is a YAML formatter designed to reformat YAML files consistently while keeping your comments intact—a feature many formatters lose. It runs as a command-line tool and depends on click for CLI handling, ruyaml for YAML parsing, maison for configuration, and pydantic for validation. The package targets developers working with YAML configuration files who want automated formatting without losing inline documentation.
The project is in production/stable status and supports Python 3.9, 3.10, and 3.11. With over 1 million monthly downloads, it ranks in the top 5000 PyPI packages. The aging maintenance status reflects a 239-day gap since the last release, but the repository remains active and unarchived, indicating the tool is mature and not under active development rather than abandoned.
Use it for
- Automatically format YAML configuration files in CI/CD pipelines while preserving inline comments.
- Enforce consistent YAML style across a team's infrastructure-as-code or Kubernetes manifests.
- Pre-commit hook to standardize YAML formatting before committing configuration files.
- Batch reformat existing YAML files to a consistent style without losing documentation.
- Integrate into linting workflows alongside other code quality tools for configuration files.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need YAML formatting with comment preservation and accept GPLv3 licensing.
The low install friction, stable maturity, and high download volume indicate a reliable tool. The aging maintenance is not a blocker for a stable formatter, but verify that the opinionated style matches your team's needs before adopting it widely.
Install
yamlfix on PyPI
Before you install
Low install friction with four straightforward runtime dependencies. Maintenance status is aging—last release was 239 days ago—but the repository remains active and not archived, suggesting the project is stable rather than abandoned.
Requires Python 3.9.1 or later.
License in practice
GPLv3 is a copyleft license; any derivative work or modification must also be licensed under GPLv3. If you are building proprietary software or have license compatibility constraints, this may restrict your use.
Quickstart
pip install yamlfix
import yamlfix
formatted = yamlfix.fix_yaml(yaml_content)
Verify before relying
- Whether yamlfix can be used as a library API (the snippet assumes it, but the fact sheet emphasizes command-line usage).
- What specific formatting rules the 'opinionated' style enforces and whether they are configurable.
Package facts
| License | GPL-3.0-only copyleft |
| Python support | Supports the current Python release >=3.9.1 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 4 packagesclickruyamlmaisonpydantic |
| Maintenance | Aging 239 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 1,129,395 / month, #4,320 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: GNU General Public License v3 (GPLv3)Natural Language :: EnglishOperating System :: POSIXOperating System :: UnixProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.9Topic :: Utilities |
Evidence: yamlfix-1.19.1-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “yaml formatter”
- yamlfixyamlfix is a command-line YAML formatter that reformats YAML files…
- mdformat-front-mattersA plugin for mdformat that normalizes YAML, TOML, and JSON front…
- pyamlProduces human-readable, diff-friendly YAML output from Python data…
Give your agent the search over MCP, or paste the wish link into any chat.
More Utilities packages
Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.
Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.
Detects and normalizes text encoding from unknown or ambiguous sources, supporting all IANA character sets that Python's core library provides codecs for, with the ability to register custom codecs.
Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.
Pluggy provides a plugin system that lets you define hook specifications and register implementations to be called in sequence, enabling extensible Python applications without tight coupling.
Install it if you're building an extensible application or framework.
Pygments is a syntax highlighter that colorizes source code and text in over 500 languages and formats, outputting to HTML, LaTeX, RTF, SVG, images, or ANSI terminal sequences.
Install it if you need to display or transform source code.
Six provides utility functions to write Python code that runs on both Python 2.7 and Python 3.3+, smoothing over language differences between the two versions.
See also config-formatter · beautysh · yapf · tox-toml-fmt · sphinxcontrib-autoyaml · ruyaml · pyaml · yamllint · saneyaml · tomlkit