MiSawa / xq

Pure rust implementation of jq
MIT License
333 stars 18 forks source link

CI crates.io

XQ

JQ reimplemented purely in Rust.

Caution

This program is under development. You probably want to use the original implementation of jq, or pure Go implementation of it called gojq built by itchyny instead, or another Rust implementation called jaq.

Current state

Goals

Ideas

Install and run

Are you sure you want to use this??? It's not a daily-usable stage. Though if you want to try, you can install it via

$ cargo install xq
$ cat whatever.json | xq 'query goes here'

. If you'd rather want to download a pre-built binary, either download it manually from the latest release, or use cargo-binstall. Either way, the license texts of the dependencies are in about.html file in the downloaded archive.

You can also clone this repository to your local and run

$ cargo install --path path-to-cloned-dir
$ cat whatever.json | xq 'query goes here'

. Alternatively,

$ cat whatever.json | cargo run -- 'query goes here'

in the cloned directory to try out them without installing.

Uninstall

$ cargo uninstall xq

if you've installed via cargo install. Also remove the cloned directory if you've cloned the repository.

Publish new version

Note for myself.

$ git switch master                 # make sure you're on the master branch
$ cargo release patch               # to dry-run the release
$ cargo release patch --execute     # to actually execute the release

Pass --workspace to publish workspace members as well.

Acknowledgements

Credits

Author

Mi_Sawa

LICENSE

MIT. Please refer to LICENSE file.