macOS
brew install yamlfmtlocal Homebrew formula metadata
brew
Extensible command-line tool to format YAML files. Version 0.21.0 via Homebrew; verified from local package data.
install
brew install yamlfmtlocal Homebrew formula metadata
sudo apk add yamlfmtAlpine Linux edge package indexes · yamlfmt · source: dl-cdn.alpinelinux.org
nix profile install nixpkgs#yamlfmtnixpkgs package indexes · pkgs/by-name/ya/yamlfmt/package.nix · source: api.github.com
sudo pacman -S yamlfmtArch Linux sync databases · yamlfmt · source: geo.mirror.pkgbuild.com
scoop install main/yamlfmtScoop official bucket manifest trees · bucket/yamlfmt.json · source: api.github.com
overview
Extensible command-line tool to format YAML files
history
Google yamlfmt is a Go command-line formatter and library for YAML files. Its goals are explicit: be easy to distribute as a single binary, be extensible with custom formatters, and be usable as a library foundation for teams that need a customized YAML formatter.
The repository was created on 2022-08-10. The README describes the project as an extensible formatter rather than only a fixed style tool: users can run the `yamlfmt` command, install it as a pre-commit hook, use a container image, or build on the library APIs.
The project grew around formatter backends and configuration. The default `basic` formatter serializes YAML through a fork of gopkg.in/yaml.v3, while the `kyaml` formatter targets Kubernetes YAML style. The docs also record caveats around YAML directives, anchors, aliases, line breaks, and line-length behavior, showing the practical complexity behind YAML formatting.
yamlfmt has a broad package-manager footprint in the supplied data, including Homebrew, Nix, apk, pacman, and Scoop. Its README also presents Go installation, release binaries, pre-commit integration, and a container image, which fits modern developer-tool adoption through local hooks and CI checks.
The repository lives under the Google organization but the README states that it is not officially supported by Google and is maintained primarily by an individual maintainer in spare time. That makes it an interesting case where a high-visibility org namespace helped adoption of a still-community-paced developer tool.
Basic usage is `yamlfmt x.yaml y.yaml ...` or `yamlfmt .`, where directories are searched recursively for `.yaml` and `.yml` files. The `-dstar` mode enables doublestar glob matching, and `-lint` supports CI workflows that check formatting without rewriting files.
Configuration is discovered from a `-conf` flag, the working directory, ancestor directories, or a system config directory. Supported config filenames include `.yamlfmt`, `yamlfmt.yml`, `yamlfmt.yaml`, `.yamlfmt.yaml`, and `.yamlfmt.yml`.
yamlfmt is package-nerd significant because it packages the messy YAML-formatting problem as a distributable Go binary with docs for hooks, containers, global config, and release artifact verification.
It also represents the split in YAML tooling between generic style normalization and domain-specific formats such as Kubernetes KYAML, a distinction that matters to maintainers choosing formatter defaults for large repositories.
security posture
narrow executable package without higher-risk signals.
green risk · low confidence · appliance
Before unattended agent use, check whether the tool reads plaintext credentials, writes remote state, publishes artifacts, or shells out to plugins.
local files
These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.
Config paths the tool may read or write during local use.
.yamlfmtyamlfmt.ymlyamlfmt.yaml.yamlfmt.yaml.yamlfmt.yml$XDG_CONFIG_HOME/yamlfmt/.yamlfmt~/.config/yamlfmt/.yamlfmt%LOCALAPPDATA%\yamlfmt\.yamlfmtexecutables
| Command | Kind | Exposure | Note |
|---|---|---|---|
yamlfmt | cli | global executable |
freshness
These signals separate page generation age, package-manager activity, and upstream release comparison. Version lag is warned only when an evidence URL and comparable versions are present.
https://github.com/google/yamlfmt
install metadata
| Package key | brew:yamlfmt |
|---|---|
| Version | 0.21.0 |
| Package manager | Homebrew |
| Package manager page | https://formulae.brew.sh/formula/yamlfmt |
| Homepage | https://github.com/google/yamlfmt |
| Repository | https://github.com/google/yamlfmt |
| Upstream docs | https://github.com/google/yamlfmt#readme |
| License | Apache-2.0 |
| Source archive | https://github.com/google/yamlfmt/archive/refs/tags/v0.21.0.tar.gz |
| Build dependencies | go |
| Bottle | available (on arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux) |
| Homebrew post-install | not defined |
| Service | none declared |
registry facts
| Source Database | Homebrew formula API |
|---|---|
| Tap | homebrew/core |
| Full Name | yamlfmt |
| Version Scheme | 0 |
| Revision | 0 |
| Head Version | HEAD |
| Bottle Stable Root URL | https://ghcr.io/v2/homebrew/core |
| Deprecated | no |
| Disabled | no |
| Keg Only | no |
| URL Keys |
|
source database matches
Matches are pulled from external package-manager indexes and kept separate from local Automic Vault package links.
yamlfmt
nix profile install nixpkgs#yamlfmtyamlfmt 0.21.0-r5
An extensible command line tool or library to format yaml files
https://github.com/google/yamlfmt
sudo apk add yamlfmtyamlfmt-doc 0.21.0-r5
An extensible command line tool or library to format yaml files (documentation)
https://github.com/google/yamlfmt
sudo apk add yamlfmt-docyamlfmt 0.21.0-1
An extensible command line tool or library to format yaml files.
https://github.com/google/yamlfmt
sudo pacman -S yamlfmtmain/yamlfmt
scoop install main/yamlfmtsource trail
This page is generated by av-web from the private package SQLite artifact built by scripts/generate-pkg-sqlite.py.
View the package source record on GitHub.