yq
uses jq like syntax but works with yaml files as well as json. It doesn't yet support everything jq
does - but it does support the most common operations and functions, and more is being added continuously.eval-all/ea
is still required to tell yq
to run the expression again all the document at once.yq
attempts to preserve comment positions and whitespace as much as possible, but it does not handle all scenarios (see https://github.com/go-yaml/yaml/tree/v3 for details)