Quick Start

Get up and running with Tether in under 5 minutes.

1. Install the CLI

npm install -g tthr

2. Create a new project

tthr init my-app
cd my-app

This asks which framework and package manager to use, then scaffolds the app, creates the project on Tether and deploys a demo. To skip the prompts, pass them as flags:

tthr init my-app --template nuxt --pm pnpm

See tthr init for every option.

3. Define your schema

Open tether/schema.ts and define your tables:

import { defineSchema, text, integer, boolean, timestamp } from '@tthr/schema';

export default defineSchema({
  todos: {
    title: text().notNull(),
    completed: boolean().default(false),
    dueDate: timestamp(),
  },
});

4. Start the dev server

tthr dev

This watches your tether/ directory for changes and deploys functions to the development environment automatically.

5. Connect from your app

Install the SDK for your framework:

# Vue/Nuxt
npm install @tthr/vue

# React
npm install @tthr/react

# Svelte
npm install @tthr/svelte

# Vanilla JS
npm install @tthr/client

Configure the Nuxt module (for Vue/Nuxt projects):

// nuxt.config.ts
export default defineNuxtConfig({
  modules: ['@tthr/vue'],
  tether: {
    projectId: 'your-project-id',
    url: 'https://api.tetherdb.co.uk',
  },
});