# input.yml foo: bar baz: fuzz $ yq 'if .foo eq bar then .baz' < input.yml fuzz $ yq 'if .foo eq bar then .' < input.yml foo: bar baz: fuzz $ yq .baz < input.yml fuzz
This command is meant to make it easy to manipulate and filter YAML streams using a simple filter language.
It takes its inspiration from jq. I feel YAML is a better language for working with documents on the command line. When possible, I will adhere to jq's filter language for interoperability.
Right now I only implement the filters I need, but there's lots of stuff that jq can do that I will want to do.
If there is a better name for this, I'm open to it. App::yq perhaps? App::YAML::Filter maybe?