yq Training Sessions

Master YAML processing with yq. Each drill builds on the previous, from basic reading to real infrastructure patterns.

Training Philosophy

  1. Sessions first - Learn concepts step-by-step

  2. Drills for practice - Reinforce with repetition

  3. Real data - antora.yml, GitHub Actions, k8s manifests

  4. Hands-on - Type the commands, see the output

Sessions (Curriculum)

Session Focus Duration Status

01

YAML basics, yq syntax, output formats, .key, .[]

30 min

[ ] Planned

02

select, has, path, tag, type — filtering

45 min

[ ] Planned

03

In-place edit (-i), merge, delete, add

45 min

[ ] Planned

04

Multi-document YAML, anchors, aliases

45 min

[ ] Planned

05

Infrastructure: antora.yml, GitHub Actions, k8s manifests

60 min

[ ] Planned

Drills (Practice)

Drill Focus Difficulty

01

YAML reading, output formats, basic access

Beginner

02

select, has, path, type

Beginner

03

In-place edits, merge, delete

Intermediate

04

Multi-document, anchors, aliases

Intermediate

05

antora.yml, GH Actions, k8s patterns

Advanced

Quick Start

# Run the drill menu
bash ~/atelier/_bibliotheca/domus-captures/docs/modules/ROOT/examples/yq-drills/00-run-drill.sh

# Or run a specific drill
bash ~/atelier/_bibliotheca/domus-captures/docs/modules/ROOT/examples/yq-drills/00-run-drill.sh 01

Key Difference: yq vs jq

yq reads YAML (and JSON, XML, TOML). jq reads JSON only. The filter syntax is nearly identical — if you know jq, yq is the same language applied to YAML.

The critical flag: -o json converts YAML output to JSON, letting you pipe yq into jq for the best of both.