sqlite-utils CLI
The CLI imports CSV and JSON into SQLite, runs SQL and reshapes tables for agent-assisted local data preparation.
- 2,186 ★ on the repository
- Last commit
- Apache-2.0
Extended access
Why this level
- The CLI creates and changes SQLite files; query output and exports may contain confidential data.
Install
In your terminal, with SkillFoxx CLI
npx skillfoxx add cli/sqlite-utilsDetects the agents on your machine, shows the access level and pins the version.
Other ways to install
Access and checks
How we reviewExtended accessThe tool runs code or makes network calls and only reads external data.
- The CLI creates and changes SQLite files; query output and exports may contain confidential data.
This is third-party code. Review the repository files before installing.
What it does
sqlite-utils lets an agent build a SQLite database from files or streams. Import creates a table and inferred schema, after which SQL runs from the terminal. Results can be JSON, CSV or a readable table. An in-memory mode supports one-off queries and joins. Other commands configure full-text search and transform tables. Users choose persistent database storage or transient analysis.
Who it is for. Analysts of small exports moving from CSV or JSON into inspectable SQL queries.
Good fit when
- An export needs SQL-based aggregate checks.
- Several CSVs need a join on a shared field.
- Repeated analysis needs a saved SQLite database.
- A table needs full-text search or an agreed schema change.
Not a fit when
- A production database cannot be copied before transformation.
- Data must not appear in the agent conversation.
- Automatic type inference is expected to replace schema review.
Example request
Import the test CSV into a new SQLite database, show schema and row count, then run the agreed aggregation query.Limitations
The current package requires Python 3.10 or later, so check the installed runtime before using the CLI. Import infers a schema from data; mixed values need a review of column types and primary keys. Transformation commands modify the database, so use a separate copy and compare record counts before and after. Optional plugins add executable code and SQL functions; inspect their sources separately from the main utility.
How to disable. End the command and remove unwanted plugins or the CLI. Created databases and exported results remain as files.
FAQ
Can SQL run without a database file?
Yes. `sqlite-utils memory` loads input into an in-memory database.
How do I list tables and counts?
Use `sqlite-utils tables` with the database path and `--counts`.
Can JSON come from stdin?
Yes. The import example uses `-` as its input.
How do I output CSV?
Add `--csv` to the CLI SQL query.
Are schema migrations supported?
Yes. Python migration files work with `sqlite-utils migrate`.
Discussion
No questions or reviews yet.
Related
CLI toolsThe SQL client combines terminal database browsing with batch queries for agents using named connections and JSON results.
The CLI runs SQL over CSV, JSON and other tabular files so agents can join exports and select output formats.
VisiData opens multiple table formats in a terminal and helps explore, arrange and compare data through keyboard controls.
The CLI selects and changes JSON, YAML and other structured values so agents can transform data with one query language.
One MCP server for SQLite, SQL Server, PostgreSQL and MySQL: read and change data, edit schemas and export to CSV and JSON
dblab is a terminal SQL client with saved connection profiles and optional password storage in the operating system keyring.
README in short
Columns can be extracted into separate tables for normalization. A Python library provides programmatic access to the operations.