Skip to content
Yaml parsing for BASH.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Build Status

Yup. A YAML parser completely in bash. I can't believe it either.

At the moment, we support a subset of the yaml spec.

Getting Started

Install it:

$ curl -s | sh

Then query with it:

$ ysh -f my.yml -q ""

Library use

If installed:

YSH_LIB=1;source /usr/local/bin/ysh

If you want the internet as your only dependency:

$ YSH_LIB=1;source /dev/stdin <<< "$(curl -s"


-f, --file <file_name>

Read from a file.

-T, --transpiled <file_name>

Read from a pre-transpiled string.

-q, --query <query>

Generic query string.

-Q, --query-val <query>

Safe query. Guarentees the return is a value.

-s, --sub <query>

Query for a subtree of yaml. Guarentees results are a subtree and no values are returned.

-l, --list <query>

Query for a list.

-L, --list <query>

Query for a list of values. Guarentees results are all values.

-c, --count <query>

Query for a list and count the elements.

-i, --index <i>

Access i'th element from chained list query.

-I, --index-val <i>

Access i'th element from chained list query. Garentees result is a value.

-t, --tops

Return top level keys of structure.

-n, --next

Moves to next block

-h, --help

Show this help dialog.

For more complete usage and examples look at the docs.

Made with ❤️ by the developers at

You can’t perform that action at this time.