# gojq を Homebrew, apk, apt, dnf, MacPorts, Nix, zypper でインストール

gojq のインストール経路、実行ファイル、メタデータ、AI エージェント向けセキュリティノートを確認します。

## インストール

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

追加のインストールコマンド:

### macOS

- Homebrew (100%):

```sh
brew install gojq
```

  証拠: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install gojq
```

  証拠: 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
```

  証拠: 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
```

  証拠: 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
```

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

- Nix (92%):

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

  証拠: 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
```

  証拠: openSUSE Tumbleweed package metadata: gojq from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst

## パッケージ情報

- **パッケージキー:** brew:gojq
- **パッケージマネージャ:** Homebrew
- **バージョン:** 0.12.19
- **ソース概要:** Pure Go implementation of jq
- **ホームページ:** <https://github.com/itchyny/gojq>
- **リポジトリ:** <https://github.com/itchyny/gojq>
- **最終更新:** 2026-07-29T16:05:04+02:00
- **生成日時:** 2026-08-03T19:37:03+00:00

## 実行可能ファイル

- gojq (エイリアス)

## インストール挙動

- Bottle: 利用不可

## バージョンと鮮度

- ページ生成日: 2026-08-03
- マネージャ版: 0.12.19
## プロジェクトの歴史と使われ方

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.

### プロジェクトの歴史

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.

### 採用の歴史

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.

### 使われ方

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.

### パッケージ好きにとっての重要性

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.

### タイムライン

- 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.

### ソース

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


## セキュリティノート

narrow executable package without higher-risk signals.

- **Geiger リスク:** グリーン / 低
- narrow executable package without higher-risk signals

## 他のパッケージマネージャ記録

- 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-r3: 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-r3: 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/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | Pure Go implementation of jq | https://github.com/itchyny/gojq
- zypper - gojq - 0.12.19-1.5: normalized package name match | openSUSE Tumbleweed package metadata: gojq from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-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


## Combined YAML source

View the package source record on GitHub. [combined/gojq.yml](https://github.com/mxcl/pkgdb/blob/main/combined/gojq.yml)


## ソース

- pkg.so package database
- Geiger risk classifier
- curated package history
- pkgdb category and tag curation
- external package-manager database matches
- cross-ecosystem install command graph
