Extract values from anything

One tool to replace jq, yq, grep, awk, and cut. Auto-detects format. Simple selectors.

npm install -g @aryanbhosale/pick
macOS, Linux, Windows · MIT License
Terminal
# JSON $ curl -s api.github.com/users/octocat | pick login octocat # .env $ cat .env | pick DATABASE_URL postgres://localhost:5432/mydb # YAML $ cat config.yaml | pick server.port 8080 # HTTP headers $ curl -sI example.com | pick content-type text/html; charset=UTF-8 # CSV $ cat users.csv | pick '[0].name' Alice # logfmt $ echo 'level=info status=200' | pick status 200

8 formats, zero config

JSON

Objects, arrays, nested structures

YAML

Config files, Kubernetes manifests

TOML

Cargo.toml, pyproject.toml

.env

Environment variable files

HTTP Headers

curl -I output, response headers

logfmt

Structured log lines

CSV / TSV

Tabular data with headers

Plain text

Key-value fallback and substring search

Selector syntax

fooTop-level key
foo.barNested key
foo[0]Array index
foo[-1]Last element
foo[*].namePluck field from all elements
[0]Index into root array
"dotted.key".subQuoted key for dots in names

Flags

-i, --input <format>

Force input format

-f, --file <path>

Read from file instead of stdin

--json

Output as JSON

--lines

One element per line

-1, --first

Only first result

-d, --default <val>

Fallback value

-e, --exists

Exit code only (0/1)

-c, --count

Count matches

Install

# npm (macOS, Linux, Windows) $ npm install -g @aryanbhosale/pick # from source (Rust 1.85+) $ git clone https://github.com/aryanbhosale/pick.git $ cd pick && cargo install --path .
Copied!