# Install gojq with Homebrew, apk, apt, dnf, MacPorts, Nix, zypper

Pure Go implementation of jq. Version 0.12.19 via Homebrew; verified from local package data.

## Install

```sh
sudo av install brew:gojq
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install gojq
```

  Evidence: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install gojq
```

  Evidence: MacPorts ports tree: textproc/gojq/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- apk (92%):

```sh
sudo apk add gojq
```

  Evidence: Alpine Linux edge package indexes: gojq from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz

- Debian apt (92%):

```sh
sudo apt install gojq
```

  Evidence: Debian stable package indexes: gojq from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

- dnf (92%):

```sh
sudo dnf install gojq
```

  Evidence: Fedora Rawhide package metadata: gojq from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst

- Nix (92%):

```sh
nix profile install nixpkgs#gojq
```

  Evidence: nixpkgs package indexes: pkgs/by-name/go/gojq/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

- zypper (92%):

```sh
sudo zypper install gojq
```

  Evidence: openSUSE Tumbleweed package metadata: gojq from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst

## Package facts

- **Package key:** brew:gojq
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/gojq>
- **Version:** 0.12.19
- **Source summary:** Pure Go implementation of jq
- **Homepage:** <https://github.com/itchyny/gojq>
- **Repository:** <https://github.com/itchyny/gojq>
- **Upstream docs:** <https://github.com/itchyny/gojq#readme>
- **License:** MIT
- **Source archive:** <https://github.com/itchyny/gojq.git>
- **Generated:** 2026-07-08T07:18:31+00:00

## Executables

- gojq (cli)
- gojq (alias)

## Build dependencies

- go

## Install behavior

- Post-install hook: not defined
- Bottle: available on arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## Freshness

- Page generated: 2026-07-08
- Package-manager version: 0.12.19
- Local data: ok
- Upstream repository: https://github.com/itchyny/gojq
- info: No package-manager update timestamp was available.
- info: No cached GitHub release or tag data was available.
## Project history and usage

gojq is a pure Go implementation of jq, the JSON query language and command-line processor. It can run as a command and can also be embedded as a Go library.

The project is valuable where jq compatibility is wanted without C-library and regex-library build dependencies, or where Go programs want an in-process jq-like query engine.

### Project history

The repository began in April 2019 with commits implementing the parser, runner, and CLI. The README frames the project as a jq implementation written in Go and documents both command usage and library APIs.

The release stream moved quickly through 0.x versions in 2019 and 2020, with v0.12.0 appearing in December 2020. Subsequent v0.12 patch releases continued the long maintenance line.

### Adoption history

gojq's package-manager adoption follows its portability story. The input package facts list apk, Homebrew, Debian, dnf, MacPorts, Nix, Ubuntu, and zypper packages, which fits a small CLI used across many Unix-like systems.

The README advertises installation through Homebrew, mise, Zero Install, go install, and Docker images. That broad install surface reflects both command-line use and reproducible automation contexts.

### How it is used

At the command line, gojq reads JSON and applies jq filters such as .foo, .a.b, object construction, updates, and pipelines. The README highlights useful differences including arbitrary-precision integer calculations, YAML input/output options, and detailed error positions.

As a library, callers parse a query with gojq.Parse, run it against values decoded into []any or map[string]any, and iterate over results. Compile options cover module loading, environment loading, variables, custom functions, and input iterators.

### Why package nerds care

gojq is significant because it ports one of the most package-manager-loved Unix data tools into a single Go build. That makes static or cross-platform distribution easier than the C jq stack in many environments.

It also exposes the tension in compatibility implementations: the README documents intentional differences from jq, including map ordering, unsupported flags, regex-engine differences, YAML support, and arbitrary-precision integers.

### Timeline

- 2019: Repository starts with parser, runner, and CLI implementation commits.
- 2019: v0.0.1 and v0.1.0 tags appear in April and May.
- 2020: v0.12.0 tag appears in December after rapid 0.x development.
- 2024: v0.12.17 tag appears in the continuing v0.12 maintenance series.

### Related projects

- jq is the original command and language that gojq implements.
- The Go standard library's encoding/json is relevant because gojq's library API expects generic decoded JSON-like Go values.
- mise and Docker are documented installation surfaces alongside package-manager installs.

### Sources

- <https://github.com/itchyny/gojq>
- <https://github.com/itchyny/gojq#readme>
- <https://pkg.go.dev/github.com/itchyny/gojq>


## Security Notes

narrow executable package without higher-risk signals.

- **Geiger risk:** green / low
- narrow executable package without higher-risk signals

## Source Database Details

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** gojq
- **Version Scheme:** 0
- **Revision:** 0
- **Head Version:** HEAD
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** head, stable

## Other Package-Manager Records

- Debian apt - gojq - 0.12.13-1: normalized package name match | Debian stable package indexes: gojq from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | pure Go implementation of jq (program) | https://github.com/itchyny/gojq
- Debian apt - golang-github-itchyny-gojq-dev - 0.12.13-1: normalized package name match | Debian stable package indexes: golang-github-itchyny-gojq-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | pure Go implementation of jq (library) | https://github.com/itchyny/gojq
- Nix - gojq: normalized package name match | nixpkgs package indexes: pkgs/by-name/go/gojq/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - gojq - 0.12.13-1: normalized package name match | Ubuntu 24.04 LTS package indexes: gojq from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | pure Go implementation of jq (program) | https://github.com/itchyny/gojq
- Ubuntu apt - golang-github-itchyny-gojq-dev - 0.12.13-1: normalized package name match | Ubuntu 24.04 LTS package indexes: golang-github-itchyny-gojq-dev from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | pure Go implementation of jq (library) | https://github.com/itchyny/gojq
- apk - gojq - 0.12.19-r2: normalized package name match | Alpine Linux edge package indexes: gojq from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Pure Go implementation of jq | https://github.com/itchyny/gojq
- apk - gojq-zsh-completion - 0.12.19-r2: normalized package name match | Alpine Linux edge package indexes: gojq-zsh-completion from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Zsh completions for gojq | https://github.com/itchyny/gojq
- dnf - gojq - 0.12.19-2.fc45: normalized package name match | Fedora Rawhide package metadata: gojq from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | Pure Go implementation of jq | https://github.com/itchyny/gojq
- zypper - gojq - 0.12.19-1.2: normalized package name match | openSUSE Tumbleweed package metadata: gojq from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst | Pure Go implementation of jq | https://github.com/itchyny/gojq
- MacPorts - gojq: normalized package name match | MacPorts ports tree: textproc/gojq/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1


## Related links

- [Source-control packages](https://www.automicvault.com/pkg/source-control-tools/) - Belongs to a source-control command family.
- [Terminal utility packages](https://www.automicvault.com/pkg/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Text processing packages](https://www.automicvault.com/pkg/text-processing-tools/) - Matched text, document, or structured-data processing metadata.
- [Developer build packages](https://www.automicvault.com/pkg/developer-build-tools/) - Matched build, compiler, generator, or developer workflow metadata.
- [go](https://www.automicvault.com/pkg/brew/go/) - Build dependency declared by Homebrew.
- [jaq](https://www.automicvault.com/pkg/brew/jaq/) - Shares av.db curated category or tags: cli, developer-tools, jq, json, query-language.
- [jnv](https://www.automicvault.com/pkg/brew/jnv/) - Shares av.db curated category or tags: cli, developer-tools, jq, json.
- [fracturedjson](https://www.automicvault.com/pkg/brew/fracturedjson/) - Shares av.db curated category or tags: cli, developer-tools, json.
- [gron](https://www.automicvault.com/pkg/brew/gron/) - Shares av.db curated category or tags: cli, developer-tools, json.
- [jid](https://www.automicvault.com/pkg/brew/jid/) - Shares av.db curated category or tags: cli, developer-tools, json.
- [jo](https://www.automicvault.com/pkg/brew/jo/) - Shares av.db curated category or tags: cli, developer-tools, json.
- [json-glib](https://www.automicvault.com/pkg/brew/json-glib/) - Shares av.db curated category or tags: cli, developer-tools, json.
- [sbjson](https://www.automicvault.com/pkg/brew/sbjson/) - Shares av.db curated category or tags: cli, developer-tools, json.
- [jql](https://www.automicvault.com/pkg/brew/jql/) - Both packages work with overlapping file formats or content types. Shared terms: cli, developer, developer-tools, json, language.

## Combined YAML source

View the package source record on GitHub. [combined/gojq.yml](https://github.com/automic-vault/db/blob/main/combined/gojq.yml)


## Sources

- Nucleus package database
- Geiger risk classifier
- package-page enrichment
- curated package history
- package version freshness
- av.db category and tag curation
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
