Get Better Auth Studio up and running in your project.
For the hosted version, please join the waitlist: better-auth.build
Better Auth Studio is currently in beta and in early development. You may encounter bugs or incomplete features. Please report any issues you find on our GitHub repository to help us improve the project. Your feedback is greatly appreciated!
Experience the latest features, patches, and improvements by installing the beta version. The beta includes recent bug fixes, performance enhancements, and new functionality that may not be available in the stable release yet.
As dev dependency (recommended):
pnpm add -D better-auth-studio@betaOr globally:
pnpm add -g better-auth-studio@betaNote: The beta version may include experimental features.
Recommended: Install as dev dependency (for project-specific versions):
pnpm add -D better-auth-studio@latestThis keeps the studio version consistent across your team and project.
Stable version (global):
pnpm add -g better-auth-studio@latestBeta version (recommended, global):
pnpm add -g better-auth-studio@betaOr use pnpx to run it without installation:
pnpx better-auth-studio@beta1. Navigate to your Better Auth project directory
cd your-better-auth-project2. Start the studio
If installed as dev dependency:
pnpm better-auth-studio startOr with pnpx:
pnpx better-auth-studio start3. Open your browser
http://localhost:3000Before using Better Auth Studio, ensure you have:
auth.ts configuration fileBetter Auth Studio automatically detects and works with:
prismaAdapter)drizzleAdapter)new Database() from better-sqlite3)// auth.ts
import { betterAuth } from "better-auth";
import { prismaAdapter } from "better-auth/adapters/prisma";
import { PrismaClient } from "@prisma/client";
const prisma = new PrismaClient();
export const auth = betterAuth({
database: prismaAdapter(prisma, {
provider: "postgresql", // or "mysql", "sqlite"
}),
// ... other config
});// auth.ts
import { betterAuth } from "better-auth";
import { drizzleAdapter } from "better-auth/adapters/drizzle";
import { db } from "./database";
export const auth = betterAuth({
database: drizzleAdapter(db, {
provider: "pg", // or "mysql", "sqlite"
}),
// ... other config
});// auth.ts
import { betterAuth } from "better-auth";
import Database from "better-sqlite3";
export const auth = betterAuth({
database: new Database("./better-auth.db"),
// ... other config
});If installed as dev dependency:
pnpm better-auth-studio start [options]Or with pnpx:
pnpx better-auth-studio start [options]--port <number> - Specify port (default: 3000)--host <string> - Specify host (default: localhost)--no-open - Don't automatically open browser--config <path> - Path to auth config file (default: auto-detect)--watch - Watch for changes in auth config file and reload server automaticallyStart on custom port:
pnpm better-auth-studio start --port 3001Or: pnpx better-auth-studio start --port 3001
Start without opening browser:
pnpm better-auth-studio start --no-openUse custom config file:
pnpm better-auth-studio start --config ./custom-auth.tsEnable watch mode for auto-reload on config changes:
pnpm better-auth-studio start --watchCombine multiple options:
pnpx better-auth-studio start --port 3001 --watch --config ./src/auth.ts--config OptionSpecify a custom path to your auth config file when it's in a non-standard location or auto-detection fails.
Relative or absolute paths:
pnpm better-auth-studio start --config ./src/lib/auth.tspnpm better-auth-studio start --config /path/to/auth.tsNote: TypeScript path aliases (like $lib, $app/*) are automatically resolved based on your tsconfig.json.
--watch OptionAutomatically reload the server when your auth.ts file changes. Ideal for development when iterating on your auth configuration.
Enable watch mode:
pnpx better-auth-studio start --watchHow it works: Monitors your auth config file for changes, automatically restarts the server, and updates the browser UI via WebSocket - no manual refresh needed.
Check version:
pnpx better-auth-studio --versionShow help:
pnpx better-auth-studio --helpClone the repository:
git clone https://github.com/Kinfe123/better-auth-studio.gitcd better-auth-studioInstall dependencies:
pnpm installBuild the project:
pnpm buildStart development server:
pnpm devIf you encounter any issues or have questions: