15,939 stars · MIT at master/LICENSE, stock text, holder named: 'Copyright (c) 2017 Mike Farah'. · v4.54.1, '29 Sep 04:22' with no year, settled as 29 September 2026 by pkg.go.dev. · Track this in Scout
Reads and edits YAML, JSON, XML and CSV files from the command line with jq-like expressions.
▶Repo detailsthe review · specs · pros & cons · install
What it is
One compiled program that queries and edits structured text files using expressions much like those of jq, the long-established tool for JSON. It handles YAML, JSON, XML, CSV, TOML, HCL, INI and properties files, and it can convert between them.
What it is good for. Anyone who edits configuration files and anyone who writes scripts that have to. Reading a value out of a settings file with grep and a text pattern works until the file is laid out slightly differently; this reads the actual structure, so it keeps working. It is the quickest useful thing on this page.
- Installed by almost every package manager there is, and also available as a single file you download.
- MIT licensed, with the holder named:
Copyright (c) 2017 Mike Farah. - Eleven years old, 15,939 stars, and version 4.54.1 landed on 29 September 2026.
- There is another program called
yq.pip install yqinstalls a different tool by a different author, which behaves differently. Install this one through a package manager or by downloading the file. - The project's own README admits the limit that matters: it "attempts to preserve comment positions and whitespace as much as possible, but it does not handle all scenarios". Editing a hand-written configuration file can quietly reformat parts of it, so keep a copy.
- 248 open issues and 51 open pull requests on what is effectively a one-maintainer project. The expressions are like
jq's rather than the same, so knowledge does not transfer cleanly.
- jqlang/jq
The original and the one everything else is compared with, but JSON only.
Track this in Scout - TomWright/dasel
The same job across the same formats with a simpler selector syntax, which is easier to start with and less powerful.
Track this in Scout - kislyuk/yq
The other yq: a thin wrapper that converts YAML to JSON and hands it to jq, so it uses real jq expressions.
Track this in Scout
brew install yq # macOS or Linux with Homebrew snap install yq # Ubuntu and other snap systems winget install --id MikeFarah.yq # Windows # Or download the single file directly, on Linux: wget https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 -O /usr/local/bin/yq chmod +x /usr/local/bin/yq # Read one value out of a file: yq '.services.web.image' docker-compose.yml # Change one value in place: yq -i '.services.web.image = "nginx:1.29"' docker-compose.yml
