Quick Start
The fastest path is a Lux Cloud project plus the SDK. Use direct protocol access when you want raw commands or Redis-compatible tooling.
1. Install the CLI
The CLI manages Cloud projects, local project files, migrations, seeds, and direct command execution.
curl -fsSL https://luxdb.dev/install.sh | sh
lux login2. Create or link a project
lux env pull writes the values your app needs: project URL, auth URL,
publishable key, secret key, and direct Lux URL.
lux create my-app --accept-charges
lux link my-app
lux env pull3. Add schema and seed data
Lux migrations are .lux files. They run against your linked project by
default, or against any direct lux:// URL you pass in.
lux init
lux migrate new create_messages
# edit lux/migrations/<timestamp>_create_messages.lux
TCREATE messages "id INT PRIMARY KEY," "body STR," "owner STR," "created_at STR"
lux migrate run
lux seed run4. Use the SDK
Browser and server project clients go through the Cloud gateway and return { data, error } results.
import { createBrowserClient } from "@luxdb/sdk";
const lux = createBrowserClient(
import.meta.env.VITE_LUX_URL,
import.meta.env.VITE_LUX_PUBLISHABLE_KEY
);
const { data, error } = await lux
.table("messages")
.select()
.order("id", { ascending: false })
.limit(20);
if (error) throw error;
console.log(data);Auth
If Auth is enabled for the project, the same client can sign users in and attach their JWT to future project requests.
const { data, error } = await lux.auth.signInWithPassword({
email: "user@example.com",
password: "correct horse battery staple",
});Run Lux locally
For local self-hosting or direct Redis-compatible tests, run the open-source runtime with a persistent data volume.
docker run -d --name lux -p 6379:6379 -v lux-data:/data ghcr.io/lux-db/lux:latestredis-cli -h 127.0.0.1 -p 6379127.0.0.1:6379> SET hello world
OK
127.0.0.1:6379> GET hello
"world"Next
Read the SDK guide, CLI guide, Auth guide, and Tables guide.