Forrest logo
back to context overview

yq

List of commands for yq:

  • yq:ai:134d1 A lightweight and flexible command-line YAML processor
    $ yq
    try on your machine
    explain this command
  • yq:tldr:38feb yq: Output the first element in a YAML file that contains only an array (v3).
    $ yq read ${filename-yaml} '[0]'
    try on your machine
    explain this command
  • yq:tldr:699dd yq: Output a YAML file, in pretty-print format (v4+).
    $ yq eval ${filename-yaml}
    try on your machine
    explain this command
  • yq:tldr:7aa22 yq: Merge two files and print to `stdout` (v4+).
    $ yq eval-all 'select(filename == "${filename1-yaml}") * select(filename == "${filename2-yaml}")' ${filename1-yaml} ${filename2-yaml}
    try on your machine
    explain this command
  • yq:tldr:8366a yq: Merge two files and print to `stdout` (v3).
    $ yq merge ${filename1-yaml} ${filename2-yaml} --colors
    try on your machine
    explain this command
  • yq:tldr:b7ff6 yq: Set (or overwrite) a key to a value in a file (v4+).
    $ yq eval '.${key} = "${value}"' --inplace ${filename-yaml}
    try on your machine
    explain this command
  • yq:tldr:c8061 yq: Output a YAML file, in pretty-print format (v3).
    $ yq read ${filename-yaml} --colors
    try on your machine
    explain this command
  • yq:tldr:dc364 yq: Set (or overwrite) a key to a value in a file (v3).
    $ yq write --inplace ${filename-yaml} '${key}' '${value}'
    try on your machine
    explain this command
  • yq:tldr:f0110 yq: Output the first element in a YAML file that contains only an array (v4+).
    $ yq eval '.[0]' ${filename-yaml}
    try on your machine
    explain this command
back to context overview