yq

github.com ↗

Query and update YAML, JSON, XML, and other structured data from the command line.

SI Score
80/100
Pricing
Not confirmed
Free plan
Not confirmed
Sign-up required
Not confirmed

Ask SI about yq

Answers use saved listing facts and recorded sources.
Homepage screenshot
Screenshot of the yq homepage

What it does

yq is a Go command-line processor for YAML, JSON, XML, INI, properties, CSV, and TSV. Its jq-like expression syntax can read values, update files in place, merge inputs, and convert between formats. The official repository provides standalone binaries and documents package-manager, container, and Go installation options. The project notes that it does not support everything jq does and that comment and whitespace preservation has limitations.

The official quick guide shows yq '.a.b[0].c' file.yaml to read a nested value and yq -i '.a.b[0].c = "cool"' file.yaml to update a file in place. It also documents merging files and converting between formats. The GitBook usage documentation covers output formatting, including color, pretty printing, indentation, and scalar unwrapping.

The repository offers dependency-free binaries and installation through package managers, Docker or Podman, and go install. It lists Linux, macOS, and Windows binaries. The documentation cautions that yq does not implement every jq feature and may not preserve comments or whitespace in all scenarios.

The official releases page marks v4.54.1, titled “if-then-else,” as latest; the page shows 29 Sep and its assets are timestamped 2026-09-29. The commit feed's latest entry is Add lookback_days input to popular PRs workflow (#2934), dated 2026-10-20T23:47:11Z. The repository's exact LICENSE file is the MIT License.

Strengths

  • Supports querying and modifying several structured-data formats from one command-line tool.
  • The official repository documents standalone binaries, package managers, containers, and Go installation.
  • Offers jq-like expressions, in-place edits, file merging, and format conversion.

Watch out for

  • The project does not support every jq feature.
  • Comment and whitespace preservation is not guaranteed in every scenario.

Best for

  • Inspecting or updating YAML and JSON in scripts, shells, and CI workflows
  • Converting or merging configuration files across supported formats

Sources