🍺 BREW Explorer

← all formulae

gojq

brew install gojq v0.12.19 MIT

Pure Go implementation of jq

49
30-day installs · #4740
314
90-day · #3466
825
365-day · #4146
3.8k
★ GitHub stars · updated 2mo ago

Build dependencies

go

GitHub topics

cli-tool cli-utility go golang json

Links

Raw metadata
{
  "aliases": [],
  "alternatives": [],
  "build_dependencies": [
    "go"
  ],
  "categories": [],
  "caveats": null,
  "conflicts_with": [],
  "dependencies": [],
  "deprecated": 0,
  "deprecation_reason": null,
  "desc": "Pure Go implementation of jq",
  "disable_reason": null,
  "disabled": 0,
  "enrichment_fetched_at": "2026-06-20T23:38:17+00:00",
  "first_seen": "2026-06-20T23:34:18+00:00",
  "full_name": "gojq",
  "github_default_branch": "main",
  "github_last_commit_at": "2026-06-12T14:14:46Z",
  "github_readme_excerpt": "# gojq\n[![CI Status](https://github.com/itchyny/gojq/actions/workflows/ci.yaml/badge.svg?branch=main)](https://github.com/itchyny/gojq/actions?query=branch:main)\n[![Go Report Card](https://goreportcard.com/badge/github.com/itchyny/gojq)](https://goreportcard.com/report/github.com/itchyny/gojq)\n[![MIT License](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/itchyny/gojq/blob/main/LICENSE)\n[![release](https://img.shields.io/github/release/itchyny/gojq/all.svg)](https://github.com/itchyny/gojq/releases)\n[![pkg.go.dev](https://pkg.go.dev/badge/github.com/itchyny/gojq)](https://pkg.go.dev/github.com/itchyny/gojq)\n\n### Pure Go implementation of [jq](https://github.com/jqlang/jq)\nThis is an implementation of jq command written in Go language.\nYou can also embed gojq as a library to your Go products.\n\n## Usage\n```sh\n $ echo \u0027{\"foo\": 128}\u0027 | gojq \u0027.foo\u0027\n128\n $ echo \u0027{\"a\": {\"b\": 42}}\u0027 | gojq \u0027.a.b\u0027\n42\n $ echo \u0027{\"id\": \"sample\", \"10\": {\"b\": 42}}\u0027 | gojq \u0027{(.id): .[\"10\"].b}\u0027\n{\n  \"sample\": 42\n}\n $ echo \u0027[{\"id\":1},{\"id\":2},{\"id\":3}]\u0027 | gojq \u0027.[] | .id\u0027\n1\n2\n3\n $ echo \u0027{\"a\":1,\"b\":2}\u0027 | gojq \u0027.a += 1 | .b *= 2\u0027\n{\n  \"a\": 2,\n  \"b\": 4\n}\n $ echo \u0027{\"a\":1} [2] 3\u0027 | gojq \u0027. as {$a} ?// [$a] ?// $a | $a\u0027\n1\n2\n3\n $ echo \u0027{\"foo\": 4722366482869645213696}\u0027 | gojq .foo\n4722366482869645213696  # keeps the precision of large numbers\n $ gojq -n \u0027def fact($n): if $n \u003c 1 then 1 else $n * fact($n - 1) end; fact(50)\u0027\n30414093201713378043612608166064768844377641568960512000000000000 # arbitrary-precision integer calculation\n```\n\nNice error messages.\n```sh\n $ echo \u0027[1,2,3]\u0027 | gojq \u0027.foo \u0026 .bar\u0027\ngojq: invalid query: .foo \u0026 .bar\n    .foo \u0026 .bar\n         ^  unexpected token \"\u0026\"\n $ echo \u0027{\"foo\": { bar: [] } }\u0027 | gojq \u0027.\u0027\ngojq: invalid json: \u003cstdin\u003e\n    {\"foo\": { bar: [] } }\n              ^  invalid character \u0027b\u0027 looking for beginning of object key string\n```\n\n## Installation\n### Homebrew\n```sh\nbrew install gojq\n```\n\n### mise\n```sh\nmise use -g gojq@latest\n```\n\n### Zero Install\n```sh\n0inst",
  "github_repo": "itchyny/gojq",
  "github_stars": 3766,
  "github_topics": [
    "cli-tool",
    "cli-utility",
    "go",
    "golang",
    "json"
  ],
  "homepage": "https://github.com/itchyny/gojq",
  "homepage_og_description": null,
  "homepage_og_image": null,
  "homepage_title": null,
  "installs_30d": 49,
  "installs_365d": 825,
  "installs_90d": 314,
  "keg_only": 0,
  "keg_only_reason": null,
  "last_seen": "2026-06-20T23:34:18+00:00",
  "license": "MIT",
  "llm_generated_at": null,
  "llm_model": null,
  "name": "gojq",
  "oldnames": [],
  "one_liner": null,
  "optional_dependencies": [],
  "rank_30d": 4740,
  "rank_365d": 4146,
  "rank_90d": 3466,
  "raw_hash": "0405ddc434b731df",
  "recommended_dependencies": [],
  "revision": 0,
  "ruby_source_path": "Formula/g/gojq.rb",
  "tap": "homebrew/core",
  "test_dependencies": [],
  "uses_from_macos": [],
  "version_head": "HEAD",
  "version_stable": "0.12.19",
  "versioned_formulae": [],
  "why_use_this": null
}