100% Client-Side β’ 0 B Data Leaves Browser
database
SQLite3 CLI & Dot-Commands Cheat Sheet
Comprehensive SQLite command-line reference. Covers dot-commands, table inspection, CSV import/export, index analysis, and backups.
Dot Commands & Meta-Information
Open or create a SQLite database filesqlite3 app.db
List all tables in the active database.tables
Display the CREATE TABLE schema and indexes for a table.schema <table_name>
Format SELECT query output as readable aligned columns with headers.mode column | .headers on
Exit the sqlite3 interactive shell.quit / .exit
Import, Export & Backups
Import CSV file into a SQLite table.mode csv
.import data.csv target_table
Export query results directly to CSV file.mode csv
.output data.csv
SELECT * FROM target;
.output stdout
Dump entire database as SQL statements.dump > backup.sql
Create live binary database snapshot without locking.backup backup.db
Reclaim unused disk space and defragment database fileVACUUM;
Frequently Asked Questions
β’ What is WAL mode in SQLite?
Write-Ahead Logging (WAL) enables concurrent readers and writers (`PRAGMA journal_mode=WAL;`), significantly boosting performance.