"Configuration"
Configure your Tether project using `tether.config.ts`.
Configuration file
Create a tether.config.ts in your project root:
import { defineConfig } from 'tthr';
export default defineConfig({
projectId: 'your-project-id',
// Custom API URL (optional — defaults to Tether Cloud)
// url: 'https://your-tether-instance.example.com',
// Schema location
schema: './tether/schema.ts',
// Functions directory
functions: './tether/functions',
// Generated types output
output: './tether/_generated',
// Development server
dev: {
port: 3001,
host: 'localhost',
},
// Database settings
database: {
// WAL mode (recommended for performance)
walMode: true,
},
});
Options reference
projectId
Type: string (required)
Your Tether project ID from the dashboard.
url
Type: string (optional)
Custom Tether API URL. Use this to point the CLI at a self-hosted Tether instance or a development server. If not set, the CLI uses the default Tether Cloud URL (https://tether-api.strands.gg).
Can also be set via the TETHER_API_URL environment variable, which takes precedence over the config value.
export default defineConfig({
url: 'https://my-tether.example.com',
// ...
});
environment
Type: string (optional)
Default environment for deployments and the dev server. If not set, the CLI auto-detects from your TETHER_API_KEY prefix (tthr_dev_ → development, tthr_prod_ → production), or falls back to development.
schema
Type: string (default: "./tether/schema.ts")
Path to your schema definition file.
functions
Type: string (default: "./tether/functions")
Directory containing your query, mutation, and action files.
output
Type: string (default: "./tether/_generated")
Directory for generated TypeScript types.
dev.port
Type: number (default: 3001)
Port for the local development server.
dev.host
Type: string (default: "localhost")
Host for the local development server.
database.walMode
Type: boolean (default: true)
Enable WAL (Write-Ahead Logging) mode for better performance.
Environment variables
You can also configure Tether using environment variables:
| Variable | Description |
|---|---|
TETHER_PROJECT_ID |
Project ID |
TETHER_API_KEY |
API key for deployment |
TETHER_API_URL |
Custom API URL (takes precedence over url in config) |
TETHER_ENV |
Environment (development/production) |
TETHER_DEV |
Set to true to use http://localhost:3001 as the API |
Priority order for the API URL: TETHER_API_URL env var → url in config → TETHER_DEV/NODE_ENV check → default Tether Cloud URL.
The CLI checks tether.config.ts first, then falls back to .env environment variables.