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

sqlite-utils

$ sqlite-utils Community Low Risk
Simon Willison · Database & Data · Apache-2.0 · macos / linux / windows

sqlite-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.

FCRS-1.0 Score
91 /100
Excellent
Medium Confidence
Zero-Friction Install
brew install sqlite-utils
CLI vs MCP Decision CLI Preferred vs MCP

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

✓ 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 23 / 25

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 --nl and --csv flags across read commands
Trust & Safety 22 / 25

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 val bound parameters to prevent SQL injection
Setup & Portability 14 / 15

Single-command install via Homebrew, PyPI, and uvx across macOS, Linux, and Windows.

  • Published on Homebrew, PyPI, and runnable via uvx sqlite-utils
Utility & Efficiency 15 / 15

Replaces dozens of ad-hoc Python ETL scripts for JSON/CSV ingestion, schema inspection, and FTS5 indexing.

  • One-line insert, upsert, enable-fts, and memory queries over CSV/JSON
Maintenance & Lineage 8 / 10

Actively maintained by Simon Willison under Apache-2.0 with a broad plugin ecosystem.

  • Official simonw/sqlite-utils repository under Apache-2.0
Docs & Verifiability 9 / 10

Exceptional CLI reference with copyable examples and thorough Click --help output.

  • Comprehensive CLI docs at sqlite-utils.datasette.io

Security, Auth & Guardrails

Auth Modes
No Auth
Credential Storage

Operates on local SQLite database files and stdin/stdout streams; no remote credentials required.

Side Effects
Read-Only Local Write Destructive
Cost & Quotas

100% free and Apache-2.0 open-source.

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

List tables and row counts as JSON
sqlite-utils tables app.db --counts

Outputs table metadata and exact row counts as a JSON array.

Run a SQL query returning NDJSON
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

Upsert JSON records into a SQLite table
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, and tables, with --nl for streaming.
  • + Effortlessly loads JSON, NDJSON, and CSV files into typed SQLite tables with --pk upserts.
  • + sqlite-utils memory lets agents run SQL directly over local CSV/JSON files without creating a database.

Caveats & Pitfalls

  • ! Lacks a global --dry-run or --read-only mode on mutating subcommands like transform.
  • ! Python startup time is noticeable compared to native C sqlite3 for tiny repeated calls.

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI