# google/yamlfmt

An extensible command line tool or library to format yaml files.

Repository: https://github.com/google/yamlfmt
Canonical: https://ross.abutalabs.com/products/yamlfmt
Language: Go
License: Apache-2.0
License Family: permissive
Last push: 2026-07-30T15:34:22+00:00

## Health v2 (maintenance only)
Score: 85/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 95, release rhythm 64, longevity 100
- inputs: {"age_days": 1484, "days_push": 34, "days_rel": 240, "gap_med": 27.5, "n_releases_24m": 11}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1815, forks 75 (observed 2026-08-28T04:05:39.797464+00:00)

## What it is
yamlfmt is an extensible command line tool and Go library for formatting YAML files, distributed as a single self-sufficient binary. It supports configurable formatters, glob-based path matching, lint mode, pre-commit hooks, and CI/CD usage via a Docker image.

## Use cases
- format yaml files in a repo
- enforce consistent yaml style in ci
- add a yaml formatter pre-commit hook
- lint yaml files in gitlab ci
- build a custom yaml formatting tool as a go library

## When to choose
- you need a fast, dependency-free single-binary yaml formatter
- you want yaml style enforcement in pre-commit or CI pipelines
- you want to embed yaml formatting into a Go program

## When to avoid
- you need formatting for formats other than yaml
- you require officially supported Google-backed tooling with guaranteed maintenance

## Facets
- artifact type: cli-tool
- maturity: active
- function: formatter, cli, yaml
- domain: developer-tools, files
- platform: cli, cross-platform, go
- tags: yaml-formatter, pre-commit-hook, code-style, linting, single-binary, command-line, docker

## Member repositories
- google/yamlfmt (main) score 85

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:39.797464+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T03:20:38.875158+00:00, confidence not recorded.
  - readme: https://github.com/google/yamlfmt (fetched 2026-08-28T04:05:39.797464+00:00, sha f59998b95096)
- Data as of 2026-08-30T08:39:29.467469+00:00.
