On this page
Overview
yq is a Go command-line tool for querying, transforming, and updating structured data with jq-like expressions. Its single binary supports merges, in-place edits, and format conversion for shell scripts and CI pipelines.
Features and best fit
Based on official documentation; not hands-on tested · Content checked:
Key features
Process several structured-data formats with one expression language
The CLI reads YAML, JSON, XML, CSV, TSV, TOML, properties, and HCL and can select fields, update values, merge documents, and emit another format.
Sources: [1]
Best fit
Fits shell and CI workflows that inspect or transform configuration
It is useful for extracting and validating Kubernetes manifests or application configuration without maintaining a separate program for each small conversion.
Sources: [1]
Before adoption
Account for major-version syntax changes and destructive in-place edits
Version 4 command syntax differs from older major versions. Because -i rewrites files, confirm the input format, expression, and stdout result before using it on version-controlled files.
Sources: [1]
Official sources
- [1]yq v4.54.1 README(2026-10-04)
- [2]yq v4.54.1 release(2026-10-04)
- [3]yq v4.54.1 license(2026-10-04)
Supplemental curator note
Verify v4 expressions and format detection on a small sample first, and pair in-place edits with version control and backups.
Try it in 3 steps
- 1
Build v4.54.1 into an isolated directory
Build the reviewed tag without changing a system-wide binary path.
mkdir -p yq-demo/bin && GOBIN="$PWD/yq-demo/bin" go install github.com/mikefarah/yq/v4@v4.54.1 - 2
Verify the pinned version
Confirm that the selected executable reports v4.54.1.
./yq-demo/bin/yq --version - 3
Query a sample YAML file without editing it
Extract a nested value while leaving the input file unchanged.
printf "services:\n api:\n image: example:v1\n" > yq-demo/sample.yml && ./yq-demo/bin/yq ".services.api.image" yq-demo/sample.yml
Growth
Growth trends · Last 30 days
16,049 Stars
Trend data is still being collected.
Development activity
Last 90 days · weekly
- Commits (last 30 days)
- 27
- Open PRs
- 57
Development activity is still being collected.
Built with
Categories and tags
Categories
GitHub data
GitHub dataView detailed GitHub data
GitHub Topics
- yaml-processor
- yaml
- cli
- golang
- splat
- devops-tools
- portable
- bash
- xml
- json
- csv
- properties
Related information
Write a related articleShare a guide or use case for this OSS in Markdown. Articles are published after administrator approval.
Explore next
- Ollama182,132 Stars
1 shared tag(s) · 1 shared category(s) · Same language
one local runtime for acquiring models, running inference, and serving applications
Go - fzf83,368 Stars
1 shared tag(s) · 1 shared category(s) · Same language
Fuzzy-select candidates from stdin or a file walker and extend the terminal finder with previews, shell actions, and remote control
Go - Lazygit82,880 Stars
1 shared tag(s) · 1 shared category(s) · Same language
Bring staging, commits, branches, rebases, worktrees, and reflog operations into a keyboard-driven terminal Git UI
Go - mkcert59,717 Stars
1 shared tag(s) · 1 shared category(s) · Same language
create a local CA and easily issue browser-trusted TLS certificates for localhost and development domains
Go - GitHub CLI46,526 Stars
1 shared tag(s) · 1 shared category(s) · Same language
work with pull requests, issues, repositories, and the GitHub API through
Goghas part of terminal-first development workflows - duf15,336 Stars
1 shared tag(s) · 1 shared category(s) · Same language
Inspect filesystem capacity in readable tables or structured JSON
Go
Report incorrect information
Tell us if any listing information is incorrect or outdated.