dorian-sort-yaml Sorts keys of hashes of YAML files e.g. sort-yaml config/locales/* Install gem install dorian-sort-yaml Or as part of my other gems: gem install dorian Usage git ls-files | grep "\.yml\$" | xargs sort-yaml