Utilities
Transform record-oriented data with Miller
Named verbs for filtering, reshaping, sorting, and converting record streams.
overview
What miller does
Miller reads record-oriented data and applies a verb such as cat, cut, sort, filter, or stats1. Connect a data file, select its format with -i, choose the output format with -o, and set the verb that should process each record.
The optional -f value supplies a comma-separated field list to verbs that accept it, including cut and sort. Input and output formats can differ, so the same node can select columns from CSV and emit JSON.
The wrapper writes stdout to a temporary file and publishes it only after mlr exits successfully. Unsupported verb options or malformed input fail the node without leaving a partial result.
source github.com/johnkerl/miller
use cases
Where miller fits
Select CSV columns
Run cut with -f to keep only the columns needed downstream.
Convert records to JSON
Read CSV or TSV with -i and emit JSON or JSON Lines with -o.
Sort a dataset
Run the sort verb with a field list before loading the result elsewhere.
reference
miller inputs and flags
| Name | Type | Flag | Description |
|---|---|---|---|
| input | FILE | --input | Input data file. |
| input-format | STRING | --input-format | Input format such as csv, tsv, json, or jsonl. |
| output-format | STRING | --output-format | Output format such as csv, tsv, json, or jsonl. |
| verb | STRING | --verb | Miller verb such as cat, cut, sort, filter, or stats1. |
| fields | STRING | --fields | Comma-separated field list for supported verbs. |
Showing key inputs. miller exposes 5 inputs in total.
example
Run miller
# Millermlr -i csv -o json cut -f name,n input.csv[{ "name": "alpha", "n": 2},{ "name": "beta", "n": 1}]guidance
Choosing miller
Use Miller when the data is a stream of named records and a built-in verb describes the operation. Use csvkit or DuckDB when SQL is a better fit.
csvkit
Runs SQL against one CSV with csvsql.
duckdb
Queries multiple CSV, JSON, or Parquet files with SQL.
jq
Filters arbitrary JSON structures rather than tabular records.
faq
miller questions
related
More Utilities tools
browser-fetch
Headless Chromium render: requested URL, final URL, status, and title next to the page.
cewl
Spider a URL and return a wordlist for password crackers.
csvkit
SQL on one CSV. The table name is the file stem.
dnsgen
Wordlist and mined-word subdomain permutation.
duckdb
In-process SQL on CSV, JSON, and Parquet. No server.
edge-tts
Microsoft Edge neural speech from text or a script file. No API key.
Run miller yourself
A two-row CSV feeds Miller cut with name,n and is emitted as a JSON array.
Facts on this page come from the live Trickest tool library.