Quickstart
Get up and running with AetherDB in under 5 minutes.
1. Install the SDK
npm install aetherdb-js2. Create an account
Register a new account. Your isolated database schema is provisioned automatically.
import { AetherDB } from 'aetherdb-js'
const db = new AetherDB({ url: 'https://aetherdb.cloud' })
// Register — your isolated schema is created instantly
const user = await db.register('you@example.com', 'your-password')
console.log(user.schema) // tenant_423. Sign in
const { access_token, user } = await db.signIn('you@example.com', 'your-password')
console.log(user.schema) // tenant_424. Create a table
await db.createTable('products', [
{ name: 'title', type: 'TEXT', nullable: false },
{ name: 'price', type: 'NUMERIC', nullable: false },
{ name: 'description', type: 'TEXT', nullable: true },
])5. Insert data
const { id } = await db.from('products').insert({
title: 'Pro Plan',
price: 29.99,
description: 'Full access to all features'
})
console.log(id) // 16. Query your data
// Standard query
const { rows } = await db.from('products').select('*').execute()
// AI query — plain English
const result = await db.ai('show me all products under $30')
console.log(result.generated_sql) // SELECT * FROM products WHERE price < 30 LIMIT 100
console.log(result.rows) // your data7. Get your connection string
Connect directly to your isolated schema with any Postgres client.
const info = await db.getTenantInfo()
console.log(info.connection_string)
// postgres://user:pass@aetherdb.cloud:5432/aetherdb?search_path=tenant_42