xan
$ xan Community Low Riskxan (successor to xsv from Sciences Po medialab) is a high-performance Rust CLI for inspecting, filtering, joining, aggregating, and reshaping multi-gigabyte CSV files. Features xan headers, xan stats, xan agg, xan to json, and an embedded moonblade expression language.
brew install xan xan stats, xan frequency, and xan filter summarize huge CSV datasets locally in milliseconds without burning LLM tokens on raw rows.
Agent-Readiness Checklist
Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.
FCRS-1.0 6-Dimension Breakdown
Rich composable subcommands (headers, stats, filter, agg, to json), -o file output, and clean POSIX piping.
- Supports
xan to json,xan stats,xan slice, and-ooutput
Read-only stdout by default unless -o <file> is passed; local-only execution.
- Stream-first read-only default; explicit
-ofor file writes
Single Rust binary distributed via Homebrew, cargo, and GitHub Releases.
- Static Rust binary (
brew install xan/cargo install xan)
Blazingly fast multi-threaded CSV exploration, profiling, and transformation.
- Parallel Rust CSV engine with
moonbladeexpression language
Actively developed by Sciences Po medialab (medialab/xan) as a modern xsv successor.
- Active
medialab/xanrepository
Detailed README and rich subcommand --help documentation.
- Comprehensive README and
--help
Security, Auth & Guardrails
None; operates purely on local CSV/TSV files and streams.
100% free and Public Domain (Unlicense).
# xan Agent Rules - Start with `xan headers` and `xan stats` before printing raw rows of unknown CSVs. - Always cap output with `xan slice -l <n>` and convert summaries via `xan to json` for structured parsing. - Use `-o <new_file>` when transforming data so original CSVs remain untouched.
Agent-Ready Command Recipes
Safe Read-Only Queries
xan stats data.csv | xan to json
Computes min/max/mean/nulls/cardinality across all columns and converts summary to JSON.
xan filter 'status == "error"' events.csv | xan slice -l 20 | xan to json
Streams matching rows, caps to 20 records, and outputs JSON.
Controlled Writes & Previews
xan dedup -s id input.csv -o deduped.csv
Writes a clean deduplicated CSV to a separate output file via -o.
Strengths for Agents
- + Parallel Rust engine profiles and aggregates GB-scale CSVs in seconds.
- +
xan to jsonandxan fromconvert cleanly between CSV and JSON/NDJSON. - + Embedded
moonbladeexpression language handles complex filters without Python.
Caveats & Pitfalls
- !
xan viewrenders a formatted table for humans—preferxan to jsonorxan slicefor agent consumption.