What it does
Miller is a command-line data tool that works with named fields in formats such as CSV, TSV, JSON, JSON Lines, and YAML. Its verbs can sort, select, reshape, summarize, and convert records, while its expression language lets a user derive new fields. Unlike line-oriented text filters that rely on field positions, Miller addresses data by field name and can preserve heterogeneous record shapes. It is useful for cleaning files or processing the text output of another tool, rather than as a database server.
Miller treats a row as named fields, so a task can refer to name rather than remembering that it is column four. The documentation presents it as a Unix-friendly command-line utility for formats including CSV, TSV, JSON, JSON Lines, YAML, and DCF. It has compact verbs for familiar operations and a small expression language for custom field calculations.
For example, if input.csv has a name header, the documented command mlr --csv sort -f name input.csv sorts on that field. A second official example derives a rate from two input columns:
mlr --csv put '$rate = $units / $seconds' input.csv
These are examples from Miller's docs, not commands run here. They show the useful starting point: select the input format, name the field you care about, then chain a verb or calculation. Miller can also convert between formats and process database-query output on its way into another tool.
Keep streaming behavior in mind
Many operations process one record at a time, which can make Miller suitable for large text streams. The documentation calls out exceptions: operations such as sorting and some statistics retain additional data. Plan for those operations rather than assuming every command has constant memory use. Miller complements a database or analysis package; it does not provide a database engine. Its repository lists packages or binaries for Linux, macOS, and Windows, and the project uses the BSD 2-Clause license.
Strengths
- Uses field names across CSV, TSV, JSON, JSON Lines, and other record-oriented formats.
- Combines common data-cleaning verbs with expressions for calculated fields.
- Many operations stream records instead of loading a whole file into memory.
Watch out for
- Sort and some statistical operations retain additional data, so they do not share the same low-memory behavior as streaming operations.
- Miller transforms files and command output; it is not a database engine or hosted database service.
Best for
- Cleaning, sorting, or converting structured text files in shell workflows.
- Preparing database-query output or logs for another analysis tool.
Sources
- Miller 6.22.0 Documentation (Oct 26, 2026)
- johnkerl/miller official repository (Oct 26, 2026)
- Miller BSD 2-Clause License (Oct 26, 2026)
