yq is a portable and lightweight command-line YAML processor. It can be likened to projects like jq (a command-line JSON processor) or sed but for YAML files. yq is able to do quite a number of things. It can deep read a YAML file with a given path expression, deeply compare YAML files, update a YAML file given a path expression or script file, and so much more. It can also merge several YAML files while offering plenty of options for overriding and appending.

yq is written in portable Go, allowing you to download a binary that's free of dependencies.

Features

  • Written in portable Go
  • Output colorization
  • YAML file deep reading with a given path expression
  • List matching paths of a given path expression
  • Returning the lengths of arrays/object/scalars
  • YAML file updating with a path expression or script file
  • Creates any missing entries in the path on the fly
  • Deeply compares YAML files
  • Retains YAML formatting and comments during updates
  • Validates YAML files
  • Creates YAML file with a deep path and value or a script file
  • Prefixes a path to a YAML file
  • JSON to/from YAML conversion
  • Pipe data in by using '-'
  • Merge several YAML files with various options for overriding and appending
  • Supports multiple documents in a single YAML file for reading, writing and merging
  • General shell completion scripts (bash/zsh/fish/powershell)

Project Samples

Project Activity

See All Activity >

License

MIT License

Follow yq

yq Web Site

Other Useful Business Software
AI-generated apps that pass security review Icon
AI-generated apps that pass security review

Stop waiting on engineering. Build production-ready internal tools with AI—on your company data, in your cloud.

Retool lets you generate dashboards, admin panels, and workflows directly on your data. Type something like “Build me a revenue dashboard on my Stripe data” and get a working app with security, permissions, and compliance built in from day one. Whether on our cloud or self-hosted, create the internal software your team needs without compromising enterprise standards or control.
Try Retool free
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of yq!

Additional Project Details

Operating Systems

BSD, Linux, Mac, Windows

Programming Language

Go

Related Categories

Go Software Development Software

Registered

2020-11-11