yaml-sort
A go cli that recursively sorts YAML documents: mapping keys are ordered
alphabetically (by (key, value)) and sequence elements are ordered by their
YAML representation.
Install
Download the binary from releases or:
go install codeberg.org/madp/yaml-sort@latest
Usage
Read from stdin, write to stdout:
yaml-sort < input.yaml > output.yaml