Skip to content

Command Line (CLI) Tools

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

In addition to defining a standard for how to provide YAML/JSON/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/JSON/Compatible 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: Changes one or more Scalar values in a YAML/JSON/Compatible file at a specified YAML Path. When matching singular results, the value can be archived to another key before it is replaced. Matched values can be verified before they are replaced. Further, EYAML can be employed to encrypt the new values and/or decrypt an old value before checking it.
  • yaml-diff: Compare YAML/JSON/Compatible documents node by node. EYAML can be employed to compare encrypted values.
  • yaml-paths: Returns zero or more YAML Paths indicating where in given YAML/JSON/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 single- or multi-document YAML/JSON/Compatible documents together, including complex data provided via STDIN.
  • yaml-validate: Validates one or more single- or multi-document YAML, JSON, and compatible files.
  • 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