What it does
UseSQLite creates a named database as a real SQLite file in WAL mode. The connection string, CLOUD_SQLITE_URL, goes into .env.local from the Connect tab. Running npx usesqlite typegen writes types from the live schema. The SQL editor autocompletes real table and column names from the open database. The table editor sorts, paginates and filters rows on several conditions at once. Tagged templates bind every value as a parameter, and db.batch runs several statements in one transaction. The Query Advisor shows execution time and query history, lets you inspect the plan, and applies an index recommendation in one click. The same package includes React hooks such as useTable.
Capabilities
- The typegen command accepts a --check option that fails CI when types drift.
- Managed FTS5 indexes are created from the table editor and return ranked matches and snippets, with automatic synchronization as rows change.
- Scoped keys give read/write access for a server and read-only access for the browser, and each key can be revoked individually.
- Backups can be restored into a new database, and forks create a separate file with its own keys.
- Import accepts a SQLite file, replayed SQL or CSV, and export produces a native SQLite copy, a portable SQL dump or a table CSV.
When to use it
- You need to copy production into staging as a separate database with its own keys.
- You want to turn slow scans into indexed reads using a recommended index.
- You want to rehearse recovery by restoring a backup into a new database without touching production.