Read
Portable AWK recognizes mappings, sequences, flow nodes, scalars, tags, anchors, and documents.
Version 1.6 · 1,110 yq programs agree
Program YAML with one portable shell script. No package manager. No language runtime. No mystery binary. Just /bin/sh, AWK, and a frankly unreasonable amount of ambition.
1services:
2 - name: api
3 enabled: true
4 - name: worker
5 enabled: false
6 - name: web
7 enabled: true
A real parser this time
Version 1 replaces the old flattened intermediate format with a proper YAML node graph. Structure survives intact, so queries stop fighting the parser.
Portable AWK recognizes mappings, sequences, flow nodes, scalars, tags, anchors, and documents.
Aliases and merge sources connect through node identity, with precedence and recursion validation.
Paths, slices, interpolation, regexes, reducers, and assignments operate on real node references without flattening them.
Tiny commands. Serious YAML.
Stream, map, and reduce without inviting another runtime.
$ ysh '.services | map(.name) | unique' config.yml
["api","worker","web"]
Collections become clean, typed JSON.
$ ysh -o=json '.services[0]' config.yml
{"name":"api","enabled":true,"port":8080}
Change a real file in place. The comments get to stay.
$ ysh -i '.services[] | select(.enabled) | .tier = "active"' config.yml
$ ysh '.services[].tier' config.yml
active
backend
active
Open the hood whenever the YAML gets weird.
$ ysh --type '.release.date' config.yml
timestamp
$ ysh --ast config.yml
node 1 mapping line=1
01 / PORTABLE
Bootstrap containers, CI runners, old Macs, tiny servers, and recovery shells. If the system has /bin/sh and AWK, YAML.sh is ready.
02 / PRECISE
Use .["key.with.dots"] when punctuation belongs to the YAML—not the query.
03 / HONEST
Full pinned outcomes, strict rejection, generated properties, and explicit limits—without claiming that one corpus is the whole language.
Read the support contract04 / HACKABLE
The shipped executable contains the complete shell launcher and AWK engine. Read it, copy it, bend it.
05 / OBSERVABLE
--ast and --events turn parser internals into first-class debugging tools.
Install v1.6
The installer downloads a pinned release and places ysh in /usr/local/bin. Set YSH_INSTALL_DIR to choose another location.
curl -fsSL https://yaml.azohra.com/install | sh
Prefer to inspect first? Read the installer source.