Version 1.1 · now the nodes can flow

yq energy.
zero baggage.

Query YAML with one portable shell script. No package manager. No language runtime. No mystery binary. Just /bin/sh, AWK, and a surprising amount of ambition.

  • 1 file
  • 0 extra packages
  • 47 behavioral tests
config.yml — ysh POSIX

1services:

2  - name: api

3    enabled: true

4  - name: worker

5    enabled: false

6  - name: web

7    enabled: true

$ ysh '.services[] | select(.enabled) | .name' config.yml
api
web
PIPES + SELECT ANCHORS + ALIASES MERGE KEYS TAGS + TYPES EMPTY COLLECTIONS MULTI-DOCUMENT

A real parser this time

It parses before it queries.

Version 1 replaces the old flattened intermediate format with a proper YAML node graph. Structure survives intact, so queries stop fighting the parser.

01

Read

Portable AWK recognizes mappings, sequences, flow nodes, scalars, tags, anchors, and documents.

02

Resolve

Aliases and merge sources connect through node identity, with precedence and recursion validation.

03

Query

Paths, iteration, pipes, filters, comparisons, and defaults stream real node references without flattening them.

Tiny commands. Serious YAML.

Meet the new CLI.

Stream, filter, then ask for exactly what you need.

$ ysh '.services[] | select(.enabled) | .name' config.yml
api
web

01 / PORTABLE

Built for the machines between machines.

Bootstrap containers, CI runners, old Macs, tiny servers, and recovery shells. If the system has /bin/sh and AWK, YAML.sh is ready.

macOS AWKUbuntu AWKBusyBox AWK

02 / PRECISE

Keys stay keys.

Use .["key.with.dots"] when punctuation belongs to the YAML—not the query.

03 / HONEST

A tested subset.

No hand-waving about full YAML compliance. Every supported boundary is documented and exercised.

Read the support contract

04 / HACKABLE

One file. Open book.

The shipped executable contains the complete shell launcher and AWK engine. Read it, copy it, bend it.

05 / OBSERVABLE

AST and events included.

--ast and --events turn parser internals into first-class debugging tools.

Install v1

One pipe.
Then go query something.

The installer downloads a pinned release and places ysh in /usr/local/bin. Set YSH_INSTALL_DIR to choose another location.

Terminalv1.1.0
curl -fsSL https://yaml.azohra.com/install | sh

Prefer to inspect first? Read the installer source.