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
MongoDB Atlas runs apps anywhere Icon
MongoDB Atlas runs apps anywhere

Deploy in 115+ regions with the modern database for every enterprise.

MongoDB Atlas gives you the freedom to build and run modern applications anywhere—across AWS, Azure, and Google Cloud. With global availability in over 115 regions, Atlas lets you deploy close to your users, meet compliance needs, and scale with confidence across any geography.
Start Free
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