Directory Compare FCRS-1.0 /llms.txt
← Back to Directory

Miller

$ mlr Community Low Risk
John Kerl · Database & Data · BSD-2-Clause · macos / linux / windows

Miller (mlr) is a single-binary Go tool for querying, reshaping, aggregating, and converting name-indexed data formats including CSV, TSV, JSON, JSON Lines, and DKVP. Built for Unix pipelines with --icsv --ojson format flags, filter, stats1, and in-place -I editing.

FCRS-1.0 Score
92 /100
Excellent
Medium Confidence
Zero-Friction Install
brew install miller
CLI vs MCP Decision CLI Only

mlr --icsv --ojson converts and aggregates tabular data into clean JSON in one streaming command—faster and more deterministic than custom Python scripts.

Agent-Readiness Checklist

✓ JSON Output
✓ Field Filtering
✓ Non-Interactive
— Dry-Run
— Read-Only Mode
✓ NO_COLOR Clean
✓ Self-Describing
— Official SKILL.md

Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.

FCRS-1.0 6-Dimension Breakdown

Agent-Readiness 24 / 25

First-class --ojson / --ojsonl / --c2j format conversions, field-name addressing, composable then verbs, and clean streaming exit codes.

  • Supports --icsv --ojson, --ojsonl, --c2j, and then pipelines
Trust & Safety 24 / 25

Read-only stdout stream processor by default; local file edits require explicit -I or shell redirection.

  • Pure stream processor; explicit -I required for in-place edits
Setup & Portability 15 / 15

Single static Go binary across macOS, Linux, and Windows via Homebrew, apt, Scoop, and Releases.

  • Static Go binary (brew install miller)
Utility & Efficiency 14 / 15

Bridges CSV, TSV, JSON, NDJSON, and key-value logs cleanly with SQL-like stats1, join, and put.

  • Header-aware awk/sed/cut/join across CSV and JSON
Maintenance & Lineage 8 / 10

Mature, actively maintained johnkerl/miller v6 under BSD-2-Clause.

  • Active johnkerl/miller repository
Docs & Verifiability 7 / 10

Thorough ReadTheDocs manual, though Miller's DSL syntax ($field, then) takes brief familiarity.

  • Official docs at miller.readthedocs.io

Security, Auth & Guardrails

Auth Modes
No Auth
Credential Storage

None; operates purely on local files and stdin/stdout streams.

Side Effects
Read-Only Local Write
Cost & Quotas

100% free and BSD-2-Clause open-source.

Copyable Guardrail for CLAUDE.md / AGENTS.md
# Miller (mlr) Agent Rules
- Always specify explicit input/output format flags like `--icsv --ojson` or `--c2j`.
- Chain verbs with `then` and cap row output with `head -n <N>` before printing to stdout.
- Avoid `-I` (in-place file rewrite) until you have verified the expression on stdout.

Agent-Ready Command Recipes

Safe Read-Only Queries

Filter CSV rows and emit JSON array
mlr --icsv --ojson filter '$status == "active"' then head -n 20 users.csv

Filters rows by column name and outputs structured JSON without loading the whole file into context.

Compute grouped stats from CSV to JSON
mlr --icsv --ojson stats1 -a count,sum,mean -f amount -g category sales.csv

Aggregates counts, sums, and means grouped by category and emits JSON.

Controlled Writes & Previews

Normalize a messy CSV to clean JSON Lines
mlr --icsv --ojsonl clean-whitespace input.csv > clean.jsonl

Trims whitespace across all fields and writes streaming NDJSON output.

Strengths for Agents

  • + Converts effortlessly between CSV, TSV, JSON, NDJSON, and DKVP via --c2j, --j2c, --icsv --ojson.
  • + Header-aware expressions eliminate brittle awk column-number indexing.
  • + Zero-dependency static Go binary streams large datasets cleanly.

Caveats & Pitfalls

  • ! DSL quoting rules ('$col == "x"') and then verb chaining differ slightly from jq and SQL.

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI