🚀 Big News:Socket Has Acquired Secure Annex.Learn More
Socket
Book a DemoSign in
Socket

auth

Package Overview
Dependencies
Maintainers
1
Versions
48
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

auth

The CLI for Better Auth

latest
Source
npmnpm
Version
1.6.9
Version published
Weekly downloads
20K
-35.77%
Maintainers
1
Weekly downloads
 
Created
Source

Better Auth CLI

Better Auth comes with a built-in CLI to help you manage the database schema needed for both core functionality and plugins.

Init

The CLI includes an init command to add Better Auth to your project.

npx auth@latest init

Generate

The generate command creates the schema required by Better Auth. If you’re using a database adapter like Prisma or Drizzle, this command will generate the right schema for your ORM. If you’re using the built-in Kysely adapter, it will generate an SQL file you can run directly on your database.

npx auth@latest generate

Migrate

The migrate command applies the Better Auth schema directly to your database. This is available if you’re using the built-in Kysely adapter. For other adapters, you’ll need to apply the schema using your ORM’s migration tool.

npx auth@latest migrate

Secret

The CLI also provides a way to generate a secret key for your Better Auth instance.

npx auth@latest secret

License

MIT

Keywords

auth

FAQs

Package last updated on 24 Apr 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts