yq — YAML Processing
YAML processing with yq across 9 disciplines. Uses jq-compatible syntax for YAML files. All commands copy-paste-runnable against real files in this repository and standard infrastructure YAML.
Disciplines
| Discipline | Description |
|---|---|
Key access, nested paths, scalar values, array traversal, length, keys, type inspection |
|
select, test, has, to_entries filtering, map(select()), regex on keys and values |
|
to_entries/from_entries, map, with_entries, sort_by, group_by, unique_by, flatten |
|
In-place edit (-i), add/delete/update keys, merge files, set values, array manipulation |
|
Raw output, compact JSON, format conversion (JSON/XML/CSV/TSV/props), format strings, @base64 |
|
antora.yml auditing, attribute inspection, nav parsing, playbook queries, cross-repo comparison |
|
systemd inventories, docker-compose, Kubernetes manifests, Helm values, cloud-init |
|
Dotted keys, !!null, string vs number, yq vs jq differences, credential safety, YAML anchors |
|
Document index, select documents, split/merge multi-doc YAML, front matter extraction |
See Also
-
jq — JSON counterpart (identical syntax)
-
jq Text Processing — fundamentals shared by both tools