jq README

The project's README from github.com/jqlang/jq. As one markdown file: README.md.

jq

jq is a lightweight and flexible command-line JSON processor akin to sed,awk,grep, and friends for JSON data. It's written in portable C and has zero runtime dependencies, allowing you to easily slice, filter, map, and transform structured data.

Documentation

Installation

Prebuilt Binaries

Download the latest releases from the GitHub release page.

Docker Image

Pull the jq image to start quickly with Docker.

Run with Docker

Example: Extracting the version from a package.json file
docker run --rm -i ghcr.io/jqlang/jq:latest < package.json '.version'
Example: Extracting the version from a package.json file with a mounted volume
docker run --rm -i -v "$PWD:$PWD" -w "$PWD" ghcr.io/jqlang/jq:latest '.version' package.json

Building from source

Dependencies

Instructions

git submodule update --init    # if building from git to get oniguruma
autoreconf -i                  # if building from git
./configure --with-oniguruma=builtin
make clean                     # if upgrading from a version previously built from source
make -j8
make check
sudo make install

Build a statically linked version:

make LDFLAGS=-all-static

If you're not using the latest git version but instead building a released tarball (available on the release page), skip the autoreconf step, and flex or bison won't be needed.

Cross-Compilation

For details on cross-compilation, check out the GitHub Actions file and the cross-compilation wiki page.

Community & Support

License

jq is released under the MIT License. jq's documentation is licensed under the Creative Commons CC BY 3.0. jq uses parts of the open source C library "decNumber", which is distributed under ICU License

jq (jqlang/jq)

Searching Database…

35.8K ·GitHub
What is this?jq is a lightweight command-line JSON processor, akin to sed, awk and grep but for JSON data: it slices, filters, maps and transforms structured data right in your terminal.
So is it a separate tool I run, or a library I import into my code?A standalone command-line tool, not a library. It is written in portable C with zero runtime dependencies, so you just run it against any JSON.
How do I get it installed?Grab a prebuilt binary from the GitHub releases page, pull the jq Docker image, or build from source with the usual autotools flow (autoreconf, configure, make).
Do I need anything else installed for it to work?Nothing at runtime — the binaries have zero dependencies. Building from source needs libtool, make, automake and autoconf.
Any pitfalls when building from source?One: if you build a released tarball instead of the latest git version, skip the autoreconf step — and flex or bison won't be needed either.
Which platforms does it run on?Linux, macOS and Windows, with prebuilt binaries on the release page. A Docker image is also available, and cross-compilation is documented for other targets.
Can I try jq without installing anything?Yes — play.jqlang.org is the official online playground, and the full documentation lives at jqlang.org.
Is the project still actively maintained?Yes — releases land on the GitHub release page, CI workflows run on the repo, and there is an active community on Discord and the Stack Overflow jq tag.
What are similar projects?fq, fx, fastfetch, miller, difftastic, mas, cloc, tig
Creator
jqlang
Size
8 MB
Stars
35.8K
Age
14y
Commits · 90 Days