[go: up one dir, main page]

Skip to content

WilsonNet/turso-cli

 
 

Repository files navigation

Turso CLI

Go License

This is the command line interface (CLI) to Turso.

Installation

Package Manager

Homebrew (macOS, Linux, WSL)

brew install chiselstrike/tap/turso

Also remember to configure homebrew shell completions if you haven't already done so.

To upgrade an existing installation of the CLI, run:

brew upgrade turso

Install Script

curl -sSfL https://get.tur.so/install.sh | bash

Building from Sources

cd cmd/turso && go install

Usage

Authentication

If you are a new user, you can sign up with:

turso auth signup

If you already have an account, authenticate with:

turso auth login

You are taken to a web page in your default browser to authenticate via GitHub. After succesfully authenticated, turso auth login receives an access token that is stored on your settings file.

Create database

To create a database, run:

turso db create

You can configure the database name with:

turso db create <database name>

Start SQL shell

You can start an interactive SQL shell similar to sqlite3 with:

turso db shell <database name>

Replicate database

First, list available locations and pick a location you want to replicate to:

turso db locations

Then, to replicate a database, run:

turso db replicate <database name> <location>

List databases

To list your databases, run:

turso db list

Delete database

turso db destroy <database name>

Settings

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

About

Command line interface to Turso.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 95.9%
  • HTML 2.2%
  • Shell 1.9%