INSTALLATION

Get Better Auth Studio up and running in your project.

Hosted Version

For the hosted version, please join the waitlist: better-auth.build

Beta Version Notice

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!

Try the Beta Version

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@beta

Or globally:

pnpm add -g better-auth-studio@beta

Note: The beta version may include experimental features.

QUICK START

Installation

Recommended: Install as dev dependency (for project-specific versions):

pnpm add -D better-auth-studio@latest

This keeps the studio version consistent across your team and project.

Stable version (global):

pnpm add -g better-auth-studio@latest

Beta version (recommended, global):

pnpm add -g better-auth-studio@beta

Or use pnpx to run it without installation:

pnpx better-auth-studio@beta

Basic Usage

1. Navigate to your Better Auth project directory

cd your-better-auth-project

2. Start the studio

If installed as dev dependency:

pnpm better-auth-studio start

Or with pnpx:

pnpx better-auth-studio start

3. Open your browser

  • The studio will automatically open at http://localhost:3000
  • Or manually navigate to the URL shown in the terminal

PREREQUISITES

Prerequisites

Before using Better Auth Studio, ensure you have:

  • Node.js (v18 or higher)
  • A Better Auth project with a valid auth.ts configuration file
  • Database setup (Prisma, Drizzle, or SQLite)

CONFIGURATION

Supported Database Adapters

Better Auth Studio automatically detects and works with:

Prisma (prismaAdapter)
Drizzle (drizzleAdapter)
SQLite (new Database() from better-sqlite3)
PostgreSQL (via Prisma or Drizzle)
MySQL (via Prisma or Drizzle)

Example Configuration Files

Prisma Setup

// 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
});

Drizzle Setup

// 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
});

SQLite Setup

// auth.ts
import { betterAuth } from "better-auth";
import Database from "better-sqlite3";

export const auth = betterAuth({
  database: new Database("./better-auth.db"),
  // ... other config
});

FEATURES

Dashboard

  • Overview statistics - User counts, organization counts, session data

User Management

  • View all users - Paginated list with search and filtering
  • Create users - Add new users with email/password
  • Edit users - Update user information, email verification status
  • Delete users - Remove users from the system
  • Bulk operations - Seed multiple test users
  • User details - View user profiles, and accounts

Organization Management

  • View organizations - List all organizations with pagination
  • Create organizations - Add new organizations with custom slugs
  • Edit organizations - Update organization details
  • Delete organizations - Remove organizations
  • Team management - Create and manage teams within organizations
  • Member management - Add/remove members from teams
  • Bulk seeding - Generate test organizations and teams

Settings & Configuration

  • Plugin status - Check which Better Auth plugins are enabled
  • Database configuration - View current database adapter and settings
  • Social providers - Configure OAuth providers (GitHub, Google, etc.)
  • Email settings - Configure email verification and password reset

COMMAND LINE OPTIONS

Start Studio

If installed as dev dependency:

pnpm better-auth-studio start [options]

Or with pnpx:

pnpx better-auth-studio start [options]

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 automatically

Examples:

Start on custom port:

pnpm better-auth-studio start --port 3001

Or: pnpx better-auth-studio start --port 3001

Start without opening browser:

pnpm better-auth-studio start --no-open

Use custom config file:

pnpm better-auth-studio start --config ./custom-auth.ts

Enable watch mode for auto-reload on config changes:

pnpm better-auth-studio start --watch

Combine multiple options:

pnpx better-auth-studio start --port 3001 --watch --config ./src/auth.ts

Using the --config Option

Specify 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.ts
pnpm better-auth-studio start --config /path/to/auth.ts

Note: TypeScript path aliases (like $lib, $app/*) are automatically resolved based on your tsconfig.json.

Using the --watch Option

Automatically 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 --watch

How it works: Monitors your auth config file for changes, automatically restarts the server, and updates the browser UI via WebSocket - no manual refresh needed.

Other Commands

Check version:

pnpx better-auth-studio --version

Show help:

pnpx better-auth-studio --help

Running from Source

Clone the repository:

git clone https://github.com/Kinfe123/better-auth-studio.git
cd better-auth-studio

Install dependencies:

pnpm install

Build the project:

pnpm build

Start development server:

pnpm dev

Contributing

  1. 1.Fork the repository
  2. 2.Create a feature branch
  3. 3.Make your changes
  4. 4.Add tests if applicable
  5. 5.Submit a pull request

Support & Help

If you encounter any issues or have questions:

  • Search existing issues on GitHub
  • Create a new issue with detailed information