# Installer oq avec Homebrew, apk, MacPorts, Nix

Consultez les chemins d'installation, exécutables, métadonnées et notes de sécurité de oq pour les workflows d'agents IA.

## installation

```sh
sudo av install brew:oq
```

Commandes d'installation supplémentaires:

### macOS

- Homebrew (100%):

```sh
brew install oq
```

  Preuve: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install oq
```

  Preuve: MacPorts ports tree: devel/oq/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- apk (92%):

```sh
sudo apk add oq
```

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

- Nix (92%):

```sh
nix profile install nixpkgs#oq
```

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

## Faits du paquet

- **Clé du paquet:** brew:oq
- **Gestionnaire de paquets:** Homebrew
- **Version:** 1.3.5
- **Résumé source:** Performant, and portable jq wrapper to support formats other than JSON
- **Page d'accueil:** <https://blacksmoke16.github.io/oq>
- **Dépôt:** <https://github.com/Blacksmoke16/oq>
- **Généré:** 2026-08-03T19:37:03+00:00

## exécutables

- oq (alias)

## Comportement d'installation

- Bouteille: non disponible

## Version et fraîcheur

- page générée: 2026-08-03
- version du gestionnaire: 1.3.5
## Historique du projet et usages

oq is a Crystal-written wrapper around `jq` that converts non-JSON formats into JSON for filtering and then serializes the result back out. Its core idea is to keep jq's filter language while adding practical YAML and XML input/output paths.

### Historique du projet

George Dietrich introduced oq in a 2019 article after comparing existing jq-adjacent tooling and wanting a more portable, higher-performance option for large non-JSON documents. The project goals were portability, performance, and extending the formats that jq can handle without replacing jq's filter language.

The 1.x series broadened oq from a CLI into a small Crystal library as well. Release notes for v1.2.0 describe library support, a SimpleYAML format for streamable large inputs, and better handling of multiple non-JSON files; v1.3.0 added XML namespace options and forced-array behavior for XML parsing.

### Historique d'adoption

oq remains a niche developer utility, but it has enough packaging surface to be available through Homebrew, Alpine, MacPorts, and Nix in the input metadata. Homebrew describes it as a performant and portable jq wrapper, with Crystal required only for source builds.

### Modes d'utilisation

A typical use keeps jq syntax in place and adds format flags, such as reading YAML with `-i yaml`, writing XML with `-o xml`, or using the tool as a Crystal dependency through `OQ::Processor`. That makes it useful in shell scripts where JSON, YAML, and XML need the same transformation logic.

### Pourquoi les passionnés de paquets s'y intéressent

oq is package-nerd interesting because it does less than a full data-query language and more than a one-off converter. It packages the proven jq execution model with format adapters and a single-binary distribution story, which is often the sweet spot for command-line glue.

### Chronologie

- 2019: The author publishes the oq introduction and motivation.
- 2021-02-27: v1.2.0 adds library support, SimpleYAML, and improved multiple-file handling for non-JSON inputs.
- 2021-08-17: v1.3.0 adds XML namespace controls and XML force-array behavior.
- 2024-04-04: v1.3.5 is tagged.

### Related projects

- oq depends conceptually on jq and overlaps with yq-style data conversion workflows. Its implementation and library surface are tied to Crystal, libyaml, and XML/JSON conversion behavior.

### Sources

- <https://blacksmoke16.github.io/oq/>
- <https://dev.to/blacksmoke16/oq-a-portable-performant-jq-wrapper-18ka>
- <https://formulae.brew.sh/formula/oq>
- <https://github.com/Blacksmoke16/oq>
- <https://github.com/Blacksmoke16/oq/releases>
- <https://github.com/Blacksmoke16/oq/tags>


## Notes de sécurité

narrow executable package without higher-risk signals.

- **Risque Geiger:** vert / faible
- narrow executable package without higher-risk signals

## Autres enregistrements de gestionnaires de paquets

- Nix - oq: normalized package name match | nixpkgs package indexes: pkgs/by-name/oq/oq/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- apk - oq - 1.3.5-r0: normalized package name match | Alpine Linux edge package indexes: oq from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | portable jq wrapper with support of other formats than JSON | https://github.com/blacksmoke16/oq
- MacPorts - oq: normalized package name match | MacPorts ports tree: devel/oq/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/oq.yml](https://github.com/mxcl/pkgdb/blob/main/combined/oq.yml)


## Sources

- 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
