yamlfmt is an extensible formatter that makes YAML files consistent and easy to read across large repositories. 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.

Features

  • Opinionated yet configurable formatting of YAML files
  • Safe handling of comments, anchors, aliases, and block scalars
  • Multi-document stream support for real-world manifests
  • Single static binary and library API for flexible integration
  • Repo-scoped config to enforce consistent house style
  • CI-friendly exit codes for check and fix workflows

Project Samples

Project Activity

See All Activity >

License

Apache License V2.0

Follow yamlfmt

yamlfmt Web Site

Other Useful Business Software
Agentic AI SRE built for Engineering and DevOps teams. Icon
Agentic AI SRE built for Engineering and DevOps teams.

No More Time Lost to Troubleshooting

NeuBird AI's agentic AI SRE delivers autonomous incident resolution, helping team cut MTTR up to 90% and reclaim engineering hours lost to troubleshooting.
Learn More
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of yamlfmt!

Additional Project Details

Operating Systems

Linux, Mac, Windows

Programming Language

Go

Related Categories

Go Command Line Tools

Registered

2025-10-10