sqlite-utils
$ sqlite-utils Community Low Risksqlite-utils turns local SQLite databases into scriptable data pipelines: query tables with JSON output by default (--nl for NDJSON, --csv for CSV), inspect schemas and row counts, bulk-insert JSON/CSV/TSV files, and configure SQLite FTS5 full-text search in one command.
brew install sqlite-utils sqlite-utils ingests local JSON/CSV files, builds FTS5 indexes, and runs JSON queries directly on workspace files without needing an MCP server.
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
Outputs JSON by default on query, rows, tables, and indexes, supports --nl NDJSON and --csv, and never enters an interactive prompt.
- JSON-native default output plus
--nland--csvflags across read commands
Local-only SQLite file scope with parameterized -p query binding support, though destructive commands like drop-tables lack a built-in --dry-run.
- Supports
-p key valbound parameters to prevent SQL injection
Single-command install via Homebrew, PyPI, and uvx across macOS, Linux, and Windows.
- Published on Homebrew, PyPI, and runnable via
uvx sqlite-utils
Replaces dozens of ad-hoc Python ETL scripts for JSON/CSV ingestion, schema inspection, and FTS5 indexing.
- One-line
insert,upsert,enable-fts, andmemoryqueries over CSV/JSON
Actively maintained by Simon Willison under Apache-2.0 with a broad plugin ecosystem.
- Official
simonw/sqlite-utilsrepository under Apache-2.0
Exceptional CLI reference with copyable examples and thorough Click --help output.
- Comprehensive CLI docs at sqlite-utils.datasette.io
Security, Auth & Guardrails
Operates on local SQLite database files and stdin/stdout streams; no remote credentials required.
100% free and Apache-2.0 open-source.
# sqlite-utils Agent Rules - Inspect schema first with `sqlite-utils schema <db>` and `sqlite-utils tables <db> --counts`. - Use `sqlite-utils query <db> "SELECT ..." --nl` for streaming large result sets. - Back up `.db` files before running `transform`, `convert`, or `drop-tables`.
Agent-Ready Command Recipes
Safe Read-Only Queries
sqlite-utils tables app.db --counts
Outputs table metadata and exact row counts as a JSON array.
sqlite-utils query app.db "SELECT id, title FROM items LIMIT 20" --nl
Executes a read-only SQL query and streams newline-delimited JSON records.
Controlled Writes & Previews
sqlite-utils upsert app.db items records.json --pk id
Creates or updates rows from records.json keyed by id inside a local SQLite database.
Strengths for Agents
- + JSON output is first-class and default for
query,rows, andtables, with--nlfor streaming. - + Effortlessly loads JSON, NDJSON, and CSV files into typed SQLite tables with
--pkupserts. - +
sqlite-utils memorylets agents run SQL directly over local CSV/JSON files without creating a database.
Caveats & Pitfalls
- ! Lacks a global
--dry-runor--read-onlymode on mutating subcommands liketransform. - ! Python startup time is noticeable compared to native C
sqlite3for tiny repeated calls.