Guide · Open source
How to use Turso: install, open a database and run SQL
Updated · written with AI from the project's own documentation and checked against our catalogue data
Turso is an in-process SQL database written in Rust that is compatible with SQLite. This guide shows you how to install it, open a database file, run SQL from the command line, and call it from Rust, JavaScript or Python. By the end you will know which parts are ready to use and which are still experimental.
Quick start
- 1Choose your route. Decide whether you want the command-line shell, the Rust crate, the JavaScript package or the Python package.
- 2Install the package. Run the matching install command: the curl script for the CLI, cargo add turso, npm i @tursodatabase/database, or uv pip install pyturso.
- 3Start the shell. Run tursodb to open an in-memory database, or use .open FILENAME to open a persistent one.
- 4Create a table and insert rows. Run CREATE TABLE and INSERT statements at the turso prompt to add data.
- 5Query from your code. Open sqlite.db from your chosen language binding and run a SELECT against the same table.
- 6Check experimental features. Before using Postgres mode, encryption or full-text search in production, read the linked compatibility references.
What Turso is and when it fits
Turso runs inside your application rather than as a separate server. It is designed to read and write SQLite-compatible files, and the project says it runs in production today at multiple organizations.
Some features are still experimental, including the Postgres frontend, encryption at rest, and full-text search. Vector indexing is listed only on the roadmap, so it is not available yet.
- Good fit: embedded SQLite-compatible storage in Rust, JavaScript, Python, Java, Go or .NET projects
- Good fit: experiments with concurrent writes via MVCC (BEGIN CONCURRENT)
- Not a fit yet: teams that need a long-established, production-proven database today
Install Turso on your machine
Pick the install route that matches your project. The command-line shell is installed with a curl script from the project's releases. Rust projects use cargo, JavaScript projects use npm, and Python projects use uv.
The Rust route needs a Rust toolchain, the JavaScript route needs Node.js, and the Python route needs Python with uv. These are the prerequisites listed for each route.
- Command-line shell: run the installer script below
- Rust crate: cargo add turso
- JavaScript package: npm i @tursodatabase/database
- Python package: uv pip install pyturso
curl --proto '=https' --tlsv1.2 -LsSf \
https://github.com/tursodatabase/turso/releases/latest/download/turso_cli-installer.sh | shOpen the shell and run your first SQL
After installing, start the interactive shell by running tursodb. With no file given, it opens a transient in-memory database, so nothing is saved. Use .open FILENAME to switch to a persistent database.
The example below creates a table, inserts two rows and queries them. Each line after the prompt is one statement.
- .help shows usage hints inside the shell
- .open FILENAME reopens the session on a persistent database
$ tursodb
turso> CREATE TABLE users (id INT, username TEXT);
turso> INSERT INTO users VALUES (1, 'alice');
turso> INSERT INTO users VALUES (2, 'bob');
turso> SELECT * FROM users;
1|alice
2|bobUse Turso from Rust, JavaScript or Python
Each language binding follows the same pattern: open a database file, get a connection, then run a query. The examples below use the file name sqlite.db and a users table, as in the project README.
In Rust, you build a local database and connect to it. In JavaScript, connect returns a database object you can prepare statements on. In Python, turso.connect gives you a connection with a cursor.
// Rust
let db = Builder::new_local("sqlite.db").build().await?;
let conn = db.connect()?;
let res = conn.query("SELECT * FROM users", ()).await?;
// JavaScript
import { connect } from '@tursodatabase/database';
const db = await connect('sqlite.db');
const stmt = db.prepare('SELECT * FROM users');
const users = stmt.all();
// Python
import turso
con = turso.connect("sqlite.db")
cur = con.cursor()
res = cur.execute("SELECT * FROM users")
print(res.fetchone())Know which features are stable and which are experimental
The README separates shipped features from experimental ones. SQLite compatibility covers the SQL dialect, file formats and C API, and the project tracks SQLite version 3.50.4. Change data capture, Go, Java, .NET, Python, Rust and WebAssembly bindings, and asynchronous I/O on Linux with io_uring are listed as features.
Postgres compatibility, encryption at rest, incremental computation with DBSP, full-text search and multi-process WAL coordination are marked experimental. Check the linked compatibility documents before relying on any of them.
- Stable-listed: SQLite compatibility, BEGIN CONCURRENT, change data capture, multi-language bindings
- Experimental: Postgres frontend, encryption at rest, DBSP incremental views, full-text search, .tshm WAL coordination
- Roadmap only: vector indexing for approximate search
What people use it for
- Embedding a SQLite-compatible database inside a Rust application
- Running a local-first app that needs change data capture
- Experimenting with concurrent writes using BEGIN CONCURRENT
- Running a database in the browser through WebAssembly
- Using one SQL engine from Python, JavaScript or Go services
Frequently asked questions
Is Turso free to use?
The project is released under the MIT licence, as stated in the repository. Check the LICENSE.md file in the repository for the full terms before using it in a commercial product.
Is Turso the same as SQLite?
No. Turso is written in Rust and is designed to be compatible with SQLite's SQL dialect, file formats and C API. It also adds features such as BEGIN CONCURRENT and an experimental Postgres frontend.
How do I install Turso?
Use the install command for your route: the curl installer for the turso CLI, cargo add turso for Rust, npm i @tursodatabase/database for JavaScript, or uv pip install pyturso for Python.
What do I need before installing Turso?
The Rust route needs a Rust toolchain. The npm package needs Node.js, and the Python package needs Python with uv. The CLI route uses a curl command from the project releases.
Is Turso production ready?
The README says Turso runs in production at multiple organizations, but it also marks Postgres compatibility, encryption and several other features as experimental, and the project is still heading toward 1.0. Test the features you depend on.
Does Turso support vector search?
Only partly. The README lists exact vector search and vector manipulation as a feature, while vector indexing for fast approximate search is on the roadmap and not yet available.
New agent skills, repos and AI tools — every week
The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.
Our verdict
Turso suits developers who want an embedded, SQLite-compatible database in Rust or another supported language and are comfortable with some experimental features. Teams that need a mature, long-established database with proven guarantees should choose SQLite or another production-proven option for now.
Install options & downloads