multi-format data processing tool https://aq.cobi.dev/
  • Rust 93.3%
  • Python 6.3%
  • Nix 0.4%
Find a file
2026-10-13 12:34:11 -04:00
.github/workflows 0.2.0: jq drop-in parity (all builtins, jq flags, -f/--stream semantics), big perf wins, benchmarks 2026-10-13 11:50:31 -04:00
benchmarks 0.2.0: jq drop-in parity (all builtins, jq flags, -f/--stream semantics), big perf wins, benchmarks 2026-10-13 11:50:31 -04:00
docs 0.2.0: jq drop-in parity (all builtins, jq flags, -f/--stream semantics), big perf wins, benchmarks 2026-10-13 11:50:31 -04:00
examples/starlark 0.2.0: jq drop-in parity (all builtins, jq flags, -f/--stream semantics), big perf wins, benchmarks 2026-10-13 11:50:31 -04:00
scripts 0.2.0: jq drop-in parity (all builtins, jq flags, -f/--stream semantics), big perf wins, benchmarks 2026-10-13 11:50:31 -04:00
src 0.2.0: jq drop-in parity (all builtins, jq flags, -f/--stream semantics), big perf wins, benchmarks 2026-10-13 11:50:31 -04:00
tests fix darwin test race condition 2026-10-13 12:34:11 -04:00
.envrc init 2026-04-07 20:51:56 -04:00
.gitignore init 2026-04-07 20:51:56 -04:00
Cargo.lock fix darwin test race condition 2026-10-13 12:34:11 -04:00
Cargo.toml fix darwin test race condition 2026-10-13 12:34:11 -04:00
default.nix 0.2.0: jq drop-in parity (all builtins, jq flags, -f/--stream semantics), big perf wins, benchmarks 2026-10-13 11:50:31 -04:00
LICENSE init 2026-04-07 20:51:56 -04:00
README.md 0.2.0: jq drop-in parity (all builtins, jq flags, -f/--stream semantics), big perf wins, benchmarks 2026-10-13 11:50:31 -04:00

aq

uses nix rust

aq is a jq-style CLI for querying and rewriting structured data across more than just JSON.

It currently supports:

  • jq-style query semantics and result streams
  • JSON, JSONL, YAML, TOML, CSV, and TSV input and output
  • output-only table rendering for inspection
  • atomic in-place rewrites
  • optional Starlark scripting and a persistent REPL with history, editing, and IDE-style completion for heavier transforms

Install

  • Release artifacts: tagged releases publish Linux musl x86_64 and aarch64, macOS aarch64, and Windows x86_64 binaries.
  • Nix: nix-build -A bin builds a static Linux binary into ./result/bin/aq.
  • Cargo: cargo install --git https://github.com/jpetrucciani/aq

Quick Start

aq '.users[] | select(.age >= 30) | .name' users.json
aq '.name' -
aq -p yaml -o json '.services[].port' compose.yaml
aq -o table '.items[] | {name, status, owner}' data.json
aq --line-stream 'select(.status >= 500)' logs.jsonl
aq --in-place '.version = "2.0"' config.toml
aq -n --starlark '1 + 2'
aq -n -P

Merging files

Use --slurp to read multiple input documents into one array, then merge the first document with the second:

# Shallow object merge. Top-level keys from overlay.yaml replace base.yaml.
aq --slurp '.[0] + .[1]' base.yaml overlay.yaml

# Recursive object merge. Nested objects are merged, deepest values still let
# overlay.yaml win.
aq --slurp '.[0] * .[1]' base.yaml overlay.yaml

# Merge every slurped document recursively, in file order.
aq --slurp 'merge_all(true)' base.yaml env.yaml local.yaml

Docs

Development

cargo fmt
cargo clippy --all --benches --tests --examples --all-features -- -D warnings

cd docs
bun install
bun run docs:dev