Skip to content

Command Line (CLI) Tools

William W. Kimball, Jr., MBA, MSIS edited this page Oct 2, 2020 · 12 revisions

In addition to defining a standard for how to provide YAML/Compatible data navigation to users, the YAML Path project also provides reference command-line (CLI) tool implementations of the standard. These tools enable users to immediately employ various YAML Path capabilities without needing to implement the standard themselves.

The reference tools include:

  • yaml-get: Retrieves one or more values from a YAML file at a specified YAML Path. Output is printed to STDOUT, one line per result. When a result is a complex data-type (Array or Hash), a JSON dump is produced to represent it. EYAML can be employed to decrypt the values.
  • yaml-set: Returns zero or more YAML Paths indicating where in given YAML/Compatible data one or more search expressions match. Values, keys, and/or anchors can be searched. EYAML can be employed to search encrypted values.
  • yaml-merge: Merges two or more YAML/Compatible files together.
  • yaml-paths: Changes one or more values in a YAML file at a specified YAML Path. Matched values can be checked before they are replaced to mitigate accidental change. When matching singular results, the value can be archived to another key before it is replaced. Further, EYAML can be employed to encrypt the new values and/or decrypt an old value before checking them.
  • eyaml-rotate-keys: Rotates the encryption keys used for all EYAML values within a set of YAML files, decrypting with old keys and re-encrypting using replacement keys.
Clone this wiki locally