"Commands"

The Tether CLI handles project setup, migrations, and deployment.

Installation

npm install -g tthr

After installation, the tthr command is available globally.

Commands

tthr init <name>

Create a new Tether project.

tthr init my-app

# With template
tthr init my-app --template todo

tthr dev

Start the local development server with hot reloading.

tthr dev

# With specific port
tthr dev --port 3002

tthr generate

Generate TypeScript types from your schema.

tthr generate

Creates tether/_generated/db.ts and tether/_generated/api.ts.


tthr migrate create

Create a migration from schema changes.

tthr migrate create

# With name
tthr migrate create --name add-users-table

tthr migrate up

Apply pending migrations.

tthr migrate up

tthr migrate down

Roll back the last migration.

tthr migrate down

tthr migrate status

Show migration status.

tthr migrate status

tthr deploy

Deploy schema and functions to Tether Cloud.

The target environment is resolved automatically from your TETHER_API_KEY in .env (e.g. a tthr_prod_* key deploys to production). You can override with -e:

tthr deploy

# Deploy schema only
tthr deploy --schema

# Deploy functions only
tthr deploy --functions

# Deploy to a specific environment
tthr deploy -e production

# Preview what would be deployed
tthr deploy --dry-run

tthr exec <sql>

Execute a SQL query directly against your project database.

tthr exec "SELECT * FROM users LIMIT 10"

# Check table schema
tthr exec "PRAGMA table_info(users)"

tthr update

Update all Tether packages to the latest version.

tthr update

# Preview changes without updating
tthr update --dry-run

tthr login

Authenticate with Tether Cloud.

tthr login

tthr logout

Log out from Tether Cloud.

tthr logout

tthr whoami

Show the currently authenticated user.

tthr whoami