Giter Club home page Giter Club logo

x-oss-byte-_-turso-cli's Introduction

Turso CLI

Go License

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

Documentation

There is reference documentation available.

For a guided walkthrough, follow the Turso CLI tutorial.

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 source

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 successfully authenticated, turso auth login receives an access token that is stored on your settings file.

Create database

To create a database with a generated name, run:

turso db create

Or you can specify the name of the database 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>

Run SQL command without interactive shell

You can also run a command without using the interactive SQL shell:

turso db shell <database name> <sql query>

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/turso

x-oss-byte-_-turso-cli's People

Contributors

athoscouto avatar avinassh avatar bearlemma avatar codingdoug avatar glommer avatar gris avatar haaawk avatar honzasp avatar horusiath avatar jmwoliver avatar mr-destructive avatar penberg avatar phenpessoa avatar psarna avatar stefanosaffran avatar viniciuslacerda0 avatar wilsonnet avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.