[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-4888":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":18,"stars30d":19,"stars90d":16,"forks30d":16,"starsTrendScore":20,"compositeScore":21,"rankGlobal":10,"rankLanguage":10,"license":22,"archived":23,"fork":23,"defaultBranch":24,"hasWiki":23,"hasPages":23,"topics":25,"createdAt":10,"pushedAt":10,"updatedAt":41,"readmeContent":42,"aiSummary":43,"trendingCount":16,"starSnapshotCount":16,"syncStatus":44,"lastSyncTime":45,"discoverSource":46},4888,"yq","mikefarah\u002Fyq","mikefarah","yq is a portable command-line YAML, JSON, XML, CSV, TOML, HCL  and properties processor","https:\u002F\u002Fmikefarah.gitbook.io\u002Fyq\u002F",null,"Go",15530,780,62,240,0,15,50,163,57,43.68,"MIT License",false,"master",[26,27,28,29,30,31,32,33,34,35,36,37,38,39,40],"bash","cli","csv","devops-tools","golang","hcl","json","portable","properties","splat","terraform","toml","xml","yaml","yaml-processor","2026-06-12 02:01:05","# yq\n\n![Build](https:\u002F\u002Fgithub.com\u002Fmikefarah\u002Fyq\u002Fworkflows\u002FBuild\u002Fbadge.svg)  ![Docker Pulls](https:\u002F\u002Fimg.shields.io\u002Fdocker\u002Fpulls\u002Fmikefarah\u002Fyq.svg) ![Github Releases (by Release)](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fdownloads\u002Fmikefarah\u002Fyq\u002Ftotal.svg) ![Go Report](https:\u002F\u002Fgoreportcard.com\u002Fbadge\u002Fgithub.com\u002Fmikefarah\u002Fyq) ![CodeQL](https:\u002F\u002Fgithub.com\u002Fmikefarah\u002Fyq\u002Fworkflows\u002FCodeQL\u002Fbadge.svg)\n\n\nA lightweight and portable command-line YAML, JSON, INI and XML processor. `yq` uses [jq](https:\u002F\u002Fgithub.com\u002Fstedolan\u002Fjq) (a popular JSON processor) like syntax but works with yaml files as well as json, kyaml, xml, ini, properties, csv and tsv. It doesn't yet support everything `jq` does - but it does support the most common operations and functions, and more is being added continuously.\n\nyq is written in Go - so you can download a dependency free binary for your platform and you are good to go! If you prefer there are a variety of package managers that can be used as well as Docker and Podman, all listed below.\n\n## Quick Usage Guide\n\n### Basic Operations\n\n**Read a value:**\n```bash\nyq '.a.b[0].c' file.yaml\n```\n\n**Pipe from STDIN:**\n```bash\nyq '.a.b[0].c' \u003C file.yaml\n```\n\n**Update a yaml file in place:**\n```bash\nyq -i '.a.b[0].c = \"cool\"' file.yaml\n```\n\n**Update using environment variables:**\n```bash\nNAME=mike yq -i '.a.b[0].c = strenv(NAME)' file.yaml\n```\n\n### Advanced Operations\n\n**Merge multiple files:**\n```bash\n# merge two files\nyq -n 'load(\"file1.yaml\") * load(\"file2.yaml\")'\n\n# merge using globs (note: `ea` evaluates all files at once instead of in sequence)\nyq ea '. as $item ireduce ({}; . * $item )' path\u002Fto\u002F*.yml\n```\n\n**Multiple updates to a yaml file:**\n```bash\nyq -i '\n  .a.b[0].c = \"cool\" |\n  .x.y.z = \"foobar\" |\n  .person.name = strenv(NAME)\n' file.yaml\n```\n\n**Find and update an item in an array:**\n```bash\n# Note: requires input file - add your file at the end\nyq -i '(.[] | select(.name == \"foo\") | .address) = \"12 cat st\"' data.yaml\n```\n\n**Convert between formats:**\n```bash\n# Convert JSON to YAML (pretty print)\nyq -Poy sample.json\n\n# Convert YAML to JSON\nyq -o json file.yaml\n\n# Convert XML to YAML\nyq -o yaml file.xml\n```\n\nSee [recipes](https:\u002F\u002Fmikefarah.gitbook.io\u002Fyq\u002Frecipes) for more examples and the [documentation](https:\u002F\u002Fmikefarah.gitbook.io\u002Fyq\u002F) for more information.\n\nTake a look at the discussions for [common questions](https:\u002F\u002Fgithub.com\u002Fmikefarah\u002Fyq\u002Fdiscussions\u002Fcategories\u002Fq-a), and [cool ideas](https:\u002F\u002Fgithub.com\u002Fmikefarah\u002Fyq\u002Fdiscussions\u002Fcategories\u002Fshow-and-tell)\n\n## Install\n\n### [Download the latest binary](https:\u002F\u002Fgithub.com\u002Fmikefarah\u002Fyq\u002Freleases\u002Flatest)\n\n### wget\nUse wget to download pre-compiled binaries. Choose your platform and architecture:\n\n**For Linux (example):**\n```bash\n# Set your platform variables (adjust as needed)\nVERSION=v4.2.0\nPLATFORM=linux_amd64\n\n# Download compressed binary\nwget https:\u002F\u002Fgithub.com\u002Fmikefarah\u002Fyq\u002Freleases\u002Fdownload\u002F${VERSION}\u002Fyq_${PLATFORM}.tar.gz -O - |\\\n  tar xz && sudo mv yq_${PLATFORM} \u002Fusr\u002Flocal\u002Fbin\u002Fyq\n\n# Or download plain binary\nwget https:\u002F\u002Fgithub.com\u002Fmikefarah\u002Fyq\u002Freleases\u002Fdownload\u002F${VERSION}\u002Fyq_${PLATFORM} -O \u002Fusr\u002Flocal\u002Fbin\u002Fyq &&\\\n    chmod +x \u002Fusr\u002Flocal\u002Fbin\u002Fyq\n```\n\n**Latest version (Linux AMD64):**\n```bash\nwget https:\u002F\u002Fgithub.com\u002Fmikefarah\u002Fyq\u002Freleases\u002Flatest\u002Fdownload\u002Fyq_linux_amd64 -O \u002Fusr\u002Flocal\u002Fbin\u002Fyq &&\\\n    chmod +x \u002Fusr\u002Flocal\u002Fbin\u002Fyq\n```\n\n**Available platforms:** `linux_amd64`, `linux_arm64`, `linux_arm`, `linux_386`, `darwin_amd64`, `darwin_arm64`, `windows_amd64`, `windows_386`, etc.\n\n### MacOS \u002F Linux via Homebrew:\nUsing [Homebrew](https:\u002F\u002Fbrew.sh\u002F)\n```\nbrew install yq\n```\n\n### Linux via snap:\n```\nsnap install yq\n```\n\n#### Snap notes\n`yq` installs with [_strict confinement_](https:\u002F\u002Fdocs.snapcraft.io\u002Fsnap-confinement\u002F6233) in snap, this means it doesn't have direct access to root files. To read root files you can:\n\n```\nsudo cat \u002Fetc\u002Fmyfile | yq '.a.path'\n```\n\nAnd to write to a root file you can either use [sponge](https:\u002F\u002Flinux.die.net\u002Fman\u002F1\u002Fsponge):\n```\nsudo cat \u002Fetc\u002Fmyfile | yq '.a.path = \"value\"' | sudo sponge \u002Fetc\u002Fmyfile\n```\nor write to a temporary file:\n```\nsudo cat \u002Fetc\u002Fmyfile | yq '.a.path = \"value\"' | sudo tee \u002Fetc\u002Fmyfile.tmp\nsudo mv \u002Fetc\u002Fmyfile.tmp \u002Fetc\u002Fmyfile\nrm \u002Fetc\u002Fmyfile.tmp\n```\n\n### Run with Docker or Podman\n\n#### One-time use:\n```bash\n# Docker - process files in current directory\ndocker run --rm -v \"${PWD}\":\u002Fworkdir mikefarah\u002Fyq '.a.b[0].c' file.yaml\n\n# Podman - same usage as Docker\npodman run --rm -v \"${PWD}\":\u002Fworkdir mikefarah\u002Fyq '.a.b[0].c' file.yaml\n```\n\n**Security note:** You can run `yq` in Docker with restricted privileges:\n```bash\ndocker run --rm --security-opt=no-new-privileges --cap-drop all --network none \\\n  -v \"${PWD}\":\u002Fworkdir mikefarah\u002Fyq '.a.b[0].c' file.yaml\n```\n\n#### Pipe data via STDIN:\n\nYou'll need to pass the `-i --interactive` flag to Docker\u002FPodman:\n\n```bash\n# Process piped data\ndocker run -i --rm mikefarah\u002Fyq '.this.thing' \u003C myfile.yml\n\n# Same with Podman\npodman run -i --rm mikefarah\u002Fyq '.this.thing' \u003C myfile.yml\n```\n\n#### Run commands interactively:\n\n```bash\ndocker run --rm -it -v \"${PWD}\":\u002Fworkdir --entrypoint sh mikefarah\u002Fyq\n```\n\n```bash\npodman run --rm -it -v \"${PWD}\":\u002Fworkdir --entrypoint sh mikefarah\u002Fyq\n```\n\nIt can be useful to have a bash function to avoid typing the whole docker command:\n\n```bash\nyq() {\n  docker run --rm -i -v \"${PWD}\":\u002Fworkdir mikefarah\u002Fyq \"$@\"\n}\n```\n\n```bash\nyq() {\n  podman run --rm -i -v \"${PWD}\":\u002Fworkdir mikefarah\u002Fyq \"$@\"\n}\n```\n#### Running as root:\n\n`yq`'s container image no longer runs under root (https:\u002F\u002Fgithub.com\u002Fmikefarah\u002Fyq\u002Fpull\u002F860). If you'd like to install more things in the container image, or you're having permissions issues when attempting to read\u002Fwrite files you'll need to either:\n\n\n```\ndocker run --user=\"root\" -it --entrypoint sh mikefarah\u002Fyq\n```\n\n```\npodman run --user=\"root\" -it --entrypoint sh mikefarah\u002Fyq\n```\n\nOr, in your Dockerfile:\n\n```\nFROM mikefarah\u002Fyq\n\nUSER root\nRUN apk add --no-cache bash\nUSER yq\n```\n\n#### Missing timezone data\nBy default, the alpine image yq uses does not include timezone data. If you'd like to use the `tz` operator, you'll need to include this data:\n\n```\nFROM mikefarah\u002Fyq\n\nUSER root\nRUN apk add --no-cache tzdata\nUSER yq\n```\n\n#### Podman with SELinux\n\nIf you are using podman with SELinux, you will need to set the shared volume flag `:z` on the volume mount:\n\n```\n-v \"${PWD}\":\u002Fworkdir:z\n```\n\n### GitHub Action\n```\n  - name: Set foobar to cool\n    uses: mikefarah\u002Fyq@master\n    with:\n      cmd: yq -i '.foo.bar = \"cool\"' 'config.yml'\n  - name: Get an entry with a variable that might contain dots or spaces\n    id: get_username\n    uses: mikefarah\u002Fyq@master\n    with:\n      cmd: yq '.all.children.[\"${{ matrix.ip_address }}\"].username' ops\u002Finventories\u002Fproduction.yml\n  - name: Reuse a variable obtained in another step\n    run: echo ${{ steps.get_username.outputs.result }}\n```\n\nSee https:\u002F\u002Fmikefarah.gitbook.io\u002Fyq\u002Fusage\u002Fgithub-action for more.\n\n### Go Install:\n```\ngo install github.com\u002Fmikefarah\u002Fyq\u002Fv4@latest\n```\n\n## Community Supported Installation methods\nAs these are supported by the community :heart: - however, they may be out of date with the officially supported releases.\n\n_Please note that the Debian package (previously supported by @rmescandon) is no longer maintained. Please use an alternative installation method._\n\n\n### X-CMD\nCheckout `yq` on x-cmd: https:\u002F\u002Fx-cmd.com\u002Fmod\u002Fyq\n\n- Instant Results: See the output of your yq filter in real-time.\n- Error Handling: Encounter a syntax error? It will display the error message and the results of the closest valid filter\n\nThanks @edwinjhlee!\n\n### Nix\n\n```\nnix profile install nixpkgs#yq-go\n```\n\nSee [here](https:\u002F\u002Fsearch.nixos.org\u002Fpackages?channel=unstable&show=yq-go&from=0&size=50&sort=relevance&type=packages&query=yq-go)\n\n\n### Webi\n\n```\nwebi yq\n```\n\nSee [webi](https:\u002F\u002Fwebinstall.dev\u002F)\nSupported by @adithyasunil26 (https:\u002F\u002Fgithub.com\u002Fwebinstall\u002Fwebi-installers\u002Ftree\u002Fmaster\u002Fyq)\n\n### Arch Linux\n\n```\npacman -S go-yq\n```\n\n### Windows:\n\nUsing [Chocolatey](https:\u002F\u002Fchocolatey.org)\n\n[![Chocolatey](https:\u002F\u002Fimg.shields.io\u002Fchocolatey\u002Fv\u002Fyq.svg)](https:\u002F\u002Fchocolatey.org\u002Fpackages\u002Fyq)\n[![Chocolatey](https:\u002F\u002Fimg.shields.io\u002Fchocolatey\u002Fdt\u002Fyq.svg)](https:\u002F\u002Fchocolatey.org\u002Fpackages\u002Fyq)\n```\nchoco install yq\n```\nSupported by @chillum (https:\u002F\u002Fchocolatey.org\u002Fpackages\u002Fyq)\n\nUsing [scoop](https:\u002F\u002Fscoop.sh\u002F)\n```\nscoop install main\u002Fyq\n```\n\nUsing [winget](https:\u002F\u002Flearn.microsoft.com\u002Fen-us\u002Fwindows\u002Fpackage-manager\u002F)\n```\nwinget install --id MikeFarah.yq\n```\n\n### MacPorts:\nUsing [MacPorts](https:\u002F\u002Fwww.macports.org\u002F)\n```\nsudo port selfupdate\nsudo port install yq\n```\nSupported by @herbygillot (https:\u002F\u002Fports.macports.org\u002Fmaintainer\u002Fgithub\u002Fherbygillot)\n\n### Alpine Linux\n\nAlpine Linux v3.20+ (and Edge):\n```\napk add yq-go\n```\n\nAlpine Linux up to v3.19:\n```\napk add yq\n```\n\nSupported by Tuan Hoang (https:\u002F\u002Fpkgs.alpinelinux.org\u002Fpackages?name=yq-go)\n\n### Flox:\n\nFlox can be used to install yq on Linux, MacOS, and Windows through WSL.\n\n```\nflox install yq\n```\n\n\n### MacOS \u002F Linux via gah:\nUsing [gah](https:\u002F\u002Fgithub.com\u002Fmarverix\u002Fgah)\n\n```\ngah install yq\n```\n\n## Features\n- [Detailed documentation with many examples](https:\u002F\u002Fmikefarah.gitbook.io\u002Fyq\u002F)\n- Written in portable go, so you can download a lovely dependency free binary\n- Uses similar syntax as `jq` but works with YAML, INI, [JSON](https:\u002F\u002Fmikefarah.gitbook.io\u002Fyq\u002Fusage\u002Fconvert) and [XML](https:\u002F\u002Fmikefarah.gitbook.io\u002Fyq\u002Fusage\u002Fxml) files\n- Fully supports multi document yaml files\n- Supports yaml [front matter](https:\u002F\u002Fmikefarah.gitbook.io\u002Fyq\u002Fusage\u002Ffront-matter) blocks (e.g. jekyll\u002Fassemble)\n- Colorized yaml output\n- [Date\u002FTime manipulation and formatting with TZ](https:\u002F\u002Fmikefarah.gitbook.io\u002Fyq\u002Foperators\u002Fdatetime)\n- [Deep data structures](https:\u002F\u002Fmikefarah.gitbook.io\u002Fyq\u002Foperators\u002Ftraverse-read)\n- [Sort keys](https:\u002F\u002Fmikefarah.gitbook.io\u002Fyq\u002Foperators\u002Fsort-keys)\n- Manipulate yaml [comments](https:\u002F\u002Fmikefarah.gitbook.io\u002Fyq\u002Foperators\u002Fcomment-operators), [styling](https:\u002F\u002Fmikefarah.gitbook.io\u002Fyq\u002Foperators\u002Fstyle), [tags](https:\u002F\u002Fmikefarah.gitbook.io\u002Fyq\u002Foperators\u002Ftag) and [anchors and aliases](https:\u002F\u002Fmikefarah.gitbook.io\u002Fyq\u002Foperators\u002Fanchor-and-alias-operators).\n- [Update in place](https:\u002F\u002Fmikefarah.gitbook.io\u002Fyq\u002Fv\u002Fv4.x\u002Fcommands\u002Fevaluate#flags)\n- [Complex expressions to select and update](https:\u002F\u002Fmikefarah.gitbook.io\u002Fyq\u002Foperators\u002Fselect#select-and-update-matching-values-in-map)\n- Keeps yaml formatting and comments when updating (though there are issues with whitespace)\n- [Decode\u002FEncode base64 data](https:\u002F\u002Fmikefarah.gitbook.io\u002Fyq\u002Foperators\u002Fencode-decode)\n- [Load content from other files](https:\u002F\u002Fmikefarah.gitbook.io\u002Fyq\u002Foperators\u002Fload)\n- [Convert to\u002Ffrom json\u002Fndjson](https:\u002F\u002Fmikefarah.gitbook.io\u002Fyq\u002Fv\u002Fv4.x\u002Fusage\u002Fconvert)\n- [Convert to\u002Ffrom xml](https:\u002F\u002Fmikefarah.gitbook.io\u002Fyq\u002Fv\u002Fv4.x\u002Fusage\u002Fxml)\n- [Convert to\u002Ffrom hcl (terraform)](https:\u002F\u002Fmikefarah.gitbook.io\u002Fyq\u002Fv\u002Fv4.x\u002Fusage\u002Fhcl)\n- [Convert to\u002Ffrom toml](https:\u002F\u002Fmikefarah.gitbook.io\u002Fyq\u002Fv\u002Fv4.x\u002Fusage\u002Ftoml)\n- [Convert to\u002Ffrom properties](https:\u002F\u002Fmikefarah.gitbook.io\u002Fyq\u002Fv\u002Fv4.x\u002Fusage\u002Fproperties)\n- [Convert to\u002Ffrom csv\u002Ftsv](https:\u002F\u002Fmikefarah.gitbook.io\u002Fyq\u002Fusage\u002Fcsv-tsv)\n- [General shell completion scripts (bash\u002Fzsh\u002Ffish\u002Fpowershell)](https:\u002F\u002Fmikefarah.gitbook.io\u002Fyq\u002Fv\u002Fv4.x\u002Fcommands\u002Fshell-completion)\n- [Reduce](https:\u002F\u002Fmikefarah.gitbook.io\u002Fyq\u002Foperators\u002Freduce) to merge multiple files or sum an array or other fancy things.\n- [Github Action](https:\u002F\u002Fmikefarah.gitbook.io\u002Fyq\u002Fusage\u002Fgithub-action) to use in your automated pipeline (thanks @devorbitus)\n\n## [Usage](https:\u002F\u002Fmikefarah.gitbook.io\u002Fyq\u002F)\n\nCheck out the [documentation](https:\u002F\u002Fmikefarah.gitbook.io\u002Fyq\u002F) for more detailed and advanced usage.\n\n```\nUsage:\n  yq [flags]\n  yq [command]\n\nExamples:\n\n# yq tries to auto-detect the file format based off the extension, and defaults to YAML if it's unknown (or piping through STDIN)\n# Use the '-p\u002F--input-format' flag to specify a format type.\ncat file.xml | yq -p xml\n\n# read the \"stuff\" node from \"myfile.yml\"\nyq '.stuff' \u003C myfile.yml\n\n# update myfile.yml in place\nyq -i '.stuff = \"foo\"' myfile.yml\n\n# print contents of sample.json as idiomatic YAML\nyq -P -oy sample.json\n\n\nAvailable Commands:\n  completion  Generate the autocompletion script for the specified shell\n  eval        (default) Apply the expression to each document in each yaml file in sequence\n  eval-all    Loads _all_ yaml documents of _all_ yaml files and runs expression once\n  help        Help about any command\n\nFlags:\n  -C, --colors                          force print with colors\n      --csv-auto-parse                  parse CSV YAML\u002FJSON values (default true)\n      --csv-separator char              CSV Separator character (default ,)\n      --debug-node-info                 debug node info\n  -e, --exit-status                     set exit status if there are no matches or null or false is returned\n      --expression string               forcibly set the expression argument. Useful when yq argument detection thinks your expression is a file.\n      --from-file string                Load expression from specified file.\n  -f, --front-matter string             (extract|process) first input as yaml front-matter. Extract will pull out the yaml content, process will run the expression against the yaml content, leaving the remaining data intact\n      --header-preprocess               Slurp any header comments and separators before processing expression. (default true)\n  -h, --help                            help for yq\n  -I, --indent int                      sets indent level for output (default 2)\n  -i, --inplace                         update the file in place of first file given.\n  -p, --input-format string             [auto|a|yaml|y|json|j|kyaml|ky|props|p|csv|c|tsv|t|xml|x|base64|uri|toml|hcl|h|lua|l|ini|i] parse format for input. (default \"auto\")\n      --lua-globals                     output keys as top-level global variables\n      --lua-prefix string               prefix (default \"return \")\n      --lua-suffix string               suffix (default \";\\n\")\n      --lua-unquoted                    output unquoted string keys (e.g. {foo=\"bar\"})\n  -M, --no-colors                       force print with no colors\n  -N, --no-doc                          Don't print document separators (---)\n  -0, --nul-output                      Use NUL char to separate values. If unwrap scalar is also set, fail if unwrapped scalar contains NUL char.\n  -n, --null-input                      Don't read input, simply evaluate the expression given. Useful for creating docs from scratch.\n  -o, --output-format string            [auto|a|yaml|y|json|j|kyaml|ky|props|p|csv|c|tsv|t|xml|x|base64|uri|toml|hcl|h|shell|s|lua|l|ini|i] output format type. (default \"auto\")\n  -P, --prettyPrint                     pretty print, shorthand for '... style = \"\"'\n      --properties-array-brackets       use [x] in array paths (e.g. for SpringBoot)\n      --properties-separator string     separator to use between keys and values (default \" = \")\n      --security-disable-env-ops        Disable env related operations.\n      --security-disable-file-ops       Disable file related operations (e.g. load)\n      --shell-key-separator string      separator for shell variable key paths (default \"_\")\n  -s, --split-exp string                print each result (or doc) into a file named (exp). [exp] argument must return a string. You can use $index in the expression as the result counter. The necessary directories will be created.\n      --split-exp-file string           Use a file to specify the split-exp expression.\n      --string-interpolation            Toggles strings interpolation of \\(exp) (default true)\n      --tsv-auto-parse                  parse TSV YAML\u002FJSON values (default true)\n  -r, --unwrapScalar                    unwrap scalar, print the value with no quotes, colors or comments. Defaults to true for yaml (default true)\n  -v, --verbose                         verbose mode\n  -V, --version                         Print version information and quit\n      --xml-attribute-prefix string     prefix for xml attributes (default \"+@\")\n      --xml-content-name string         name for xml content (if no attribute name is present). (default \"+content\")\n      --xml-directive-name string       name for xml directives (e.g. \u003C!DOCTYPE thing cat>) (default \"+directive\")\n      --xml-keep-namespace              enables keeping namespace after parsing attributes (default true)\n      --xml-proc-inst-prefix string     prefix for xml processing instructions (e.g. \u003C?xml version=\"1\"?>) (default \"+p_\")\n      --xml-raw-token                   enables using RawToken method instead Token. Commonly disables namespace translations. See https:\u002F\u002Fpkg.go.dev\u002Fencoding\u002Fxml#Decoder.RawToken for details. (default true)\n      --xml-skip-directives             skip over directives (e.g. \u003C!DOCTYPE thing cat>)\n      --xml-skip-proc-inst              skip over process instructions (e.g. \u003C?xml version=\"1\"?>)\n      --xml-strict-mode                 enables strict parsing of XML. See https:\u002F\u002Fpkg.go.dev\u002Fencoding\u002Fxml for more details.\n      --yaml-fix-merge-anchor-to-spec   Fix merge anchor to match YAML spec. Will default to true in late 2025\n\nUse \"yq [command] --help\" for more information about a command.\n```\n\n## Troubleshooting\n\n### Common Issues\n\n**PowerShell quoting issues:**\n```powershell\n# Use single quotes for expressions\nyq '.a.b[0].c' file.yaml\n\n# Or escape double quotes\nyq \".a.b[0].c = \\\"value\\\"\" file.yaml\n```\n\n### Getting Help\n\n- **Check existing issues**: [GitHub Issues](https:\u002F\u002Fgithub.com\u002Fmikefarah\u002Fyq\u002Fissues)\n- **Ask questions**: [GitHub Discussions](https:\u002F\u002Fgithub.com\u002Fmikefarah\u002Fyq\u002Fdiscussions)\n- **Documentation**: [Complete documentation](https:\u002F\u002Fmikefarah.gitbook.io\u002Fyq\u002F)\n- **Examples**: [Recipes and examples](https:\u002F\u002Fmikefarah.gitbook.io\u002Fyq\u002Frecipes)\n\n## Known Issues \u002F Missing Features\n- `yq` attempts to preserve comment positions and whitespace as much as possible, but it does not handle all scenarios (see https:\u002F\u002Fgithub.com\u002Fgo-yaml\u002Fyaml\u002Ftree\u002Fv3 for details)\n- Powershell has its own...[opinions on quoting yq](https:\u002F\u002Fmikefarah.gitbook.io\u002Fyq\u002Fusage\u002Ftips-and-tricks#quotes-in-windows-powershell)\n- \"yes\", \"no\" were dropped as boolean values in the yaml 1.2 standard - which is the standard yq assumes.\n\nSee [tips and tricks](https:\u002F\u002Fmikefarah.gitbook.io\u002Fyq\u002Fusage\u002Ftips-and-tricks) for more common problems and solutions.\n","yq 是一个轻量级且便携的命令行工具，用于处理 YAML、JSON、XML、CSV、TOML、HCL 和属性文件。它使用类似于 jq 的语法，支持常见的数据操作如读取、更新和转换。yq 由 Go 语言编写，因此可以轻松下载无依赖的二进制文件并在各种平台上运行。此外，它还支持通过包管理器、Docker 和 Podman 进行安装。yq 适用于需要快速处理配置文件的开发运维场景，特别是在自动化脚本和持续集成\u002F持续部署（CI\u002FCD）管道中，能够高效地进行数据提取、修改和格式转换。",2,"2026-06-11 03:01:17","top_language"]