tursodb is an interactive SQL shell for Turso, similar to the sqlite3 CLI. It lets you open databases, run SQL statements, and inspect schema — all from the terminal. It also doubles as an MCP server for AI assistant integration.
Installation
- curl (recommended)
- Homebrew
- Cargo (from source)
tursodb.
Starting the shell
In-memory mode
Runtursodb with no arguments to start a transient in-memory database. All data is discarded when you exit.
File mode
Pass a path to open (or create) a persistent database file.Read-only mode
Open an existing database without allowing any writes:Example session
Command line options
| Option | Short | Description |
|---|---|---|
DATABASE | — | Path to the SQLite database file. Defaults to an in-memory database (:memory:). |
SQL | — | Optional SQL statement to execute non-interactively, then exit. |
--output-mode <mode> | -m | Output format. pretty (default) renders a bordered table; list produces pipe-separated rows; line prints one column per line. |
--output <file> | -o | Write output to a file instead of stdout. |
--quiet | -q | Suppress the startup banner. |
--echo | -e | Print each command before executing it. |
--vfs <name> | -v | Select the VFS backend. Options: syscall (default), memory, io_uring (Linux only, if feature enabled). |
--readonly | — | Open the database in read-only mode. Writes are rejected. |
--mcp | — | Start an MCP server instead of the interactive shell. |
--sync-server <addr> | — | Start a sync server listening at the given address (e.g. 0.0.0.0:8080) instead of the interactive shell. |
--experimental-encryption | — | Enable encryption at rest (experimental — do not use with critical data). |
--experimental-views | — | Enable the experimental views feature (not production-ready). |
--experimental-custom-types | — | Enable CREATE TYPE / DROP TYPE custom type definitions (experimental). |
--experimental-index-method | — | Enable the experimental custom index method feature. |
--experimental-autovacuum | — | Enable the experimental autovacuum feature. |
--experimental-attach | — | Enable the experimental ATTACH DATABASE feature. |
--tracing-output <file> | -t | Write log traces to the specified file. |
--help | -h | Print help and exit. |
--version | -V | Print the version number and exit. |
Output modes
.mode command.
Turso is currently in beta. It may contain bugs and unexpected behavior. Avoid using it with critical production data without backups.