Automic VaultAutomic Vault

brew

使用 Homebrew 安装 oj

查看 oj 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

安装

其他安装命令

macOS

Homebrew已验证 · 100%
brew install oj

local Homebrew formula metadata

概览

软件包摘要

JSON parser and visualization tool

命令和别名

  • oj

历史

项目历史与用法

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.

项目历史

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.

采用历史

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.

使用方式

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.

为什么软件包爱好者会关心

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.

时间线

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

安全态势

风险级别:绿色

narrow executable package without higher-risk signals.

风险分类器

绿色 风险 · 低 置信度 · appliance

原因

  • narrow executable package without higher-risk signals

信号

  • metadata:no-higher-risk-signals

安装行为

  • formula 元数据中未记录 Homebrew post-install 钩子。
  • Homebrew bottle 元数据适用于 6 个平台目标。
  • 构建元数据列出 1 个构建依赖。

建议审查

在无人值守的代理使用前,请检查该工具是否读取明文凭据、写入远程状态、发布制品或调用插件。

可执行文件

已安装的可执行文件

命令类型暴露范围备注
ojcli全局可执行文件

新鲜度

版本和新鲜度

这些信号区分页生成时间、软件包管理器活动和上游发布比较。只有存在证据 URL 和可比较版本时,才会提示版本落后。

页面生成时间2026-07-25
管理器版本1.28.2
管理器更新时间2026-07-06
本地数据OK
上游当前
检测到的最新版本v1.28.2

https://github.com/ohler55/ojg

  • OK没有生成新鲜度警告。

安装元数据

软件包元数据

软件包键brew:oj
版本1.28.2
软件包管理器Homebrew
软件包管理器页面https://formulae.brew.sh/formula/oj
主页https://github.com/ohler55/ojg
仓库https://github.com/ohler55/ojg
上游文档https://github.com/ohler55/ojg#readme
许可证MIT
源码归档https://github.com/ohler55/ojg/archive/refs/tags/v1.28.2.tar.gz
最后更新2026-07-06T04:50:51Z
Pulseupdated
构建依赖go
Bottle可用 (于 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux)
Homebrew post-install未定义
服务未声明

注册表事实

源数据库详情

Source DatabaseHomebrew formula API
Taphomebrew/core
Full Nameoj
Version Scheme0
Revision0
Head VersionHEAD
Bottle Stable Root URLhttps://ghcr.io/v2/homebrew/core
Deprecatedno
Disabledno
Keg Onlyno
URL Keys
  • head
  • stable

来源线索

由仓库数据生成

此页面由 av-webscripts/generate-pkg-sqlite.py 生成的私有软件包 SQLite 工件提供。

Combined YAML source

View the package source record on GitHub.

combined/oj.yml

使用的来源

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