The shell is the swiss army knife
The sqlite3 CLI is more than a query runner. It is a full interactive shell with its own meta-command language — the dot commands. They start with a leading . and are interpreted by the shell itself, not by SQLite.
The dozen you'll actually use:
.help— list every dot command with a one-line description..tables— list tables in the current database..schema [TABLE]— print CREATE statements; optional table filter..indexes [TABLE]— list indexes; optional table filter..databases— show attached databases..mode column|box|csv|json|markdown|line— change result formatting..headers on— print column names with results..timer on— print wall-clock time per query..read FILE.sql— execute SQL from a file..import FILE TABLE— bulk load a CSV/TSV..dump— emit a SQL script that reproduces the database..backup TARGET.db— safe online snapshot..quit— exit the shell (Ctrl-D works too).
Tip: Type
.mode box + .headers on in the very first second of any new session. The default list mode is unreadable past five columns; box mode renders pretty Unicode tables and survives long values.You can also run the CLI in batch mode to pipe SQL in and out — perfect for scripts, cron jobs, and one-off explorations.