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

csvkit

$ csvsql Community Low Risk
Wireservice · Database & Data · MIT · macos / linux / windows

csvkit provides a suite of single-purpose Unix CSV utilities—including csvsql for running SQLite/SQLAlchemy queries, csvjson for JSON/GeoJSON/NDJSON (--stream) conversion, csvstat for column profiling, and in2csv for converting Excel/JSON to CSV.

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

Runs deterministic CSV profiling (csvstat --csv), SQL joins (csvsql), and JSON streaming (csvjson --stream) directly on local files.

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

Fully non-interactive Unix pipes with csvjson --stream, csvstat --csv, and csvsql --query, though csvsql outputs CSV rather than JSON natively.

  • Composable non-interactive CLI suite (csvsql, csvjson, csvstat)
  • No native --json flag on csvsql itself
Trust & Safety 22 / 25

Read-only stdout by default; database writes require explicit --db and --insert flags.

  • In-memory SQLite default for csvsql --query
Setup & Portability 12 / 15

Cross-platform Python package via Homebrew, pip, and uvx, with slightly heavier Python runtime startup.

  • Available via brew install csvkit and pip install csvkit
Utility & Efficiency 13 / 15

Covers Excel ingestion (in2csv), column stats (csvstat), schema inference, and SQL joins cleanly for small-to-medium CSVs.

  • End-to-end tabular suite from in2csv to csvsql
Maintenance & Lineage 9 / 10

Long-standing Wireservice project (wireservice/csvkit) under MIT license with steady maintenance.

  • Maintained wireservice/csvkit repository
Docs & Verifiability 8 / 10

Clear ReadTheDocs manual covering every sub-tool and shared dialect flag.

  • Comprehensive CLI docs at csvkit.readthedocs.io

Security, Auth & Guardrails

Auth Modes
No Auth Config File
Credential Storage

None for local CSVs; csvsql --db accepts SQLAlchemy connection strings from CLI flags or environment.

Side Effects
Read-Only Local Write Remote Write
Cost & Quotas

MIT open-source Python package; completely free.

Copyable Guardrail for CLAUDE.md / AGENTS.md
# csvkit Agent Rules
- Use `csvsql --query` (ephemeral in-memory SQLite) for read-only queries; omit `--db`/`--insert` unless database writes are intended.
- Prefer `csvjson --stream` for large files, or pipe `csvsql` output into `csvjson`.

Agent-Ready Command Recipes

Safe Read-Only Queries

Run an ad-hoc SQL query over a CSV
csvsql --query "SELECT id, name FROM data LIMIT 20" data.csv

Loads data.csv into an ephemeral in-memory SQLite database and prints matching rows as CSV.

Convert CSV to streaming NDJSON
csvjson --stream data.csv

Emits one JSON object per line (--stream) without buffering the entire file.

Controlled Writes & Previews

Load a CSV into a local SQLite database
csvsql --db sqlite:///local.db --insert data.csv

Infers schema, creates the table, and inserts rows into local.db.

Strengths for Agents

  • + Familiar SQL querying (csvsql --query) and column profiling (csvstat) out of the box.
  • + in2csv handles .xlsx/.xls conversion cleanly into Unix CSV pipelines.
  • + csvjson --stream emits clean NDJSON.

Caveats & Pitfalls

  • ! Python implementation is significantly slower than Go/Rust tools (csvtk, qsv, duckdb) on 100MB+ files.
  • ! csvsql outputs CSV only; pipe to csvjson if JSON output is required.

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI