csvkit
$ csvsql Community Low Riskcsvkit 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.
brew install csvkit Runs deterministic CSV profiling (csvstat --csv), SQL joins (csvsql), and JSON streaming (csvjson --stream) directly on local files.
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
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
--jsonflag oncsvsqlitself
Read-only stdout by default; database writes require explicit --db and --insert flags.
- In-memory SQLite default for
csvsql --query
Cross-platform Python package via Homebrew, pip, and uvx, with slightly heavier Python runtime startup.
- Available via
brew install csvkitandpip install csvkit
Covers Excel ingestion (in2csv), column stats (csvstat), schema inference, and SQL joins cleanly for small-to-medium CSVs.
- End-to-end tabular suite from
in2csvtocsvsql
Long-standing Wireservice project (wireservice/csvkit) under MIT license with steady maintenance.
- Maintained
wireservice/csvkitrepository
Clear ReadTheDocs manual covering every sub-tool and shared dialect flag.
- Comprehensive CLI docs at csvkit.readthedocs.io
Security, Auth & Guardrails
None for local CSVs; csvsql --db accepts SQLAlchemy connection strings from CLI flags or environment.
MIT open-source Python package; completely free.
# 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
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.
csvjson --stream data.csv
Emits one JSON object per line (--stream) without buffering the entire file.
Controlled Writes & Previews
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. - +
in2csvhandles.xlsx/.xlsconversion cleanly into Unix CSV pipelines. - +
csvjson --streamemits clean NDJSON.
Caveats & Pitfalls
- ! Python implementation is significantly slower than Go/Rust tools (
csvtk,qsv,duckdb) on 100MB+ files. - !
csvsqloutputs CSV only; pipe tocsvjsonif JSON output is required.