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

xan

$ xan Community Low Risk
medialab (Sciences Po) · Database & Data · Unlicense · macos / linux / windows

xan (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.

FCRS-1.0 Score
88 /100
Good
Medium Confidence
Zero-Friction Install
brew install xan
CLI vs MCP Decision CLI Only

xan stats, xan frequency, and xan filter summarize huge CSV datasets locally in milliseconds without burning LLM tokens on raw rows.

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 22 / 25

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 -o output
Trust & Safety 24 / 25

Read-only stdout by default unless -o <file> is passed; local-only execution.

  • Stream-first read-only default; explicit -o for file writes
Setup & Portability 14 / 15

Single Rust binary distributed via Homebrew, cargo, and GitHub Releases.

  • Static Rust binary (brew install xan / cargo install xan)
Utility & Efficiency 14 / 15

Blazingly fast multi-threaded CSV exploration, profiling, and transformation.

  • Parallel Rust CSV engine with moonblade expression language
Maintenance & Lineage 7 / 10

Actively developed by Sciences Po medialab (medialab/xan) as a modern xsv successor.

  • Active medialab/xan repository
Docs & Verifiability 7 / 10

Detailed README and rich subcommand --help documentation.

  • Comprehensive README and --help

Security, Auth & Guardrails

Auth Modes
No Auth
Credential Storage

None; operates purely on local CSV/TSV files and streams.

Side Effects
Read-Only Local Write
Cost & Quotas

100% free and Public Domain (Unlicense).

Copyable Guardrail for CLAUDE.md / AGENTS.md
# 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

Inspect CSV column names and summary statistics
xan stats data.csv | xan to json

Computes min/max/mean/nulls/cardinality across all columns and converts summary to JSON.

Filter rows and export top records as 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

Deduplicate and sort a CSV into a new file
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 json and xan from convert cleanly between CSV and JSON/NDJSON.
  • + Embedded moonblade expression language handles complex filters without Python.

Caveats & Pitfalls

  • ! xan view renders a formatted table for humans—prefer xan to json or xan slice for agent consumption.

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI