The workshop · Edition No. 41 · 5 Oct 2026

mikefarah/yq

Reads and edits YAML, JSON, XML and CSV files from the command line with jq-like expressions.

← The workshopRead the whole edition →

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.

Stars15,939
LicenceMIT at master/LICENSE, stock text, holder named: 'Copyright (c) 2017 Mike Farah'.
Latestv4.54.1, '29 Sep 04:22' with no year, settled as 29 September 2026 by pkg.go.dev.
Good
  • 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.
Watch for
  • There is another program called yq. pip install yq installs 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.
Similar repositories
Install
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
Screenshots
mikefarah/yq: GitHub preview card

Get the next edition in your inbox

A dozen repositories, opened and checked. The licence read, the last release dated, and the ones that did not make it named with the reason. It is the half most lists leave out.

No tracking pixels. One click to leave. The archive stays free either way.

We use your address to send the edition and nothing else. Confirm by email, leave in one click. How we handle it.