This is the command line interface (CLI) to Turso.
There is reference documentation available.
For a guided walkthrough, follow the Turso Quickstart docs.
Homebrew (macOS, Linux, WSL)
brew install tursodatabase/tap/tursoAlso remember to configure homebrew
shell completions if you haven't
already done so.
To upgrade an existing installation of the CLI, run:
brew upgrade tursocurl -sSfL https://get.tur.so/install.sh | bashgo install github.com/tursodatabase/turso-cli/cmd/turso@latestcd cmd/turso && go installIf you are a new user, you can sign up with:
turso auth signupIf you already have an account, authenticate with:
turso auth loginYou are taken to a web page in your default browser to authenticate via GitHub.
After successfully authenticated, turso auth login receives an access token
that is stored on your settings file.
To create a database with a generated name, run:
turso db createOr you can specify the name of the database with:
turso db create <database name>You can start an interactive SQL shell similar to sqlite3 with:
turso db shell <database name>You can also run a command without using the interactive SQL shell:
turso db shell <database name> <sql query>First, list available locations and pick a location you want to replicate to:
turso db locationsThen, to replicate a database, run:
turso db replicate <database name> <location>To list your databases, run:
turso db listturso db destroy <database name>The turso program keeps settings in your local machine in the following base
directory in turso/settings.json file:
| OS | Config directory |
|---|---|
| Linux | $XDG_CONFIG_HOME or $HOME/.config |
| macOS | $HOME/Library/Application Support/turso |