Shell Commands
Dot commands are special commands available in the interactive shell. They start with a period (.) and do not require a trailing semicolon.
Database & Navigation
.open
Open a database file, optionally specifying a VFS backend..quit
Exit the shell. Aliases:.q, .qu, .qui.
.exit
Exit the shell with an optional return code. Aliases:.ex, .exi.
.cd
Change the current working directory.Schema Inspection
.tables
List all tables in the database, optionally filtered by a pattern..schema
Display the CREATE statement for a table, or all tables if no argument is given..indexes
Show index names, optionally filtered by table..databases
List all attached databases.Output Control
.mode
Set the output display mode.| Mode | Description |
|---|---|
pretty | Table with borders (default) |
list | Pipe-delimited values |
line | One column per line with column names |
.headers
Toggle column headers on or off inlist mode.
.nullvalue
Set the string displayed for NULL values inlist mode.
.output
Redirect query output to a file. Call with no argument orstdout to restore output to the terminal.
.echo
Toggle echo mode. When on, each SQL statement is printed before execution..show
Display current shell settings.Performance & Diagnostics
.timer
Toggle query timing. When on, shows execution time and I/O statistics after each query..stats
Display database statistics. Useon/off to toggle automatic display after every query, or --reset to clear counters.
.opcodes
Show VDBE (Virtual Database Engine) opcodes with descriptions. Optionally filter by opcode name..vfslist
List available Virtual File System modules.Data Import & Export
.dump
Output the entire database as SQL statements that can recreate it.The output of
.dump can be piped into another Turso instance to recreate the database:.import
Import data from a file into a table.| Option | Default | Description |
|---|---|---|
--csv | on | Use comma as field separator and newline as record separator |
--skip N | 0 | Skip the first N rows (useful for skipping a header row) |
--verbose | off | Print progress information during import |
data.csv:
.clone
Clone the current database to a new file..read
Execute SQL statements from a file..load
Load an extension library.Only Turso-native extensions can be loaded. SQLite
.so/.dll loadable extensions are not supported. See the Extensions documentation for available extensions.Debugging
.dbtotxt
Display raw database page contents in hex format. Useful for debugging storage-level issues..dbconfig
Print or set database configuration flags. Currently a no-op in Turso.Documentation
.manual
Display built-in manual pages for Turso features. Call with no argument to list all available manuals..man.