# yq for YAML, XML, and JSON transformations
A scriptable CLI for transforming YAML, JSON, XML, TOML, and properties files.
Agent Readiness Score: 92/100
yq is useful for agents when usage is constrained to predictable commands and documented output.
## Install

- Recommended: `brew install yq`

## Structured output

Supported output formats: yaml, json, text.
Prefer structured output flags such as `--json`, `--format json`, or equivalent when available.

## Safe commands

- Show help: `yq --help` — Inspect command surface before automation.
- Check version: `yq --version` — Verify the installed CLI.

## Agent instructions

- Claude Code / Codex CLI / Gemini CLI: Use yq only with non-interactive commands. Prefer structured output: yaml, json, text. Ask before destructive operations.

## Safety notes

- Prefer non-interactive usage and explicit output flags when an agent runs this command.
- Treat commands that deploy, delete, charge money, or mutate production data as approval-required.
- Record the exact command, output format, and scope before adding it to an agent workflow.

## Metadata

Official URL: https://mikefarah.gitbook.io/yq/
GitHub: https://github.com/mikefarah/yq
Docs: https://mikefarah.gitbook.io/yq/
