{"id":16148193,"url":"https://github.com/chanwit/xq","last_synced_at":"2025-06-12T01:04:38.096Z","repository":{"id":66507688,"uuid":"244920096","full_name":"chanwit/xq","owner":"chanwit","description":"Any Configuration Processor","archived":false,"fork":false,"pushed_at":"2020-03-07T13:15:30.000Z","size":64,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-06-12T01:04:01.841Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Groovy","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chanwit.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-03-04T14:22:37.000Z","updated_at":"2020-03-07T23:23:19.000Z","dependencies_parsed_at":"2023-02-22T13:31:08.649Z","dependency_job_id":null,"html_url":"https://github.com/chanwit/xq","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/chanwit/xq","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chanwit%2Fxq","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chanwit%2Fxq/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chanwit%2Fxq/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chanwit%2Fxq/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chanwit","download_url":"https://codeload.github.com/chanwit/xq/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chanwit%2Fxq/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259374727,"owners_count":22847854,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-10T00:31:40.601Z","updated_at":"2025-06-12T01:04:38.062Z","avatar_url":"https://github.com/chanwit.png","language":"Groovy","funding_links":[],"categories":[],"sub_categories":[],"readme":"xq - Any Configuration Processor\n================================\n\n`xq` aims to be a processor for any configuration format. Currently, `xq` supports JSON (`--json`), YAML (`--yaml`), and line-by-line text processing `--line`.\n\n`xq` is generally slower than other processors, like `jq`, because it comes with a full programming language support. So `xq` can solve many limitations we might face when using other processors.\n\nExamples\n========\n\nHere's the `data.json` used as our examples.\n```\n{\n    \"apiVersion\": \"v1\",\n    \"kind\": \"Example\",\n    \"spec\": {\n        \"containers\": [\n            {\n                \"commands\": [\n                    \"kube-proxy\",\n                    \"--v=2\"\n                ]\n            }\n        ]\n    }\n}\n```\n\n### Get field `kind`\n\n`$ cat data.json | xq --json '.kind' -o raw` \n\n### Generate text wth template\n\n`$ cat data.json | xq --json '.with{\"apiVersion=${apiVersion}\\nkind=${kind}\\n\"}' -o raw`\n\n### Convert JSON to YAML\n\n`$ cat data.json | xq --json '' -o yaml`\n\n### Inplace edit and output as YAML\n\n`$ cat data.json | xq --json '.tap{spec.containers[0].commands[1]=\"--v=4\"}' -o yaml`\n\n### Line replace with regexp\n\n`$ cat data.json | xq --line '.replace(/kube-proxy/, \"k8s-proxy\")'`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchanwit%2Fxq","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchanwit%2Fxq","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchanwit%2Fxq/lists"}