# Install oj with Homebrew

JSON parser and visualization tool. Version 1.28.2 via Homebrew; verified 2026-07-06.

## Install

```sh
sudo av install brew:oj
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install oj
```

  Evidence: local Homebrew formula metadata

## Package facts

- **Package key:** brew:oj
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/oj>
- **Version:** 1.28.2
- **Source summary:** JSON parser and visualization tool
- **Homepage:** <https://github.com/ohler55/ojg>
- **Repository:** <https://github.com/ohler55/ojg>
- **Upstream docs:** <https://github.com/ohler55/ojg#readme>
- **License:** MIT
- **Source archive:** <https://github.com/ohler55/ojg/archive/refs/tags/v1.28.2.tar.gz>
- **Last updated:** 2026-07-06T04:50:51Z
- **Generated:** 2026-07-08T07:18:31+00:00

## Executables

- oj (cli)
- oj (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: 1.28.2
- Package-manager updated: 2026-07-06
- Local data: ok
- Upstream repository: https://github.com/ohler55/ojg
- Upstream latest detected: v1.28.2 (current)
## Project history and usage

The Homebrew `oj` package installs the `oj` command from OjG, short for Optimized JSON for Go. OjG is a Go JSON toolkit with a fast parser, validator, writer, JSONPath implementation, generic JSON data model, SEN parser, and command-line JSON filtering/visualization tool.

### Project history

OjG was created by Peter Ohler, author of the older Ruby `oj` gem and C `ojc` parser. The repository was created on 2020-04-12. Its design document says the project began from the idea of building a fast JSON parser, generic data model, and full JSONPath implementation for Go, informed by Ohler's earlier JSON parser work.

The project architecture split functionality into packages such as `oj` for parsing, `jp` for JSONPath, `gen` for generic JSON node types, `alt`, `asm`, `sen`, and later `discover`. The `oj` command wraps those libraries for shell use: filtering and extracting with JSONPath, sorting, reformatting, discovering JSON in documents, and colorizing output.

The changelog shows steady evolution after the early releases. Version 1.10.0 in 2021 added a tokenizing callback parser; later releases added path matching, match handlers, script function registration, JSON discovery, and compatibility fixes while keeping semantic versioning.

### Adoption history

OjG is niche but visible in Go JSON-performance circles. The GitHub API reported 950 stars and 53 forks, while Homebrew's 2026-07-01 formula API reported 194 installs over 365 days for the CLI package. Its appeal is strongest where developers want JSONPath over arbitrary JSON-like data or a command-line JSON filter with Go-native implementation details.

The README positions OjG against Go's standard `encoding/json` package through parser, reader, validator, and writer benchmarks, with benchmark links and a separate comparison repository. That performance framing is the main adoption hook.

### How it is used

Go developers import packages such as `github.com/ohler55/ojg/oj` for parsing and validation, `jp` for JSONPath expressions, and `gen` for type-safe generic data. CLI users install `github.com/ohler55/ojg/cmd/oj` or `brew install oj` to query and format JSON from files and streams.

The parser can process a single JSON document or multiple JSON elements, and options allow comments in JSON. The command-line tool uses JSONPath expressions for filtering, extraction, sorting, reformatting, discovery, and colorized output.

### Why package nerds care

The package is a good example of a name collision resolved by package-manager context: Homebrew's `oj` is not the older Ruby gem, but the Go command from OjG. Its upstream project still deliberately links the Go implementation to Ohler's Ruby `Oj` and C `OjC` lineage.

For maintainers, `oj` is a compact Go CLI package with no runtime dependencies in Homebrew, but it carries a rich upstream library surface. The formula's distinction between the CLI name `oj` and upstream module `ojg` is the kind of metadata wrinkle package nerds notice.

### Timeline

- 2020-04-12: the `ohler55/ojg` repository was created.
- 2021-04-22: version 1.10.0 added the tokenizing callback parser.
- 2023-10-03: version 1.19.4 updated the command version and referenced the Homebrew formula.
- 2025-11-11: version 1.27.0 added the `discover` package and discovery option to the `oj` application.
- 2026-03-16: version 1.28.1 removed an accidental Go 1.22 dependency in `alt.Checksum()`.
- 2026-07-01: Homebrew's formula API reported stable version 1.28.1 for `oj`.

### Related projects

- OjG is related to Ohler's Ruby `Oj`, C `OjC`, Ruby XML parser `Ox`, and web-server projects such as Agoo. It is also related to the IETF JSONPath work and to Go JSON parser comparison projects.

### Sources

- <https://api.github.com/repos/ohler55/ojg>
- <https://formulae.brew.sh/api/formula/oj.json>
- <https://github.com/ohler55/ojg>
- <https://pkg.go.dev/github.com/ohler55/ojg>
- <https://pkg.go.dev/github.com/ohler55/ojg/oj>
- <https://raw.githubusercontent.com/ohler55/ojg/develop/CHANGELOG.md>
- <https://raw.githubusercontent.com/ohler55/ojg/develop/README.md>
- <https://raw.githubusercontent.com/ohler55/ojg/develop/design.md>


## 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:** oj
- **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


## 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.
- [Language runtime packages](https://www.automicvault.com/pkg/language-runtime-packages/) - Matched language runtime, compiler, or interpreter metadata.
- [go](https://www.automicvault.com/pkg/brew/go/) - Build dependency declared by Homebrew.
- [miller](https://www.automicvault.com/pkg/brew/miller/) - Shares av.db curated category or tags: cli, data, go, json.
- [burrow](https://www.automicvault.com/pkg/brew/burrow/) - Shares av.db curated category or tags: cli, data, go.
- [cayley](https://www.automicvault.com/pkg/brew/cayley/) - Shares av.db curated category or tags: cli, data, go.
- [clickhouse-sql-parser](https://www.automicvault.com/pkg/brew/clickhouse-sql-parser/) - Shares av.db curated category or tags: cli, data, go.
- [conduit](https://www.automicvault.com/pkg/brew/conduit/) - Shares av.db curated category or tags: cli, data, go.
- [cqlkit](https://www.automicvault.com/pkg/brew/cqlkit/) - Shares av.db curated category or tags: cli, data, json.
- [distribution](https://www.automicvault.com/pkg/brew/distribution/) - Shares av.db curated category or tags: cli, data, visualization.
- [dsq](https://www.automicvault.com/pkg/brew/dsq/) - Shares av.db curated category or tags: cli, data, json.

## Combined YAML source

View the package source record on GitHub. [combined/oj.yml](https://github.com/automic-vault/db/blob/main/combined/oj.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
- cross-ecosystem install command graph
