Hacker GitHub

← All repos

mikefarah/yq

View on GitHub ↗ ★ 16,215 Go

yq is a portable command-line YAML, JSON, XML, CSV, TOML, HCL and properties processor

33 mentions on Hacker News by 27 people: 4 stories, 29 comments · first 2019-10-28 · latest 2026-04-27

Mentions per year 33 mentions · busiest year 2022 (10)
20082026
  1. csvkit ( https://github.com/wireservice/csvkit ) has a "csvlook" command, and yq ( https://github.com/mikefarah/yq ) supports CSV as an input format.
  2. doesnt yq already do this? https://github.com/mikefarah/yq
  3. …I'm using jq and need a quick and easy performance boost. [1] https://github.com/01mf02/jaq [2] https://github.com/mikefarah/yq
  4. Just in case you didn't know: With https://github.com/mikefarah/yq you can just immediately translate YAMLs like yq some.yaml -o json
    comment by couscouspie · 2024-12-08 · in JSON5 – JSON for Humans
  5. The “go” yq https://github.com/mikefarah/yq | yq is a portable command-line YAML, JSON, XML, CSV, TOML and properties processor
  6. What I often use to just get the full key paths is yq ( https://github.com/mikefarah/yq ), piping into grep when necessary yq -o=props <file> e.g. kind = Ingress metadata.name = hello spec.rules.0.host = localhost…
  7. https://github.com/mikefarah/yq Yq handles almost every format, and IMO easier to use.
    comment by mutant · 2024-03-23 · in DuckDB as the New jq
  8. Really? What's wrong with https://github.com/mikefarah/yq ? Works quite fine.
    comment by pdimitar · 2024-03-02 · in K8s Service Meshes: The Bill Comes Due
  9. …all the platforms and architectures, even future targets go run mvdan.cc/sh/v3/cmd/gosh@latest -c ' go run github.com/mikefarah/yq/v3@latest n foo.bar.hello world | go run github.com/cezarsa/glolcat@latest'
    comment by moondev · 2024-02-21 · in Go run
  10. …3 and 4 to be more like jq (but not quite the same for some reason) - yq has no if-then-else https://github.com/mikefarah/yq/issues/95 which is a poor design (or omission) in my opinion So yq works when you need to process YAML, it can…
  11. Which yq? I prefer https://github.com/mikefarah/yq to https://github.com/kislyuk/yq .
  12. …3.4.1 (Worth noting, the example uses an out of date yq, so a few modifictaions might be needed) https://github.com/mikefarah/yq
  13. For those pining for a similar yaml query tool for working through acres of config: https://github.com/mikefarah/yq jq is awesome and thanks to the new team for their recent efforts and energy, it massively appreciated.
    comment by ed_blackburn · 2023-10-02 · in jq 1.7
  14. …[1], another way is to use `yq -j` or `yj` [2] to convert to JSON and pipe it to `gron` [3]. [1] https://github.com/mikefarah/yq [2] https://github.com/sclevine/yj [3] https://github.com/tomnomnom/gron
    comment by PhilippGille · 2023-09-28 · in That's a Lot of YAML
  15. …well it handles YAML corner cases or how many advanced features it's missing compared to jq. [0] https://github.com/mikefarah/yq
  16. …Or things like go run mvdan.cc/sh/v3/cmd/gosh@latest -c 'echo "cross platform shell"; go run github.com/mikefarah/yq/v3@latest r metadata.name <(kubectl get pod my-pod -o yaml)' Pretty awesome stuff, I'm always discovering new ways to use…
    comment by moondev · 2023-02-12 · in Shfmt – format shell programs
  17. ▲ 224
    yq: command-line YAML, JSON, XML, CSV and properties processor
    story by based2 · 2023-02-04 · 53 comments
  18. Also look at `yq` - https://github.com/mikefarah/yq This is a wrapper to jq that also supports yaml and other file formats.
  19. …attention to in the middle of the night with 2 hours left before traffic starts coming in. [0]: https://github.com/mikefarah/yq [1]: https://kustomize.io
    comment by Bayart · 2022-08-10 · in Falling for Kubernetes
  20. https://github.com/mikefarah/yq
  21. yq uses jq like syntax but works with YAML, JSON and XML. https://github.com/mikefarah/yq
  22. ▲ 4
    Yq – a lightweight and portable command-line YAML, JSON and XML processor
    story by tzury · 2022-04-12 · 0 comments
  23. you can now directly "go run" any import path go run github.com/mikefarah/yq/v3@3.4.1 It also works fine in shebang that expects input of script filepath at $1. For example "test.yaml" #!/usr/bin/env -S go run…
    comment by moondev · 2022-03-11 · in Scripting with Go
  24. …TOML and HCL support, but not CSV. It's certainly not because there's a lack of these tools :p [1]: https://github.com/mikefarah/yq [2]: https://github.com/sclevine/yj
  25. …* Awesome for scripting, no install step necessary For example, I like to use both yq 3.x and yq 4.x go run github.com/mikefarah/yq/v3@latest go run github.com/mikefarah/yq/v4@latest Disadvantages: * An index of "go runnable" cli programs…
    comment by moondev · 2022-03-01 · in Homebrew 3.4.0
  26. Thank you :-) You can use https://github.com/mikefarah/yq to convert yaml to json on the fly and pipe it into spyql. There’s an example in the Readme.
  27. …in milliseconds. [0] https://stackoverflow.com/a/1732454 [1] https://github.com/stedolan/jq [2] https://github.com/mikefarah/yq
    comment by cfors · 2022-01-14 · in Grep one-liners as CI tasks
  28. ▲ 5
    Yq: A portable command-line YAML processor
    story by thunderbong · 2021-08-24 · 0 comments
  29. …or `.array[]`. Yq [1] syntax for that is much better, and yq can accept JSON files too. [1] https://github.com/mikefarah/yq
    comment by kitd · 2020-07-01 · in Mastering Jq: Part 1
  30. Highly recommend https://github.com/mikefarah/yq It can do everything with json as well and convert between
    comment by moondev · 2020-03-19 · in Illustrated Jq Tutorial
  31. Personally I like https://github.com/mikefarah/yq It also converts between yaml and json with ease for writing and reading
  32. …increasing amount of yaml? Though there seems to be multiple competing tools by the same name... https://github.com/mikefarah/yq https://github.com/kislyuk/yq
  33. ▲ 6
    Yq is a portable command-line YAML processor
    story by alexellisuk · 2019-10-28 · 1 comment