Installation methods
Recommended: Dev dependency
Install Better Auth Studio as a development dependency in your project. This ensures you’re using a project-specific version and keeps your production bundle clean.Global installation
Install Better Auth Studio globally to use it across multiple projects:One-time use with pnpx
Run Better Auth Studio without installing it usingpnpx. This is perfect for trying it out or occasional use:
The first run will download the package, which may take a moment. Subsequent runs will be faster as the package is cached.
Production dependency (self-hosting)
If you’re self-hosting Studio in production, install it as a regular dependency:Verify installation
Check that Better Auth Studio is installed correctly:1.1.3-beta.25).
Requirements
Before installing, ensure you meet these requirements:- Node.js: v18.0.0 or higher
- Better Auth: A project with Better Auth configured
- Database: One of the supported database adapters:
- Prisma (PostgreSQL, MySQL, SQLite)
- Drizzle (PostgreSQL, MySQL, SQLite)
- better-sqlite3
Package details
Package name:better-auth-studio
CLI command: better-auth-studio
Current version: 1.1.3-beta.25 (beta)
License: MIT
Updating
Keep Better Auth Studio up to date to get the latest features and bug fixes.Update dev dependency
Update global installation
Check for updates
View available versions:Available commands
Once installed, you have access to these commands:Start Studio
--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--watch- Watch for changes and auto-reload
Initialize self-hosting
studio.config.ts file and route handler for self-hosting. Learn more in the self-hosting guide.
Show version
Show help
Comparison of installation methods
| Method | Use case | Pros | Cons |
|---|---|---|---|
| Dev dependency | Regular development use | Project-specific version, tracked in package.json | Requires installation per project |
| Global | Use across multiple projects | Available everywhere, single installation | Version management across projects |
| pnpx | Trying it out, occasional use | No installation needed, always latest | Slower first run, no version control |
| Production dependency | Self-hosting in production | Deployed with your app | Larger bundle size |
Troubleshooting
Command not found after global install
Command not found after global install
Make sure your global npm/pnpm bin directory is in your PATH:Add the output directory to your PATH if it’s not already there.
Permission errors on global install
Permission errors on global install
On Unix systems, you might need elevated permissions:Or configure pnpm to use a user-level directory (recommended):
Node version errors
Node version errors
Better Auth Studio requires Node.js v18 or higher. Check your version:If needed, upgrade using nvm or download from nodejs.org.
Package not found with pnpx
Package not found with pnpx
Clear the pnpm cache and try again:
Next steps
Quick start
Get Studio running in your project
Configuration
Learn how to configure your database adapter
Self-hosting
Deploy Studio with your application
CLI reference
Explore all available CLI commands and options