multi-format data processing tool https://aq.cobi.dev/
  • Rust 96.3%
  • Python 3.5%
  • Nix 0.2%
Find a file
2026-09-02 20:44:36 -04:00
.github/workflows fix docs 2026-04-07 22:10:43 -04:00
benchmarks doc updates, fix some tests 2026-09-02 20:33:12 -04:00
docs doc updates, fix some tests 2026-09-02 20:33:12 -04:00
examples/starlark doc updates, fix some tests 2026-09-02 20:33:12 -04:00
scripts doc updates, fix some tests 2026-09-02 20:33:12 -04:00
src fix clippy 2026-09-02 20:44:36 -04:00
tests fix clippy 2026-09-02 20:44:36 -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 clippy 2026-09-02 20:44:36 -04:00
Cargo.toml doc updates, fix some tests 2026-09-02 20:33:12 -04:00
default.nix doc updates, fix some tests 2026-09-02 20:33:12 -04:00
LICENSE init 2026-04-07 20:51:56 -04:00
README.md doc updates, fix some tests 2026-09-02 20:33:12 -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: TODO

Quick Start

cargo build --release

aq '.users[] | select(.age >= 30) | .name' users.json
aq '.name' -
aq -f yaml -o json '.services[].port' compose.yaml
aq -o table '.items[] | {name, status, owner}' data.json
aq --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