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

You Might Also Like
Gen AI apps are built with MongoDB Atlas Icon
Gen AI apps are built with MongoDB Atlas

The database for AI-powered applications.

MongoDB Atlas is the developer-friendly database used to build, scale, and run gen AI and LLM-powered apps—without needing a separate vector database. Atlas offers built-in vector search, global availability across 115+ regions, and flexible document modeling. Start building AI apps faster, all in one place.
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