What is yq?
yq is a lightweight, portable command-line processor for structured data — YAML, JSON, XML, CSV, TOML and properties files — written in Go by Mike Farah. It uses jq-like syntax, so everything you know from jq transfers directly: query, transform, merge, and edit files in place, in scripts and pipelines, with a single dependency-free binary.
yq jq-wrapper found in some archives; this package supersedes it cleanly, and no python or jq is required.
apt upgrade keeps you on the latest version.
⚡ Key Features of yq
🔄 Six Formats
YAML, JSON, XML, CSV/TSV, TOML and properties — read one, output another: yq -o=json '.' config.yaml converts in one step.
🧠 jq-like Syntax
Familiar paths, pipes, functions and operators. If you can write a jq filter, you can already use yq on YAML.
✏️ In-place Editing
yq -i '.spec.replicas = 3' deploy.yaml — scripted edits to Kubernetes manifests, CI configs and Compose files, comments preserved.
📦 Zero Dependencies
A single static Go binary. No runtime, no libraries, no python — ideal for minimal containers and CI runners.
🔀 Merge & Anchors
Deep-merges multiple files, resolves YAML anchors and aliases, handles multi-document streams — the hard YAML cases done right.
📖 Man Page Included
This package ships the full man page alongside the binary — man yq works offline, matching Debian conventions.
🏆 Why install it with apt?
- Fleet-friendly: pin one repo in your base images and every server, container and CI runner gets the same current yq
- No curl-to-bin: a GPG-signed repository instead of downloading binaries into
/usr/local/binby hand - The right yq: guarantees mikefarah/yq v4 semantics everywhere — no surprises from the python wrapper on some machines
- Automatic updates: new upstream releases arrive with your normal
apt upgrade - Multi-arch: amd64, arm64, armhf, ppc64el, s390x and riscv64
📦 Installation from deb.griffo.io
Step 1: Add Repository
sudo install -d -m 0755 /etc/apt/keyrings
curl -fsSL https://deb.griffo.io/EA0F721D231FDD3A0A17B9AC7808B4DD62C41256.asc | sudo gpg --dearmor --yes -o /etc/apt/keyrings/deb.griffo.io.gpg
echo "deb [signed-by=/etc/apt/keyrings/deb.griffo.io.gpg] https://deb.griffo.io/apt $(lsb_release -sc 2>/dev/null) main" | sudo tee /etc/apt/sources.list.d/deb.griffo.io.list > /dev/null
sudo apt updateinstall -d -m 0755 /etc/apt/keyrings
curl -fsSL https://deb.griffo.io/EA0F721D231FDD3A0A17B9AC7808B4DD62C41256.asc | gpg --dearmor --yes -o /etc/apt/keyrings/deb.griffo.io.gpg
echo "deb [signed-by=/etc/apt/keyrings/deb.griffo.io.gpg] https://deb.griffo.io/apt $(lsb_release -sc 2>/dev/null) main" | tee /etc/apt/sources.list.d/deb.griffo.io.list > /dev/null
apt update🆓 There is an always-free mirror. deb-free.griffo.io serves packages free forever — no account, no subscription, at most 2 months behind upstream, security fixes immediately. It currently carries Ghostty, Oh My Posh and Zed; yq is not one of them, so the repository above is the only way to get it today — ask and it can be enrolled.
Step 2: Install yq
sudo apt install -y yqapt install -y yq🚀 First run
yq '.services | keys' docker-compose.yml # query
yq -i '.image.tag = "1.2.3"' values.yaml # edit in place
yq -o=json '.' config.yaml # YAML -> JSON📦 Package Build Repository
The Debian packages are automatically built and maintained in this GitHub repository:
- 📂 yq-debian - Latest release builds
🔗 Related Packages
Also available from deb.griffo.io:
- k9s - Kubernetes TUI — pairs with yq for manifest wrangling
- lazydocker - Docker TUI for the Compose files you just edited
- just - A command runner to wrap your yq one-liners
💝 Support This Project
If this repository saves you time and effort, please consider supporting it!