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

You Might Also Like
Gen AI apps are built with MongoDB Atlas Icon
Gen AI apps are built with MongoDB Atlas

The database for AI-powered applications.

MongoDB Atlas is the developer-friendly database used to build, scale, and run gen AI and LLM-powered apps—without needing a separate vector database. Atlas offers built-in vector search, global availability across 115+ regions, and flexible document modeling. Start building AI apps faster, all in one place.
Start 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