Skip to main content
Dot commands are special instructions that start with a . and control the shell itself rather than querying the database. They do not require a trailing semicolon.

Quick reference

CommandDescription
.helpShow the help message listing all available commands.
.quitExit the shell.
.exit [CODE]Exit the shell with an optional return code.
.open FILENAME [VFS]Open (or create) a database file.
.schema [TABLE]Display the CREATE statement for a table or for all objects.
.dumpDump the entire database as SQL statements.
.tables [PATTERN]List tables, optionally filtered by a glob pattern.
.databasesList attached databases.
.mode MODESet the output mode (pretty, list, or line).
.output [FILE]Redirect output to a file, or back to stdout if no argument.
.headers on|offShow or hide column headers in list mode.
.nullvalue VALUEString to display in place of NULL in list mode.
.echo on|offPrint each command before executing it.
.showPrint the current values of all shell settings.
.import [--csv] FILE TABLEImport data from a CSV file into a table.
.load PATHLoad a compiled extension library (.so / .dylib / .dll).
.indexes [TABLE]List indexes, optionally for a specific table.
.stats [on|off] [-r]Display or toggle execution statistics. -r resets after display.
.timer on|offToggle query execution timing.
.vfslistList available VFS modules.
.cd DIRECTORYChange the shell working directory.
.opcodes [NAME]Show VDBE opcode descriptions, optionally filtered by name.
.clone OUTPUT_FILEClone the open database to another file.
.read FILEExecute SQL statements from a file.
.parameter set|list|clearManage named SQL parameter bindings.
.manual [PAGE]Display built-in manual pages. .man with no argument lists all pages.
.dbtotxt [--page N]Print raw database page contents as text.

Database and file management

.open FILENAME [VFS]

Open or create a database file. If the file does not exist it is created.
turso> .open employees.db
turso> .open employees.db memory
Use .open :memory: to switch to an in-memory database within the same session.

.clone OUTPUT_FILE

Clone the currently open database to a new file without closing it.
turso> .clone backup.db

.read FILE

Execute all SQL statements from a file.
turso> .read migrations/001_create_tables.sql

Schema inspection

.schema [TABLE]

Display the CREATE statement for a table. Without an argument, shows all objects.
turso> .schema users
CREATE TABLE users (id INTEGER PRIMARY KEY, name TEXT, email TEXT);
turso> .schema
CREATE TABLE users (id INTEGER PRIMARY KEY, name TEXT, email TEXT);
CREATE TABLE posts (id INTEGER PRIMARY KEY, user_id INT, body TEXT);

.tables [PATTERN]

List all tables. An optional glob pattern filters the results.
turso> .tables
users   posts   comments
turso> .tables us%
users

.indexes [TABLE]

List all indexes in the database. With a table name, shows only indexes for that table.
turso> .indexes
turso> .indexes users

.databases

List all attached databases.
turso> .databases
main: employees.db

Data export

.dump

Dump the entire database as a sequence of SQL statements. Useful for backups or migrating data.
turso> .dump
BEGIN TRANSACTION;
CREATE TABLE users (id INTEGER PRIMARY KEY, name TEXT, email TEXT);
INSERT INTO users VALUES(1,'Alice','alice@example.com');
INSERT INTO users VALUES(2,'Bob','bob@example.com');
COMMIT;

Data import

.import [--csv] FILE TABLE

Import data from a file into a table. Use --csv for CSV files.
turso> .import --csv data/users.csv users

Output mode

.mode MODE

Change how query results are displayed. Available modes:
ModeDescription
prettyBordered table with aligned columns (default).
listPipe-separated values, matching SQLite’s default format.
lineOne column per line in name = value format.
turso> .mode list
turso> SELECT * FROM users;
1|Alice|alice@example.com
2|Bob|bob@example.com
turso> .mode pretty
turso> SELECT * FROM users;
┌────┬───────┬───────────────────┐
│ id │ name  │ email             │
├────┼───────┼───────────────────┤
│ 1  │ Alice │ alice@example.com │
├────┼───────┼───────────────────┤
│ 2  │ Bob   │ bob@example.com   │
└────┴───────┴───────────────────┘

.headers on|off

Toggle column headers in list mode.
turso> .mode list
turso> .headers on
turso> SELECT * FROM users;
id|name|email
1|Alice|alice@example.com

.nullvalue VALUE

Set the string printed in place of NULL in list mode.
turso> .nullvalue NULL
turso> SELECT NULL;
NULL

.output [FILE]

Redirect query output to a file. Call .output with no argument to restore stdout.
turso> .output results.txt
turso> SELECT * FROM users;
turso> .output

Shell settings

.show

Print the current values of all shell settings.
turso> .show
Settings:
Output mode: pretty
DB: employees.db
Output: STDOUT
Null value:
CWD: /home/user/project
Echo: off
Headers: off

.echo on|off

Print each command to stdout before executing it.
turso> .echo on
turso> SELECT 1;
SELECT 1;
1

.timer on|off

Toggle timing output after each statement.
turso> .timer on
turso> SELECT count(*) FROM users;
42
Run Time: 0.001s

.stats [on|off] [-r]

Display execution statistics. Pass on or off to enable automatic stats after every query. The -r flag resets counters after displaying them.

.cd DIRECTORY

Change the shell’s current working directory.
turso> .cd /tmp

Extensions and VFS

.load PATH

Load a compiled extension shared library.
turso> .load /target/debug/liblimbo_regexp

.vfslist

List all available VFS (Virtual File System) modules.
turso> .vfslist
syscall
memory

Parameter bindings

.parameter set|list|clear

Manage named SQL parameter bindings for use in subsequent queries.
turso> .parameter set :name alice
turso> SELECT * FROM users WHERE name = :name;
┌────┬───────┬───────────────────┐
│ id │ name  │ email             │
├────┼───────┼───────────────────┤
│ 1  │ Alice │ alice@example.com │
└────┴───────┴───────────────────┘
turso> .parameter list
:name = alice
turso> .parameter clear :name
turso> .parameter clear
Accepted parameter name styles: :name, @name, $name, ?1.

Diagnostics

.opcodes [NAME]

Show VDBE bytecode opcode descriptions. With no argument, lists all opcodes.
turso> .opcodes Goto
Goto: Jump to instruction P2.

.dbtotxt [--page N]

Print raw database page contents as text. Use --page N to inspect a specific page number.
turso> .dbtotxt --page 1

Built-in manual

.manual [PAGE]

Display built-in manual pages for specific features. Without an argument (or with .man), lists all available pages.
turso> .manual mcp
turso> .man

Exiting the shell

Use .quit or .exit to leave the shell. .exit CODE exits with a specific return code.
turso> .quit
turso> .exit 1
You can also press Ctrl-D (EOF) to exit, or press Ctrl-C twice to force quit.

Build docs developers (and LLMs) love