Skip to content

feat: CLI to create turso db and set values in your local .env file #336

@vtempest

Description

@vtempest

https://github.com/OpenSourceAGI/StarterDOCS/tree/master/packages/create-cloud-db

https://www.npmjs.com/package/create-cloud-db

create-cloud-db is a small CLI that creates a Turso database and manages the TURSO_DATABASE_URL and TURSO_AUTH_TOKEN values in your local .env file.

It is designed for quick local setup so you can be ready to connect from Node, frameworks, or serverless environments with minimal manual configuration.

Installation
You must first login to turso with:

bun i -g turso
turso auth login

or

bun x turso auth login
Then run:

will ask for name

npx create-cloud-db

npx create-cloud-db [myapp-db]
Or install globally:

npm install -g create-cloud-db
create-cloud-db myapp-db
What it does
When you run the command, the CLI:

Ensures you are logged into Turso via turso auth login.
Creates a Turso database if it does not already exist.
Generates a database URL and an auth token via the Turso CLI.
Overwrites (not appends) the TURSO_DATABASE_URL and TURSO_AUTH_TOKEN entries in your local .env file.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions