A portable command-line YAML, JSON, XML, CSV, TOML, HCL, and properties processor with jq-like syntax.
yq is a command-line tool for querying, updating, and converting YAML, JSON, XML, CSV, TOML, HCL, and properties files. It uses a jq-like syntax, allowing developers to manipulate structured data across multiple formats with a single, familiar tool. It solves the problem of needing different utilities for each data format by providing a unified processor.
DevOps engineers, system administrators, and developers working with configuration files, CI/CD pipelines, or data transformation tasks across YAML, JSON, XML, and other formats.
Developers choose yq for its jq-like syntax that reduces learning curve, its support for a wide range of data formats, and its portability as a single binary. It excels at in-place updates, format conversion, and complex data manipulations without external dependencies.
yq is a portable command-line YAML, JSON, XML, CSV, TOML, HCL and properties processor
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Uses expressions similar to jq, reducing the learning curve for developers already proficient with jq while extending support to YAML, XML, and other formats.
Processes YAML, JSON, XML, CSV, TOML, HCL, INI, and properties files with auto-detection or explicit flags, enabling seamless conversion and manipulation across configuration types.
The -i flag allows direct modification of files while preserving formatting and comments where possible, streamlining DevOps tasks like updating Kubernetes manifests.
Written in Go, it offers dependency-free binaries for various platforms and supports Docker/Podman, ensuring easy deployment in diverse environments.
The README admits it doesn't support everything jq does, limiting advanced JSON manipulations and functions available in jq.
Known issues include imperfect handling of comment positions and whitespace preservation in YAML files, which can be problematic for version-controlled configurations.
PowerShell requires careful escaping of quotes in expressions, leading to scripting friction as noted in the troubleshooting section.
Advanced tasks like merging files with globs require non-intuitive commands (e.g., 'ea' for evaluate all), increasing cognitive load compared to simpler utilities.