BetterStarter logo
BetterStarter
Docs
Quick Start

Create Users

Create standard or admin users from the CLI after quick start setup.

Docs are in beta — content is improving rapidly. Found something missing? Open an issue on GitHub or reach out on Twitter (X).

Create Users From CLI

After pnpm setup is complete, use the CLI to create a user record directly in the database.

pnpm setup:user -- --email user@example.com

If --password is not provided, a secure password is generated and printed once.

Examples

Create a standard user.

pnpm setup:user -- --email user@example.com --role user

Create an admin user.

pnpm setup:user -- --email admin@example.com --role admin

Create a user with an explicit password.

pnpm setup:user -- --email user2@example.com --password "StrongPass#2026"

Set a custom display name.

pnpm setup:user -- --email jane@example.com --name "Jane Doe" --role admin

Skip prompts in scripts or CI.

pnpm setup:user -- --yes --email seeded@example.com --role user

Show all command options.

pnpm setup:user -- --help

Flags

FlagRequiredDescription
--emailYesEmail address for the new user
--passwordNoPassword to set. If omitted, a secure password is generated
--nameNoDisplay name. Defaults to a name derived from the email local-part
--roleNouser or admin. Defaults to user
--yesNoSkip interactive prompting when possible

Notes

  • Supported roles are user and admin
  • The command reads .env.local first, then .env.sample as fallback
  • The command requires the auth tables to already exist in Postgres

On this page