yq: A lightweight and portable command-line YAML, JSON, INI and XML processor.
What problem it solves
Structured configuration and data files need to be queried, updated, merged, and converted without adopting a separate application for each format. Command-line workflows also require tools that can process files directly or accept piped input while preserving useful document structure and formatting.
Key features
Query and update structured files — Select values with expressions and update files in place, including multiple assignments and environment-variable substitution.
Source: README
Work across multiple formats — Process YAML, JSON, XML, CSV, TSV, TOML, HCL, properties, INI, and other supported inputs and outputs, with automatic format detection.
Source: README
Convert between formats — Translate structured documents between formats from the command line, including JSON-to-YAML, YAML-to-JSON, and XML-to-YAML conversions.
Source: README
Preserve and manipulate YAML details — Handle multi-document YAML, front matter, comments, styles, tags, anchors, aliases, and colorized output while preserving formatting and comments during updates where possible.
Source: README
Portable installation and automation — Install through package managers, downloadable binaries, containers, or Go, and invoke processing from a GitHub Action.
Source: README, action.yml
Quick start
Copied verbatim from the project's README.
brew install yqyq '.a.b[0].c' file.yamlyq -i '.a.b[0].c = "cool"' file.yamlWho it may suit
Inference: may suit developers, system administrators, and automation authors who routinely inspect or modify structured configuration and data files from scripts and command-line workflows.
Topics to discuss
Which additional format conversion or editing workflows would be most useful to support?
How could the handling of comments, whitespace, and multi-document YAML be improved?
Which examples for pipelines, containers, and automated deployment workflows should the community add?
Written by ReadmeX AI from the project's README, source and public GitHub data; it may contain mistakes.
Read the original README https://github.com/mikefarah/yq#readme
ReadmeX opened this community for a trending project; it is not run by the project. Maintainers can claim it from the community page.
Comments
…