Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rwxrob/yq
🌳 Query YAML Data
https://github.com/rwxrob/yq
bonzai configuration go golang query structured-data yaml yq
Last synced: 12 days ago
JSON representation
🌳 Query YAML Data
- Host: GitHub
- URL: https://github.com/rwxrob/yq
- Owner: rwxrob
- License: apache-2.0
- Created: 2022-03-28T14:36:43.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-11-17T17:54:24.000Z (almost 2 years ago)
- Last Synced: 2024-10-11T01:38:24.110Z (26 days ago)
- Topics: bonzai, configuration, go, golang, query, structured-data, yaml, yq
- Language: Go
- Homepage:
- Size: 55.7 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# 🌳 Query YAML Data
[![GoDoc](https://godoc.org/github.com/rwxrob/yq?status.svg)](https://godoc.org/github.com/rwxrob/yq)
[![License](https://img.shields.io/badge/license-Apache2-brightgreen.svg)](LICENSE)This is the same popular `yq` tool (written in Go) that uses the same
`yqlib` code but as a [Bonzai](https://github.com/rwxrob/bonzai)
composite command (instead of Cobra) making it more portable and usable
in one's own Bonzai command tree monoliths and multicall binaries along
with other commands. It includes simplified `Evaluate` and
`EvaluateToString` high-level functions calling into the `yqlib`
with reasonable defaults allowing other non-Bonzai applications to
easily duplicate the same functionality.## Install
This command can be installed as a standalone program or composed into
a Bonzai command tree.Standalone
```
go install github.com/rwxrob/yq/cmd/yq@latest
```Composed
```go
package zimport (
Z "github.com/rwxrob/bonzai/z"
"github.com/rwxrob/yq"
)var Cmd = &Z.Cmd{
Name: `cmds`,
Commands: []*Z.Cmd{help.Cmd, yq.Cmd},
}
```## Tab Completion
To activate bash completion just use the `complete -C` option from your
`.bashrc` or command line. There is no messy sourcing required. All the
completion is done by the program itself.```
complete -C yq yq
```If you don't have bash or tab completion check use the shortcut
commands instead.## Embedded Documentation
All documentation (like manual pages) has been embedded into the source
code of the application. See the source or run the program with help to
access it.