ChaiBuilder Logo

CLI

ChaiBuilder's command-line tool is the scaffolder: it creates a fully functional project in one command. Day-to-day project commands (build, migrate, seed) are ordinary package scripts, listed at the bottom of this page.

Prefer a browser over a terminal? The starter's built-in /setup wizard does the same setup work - on a one-click deployment or on a locally cloned starter. See the Quickstart for both paths.

npx chaibuilder-app create

npx chaibuilder-app create

Creates a new ChaiBuilder project. The wizard walks through three phases and leaves you with a runnable app - template downloaded, environment written, dependencies installed, migrations run, database seeded.

[1/3] Database setup

Pick a project name, then choose a database:

  • Local file - SQLite at file:./local.db, created for you. Zero configuration.
  • Remote (libSQL / Turso) - provide a libsql://… URL and auth token; the connection is verified before continuing.

The choice is written into the project's environment. You can move from a local file to Turso (or another database) later, and running on Postgres is a matter of pointing DATABASE_URL at your Postgres connection string - see Database Setup.

[2/3] Create admin user

Enter an admin email and password. This becomes your login for the builder and CMS - there is no separate signup step.

[3/3] Install and prepare

The scaffolder detects your package manager (defaulting to pnpm), installs dependencies, runs migrations, and seeds the database. It prints the exact commands to start the app when it finishes:

cd my-app
pnpm run dev

Telemetry

The CLI sends anonymous usage events (command run, success/failure) to help improve the tool. No project content, credentials, or personal data is collected.

Project commands

Inside a generated project, the CLI hands over to package scripts:

Command What it does
pnpm dev start the dev server
pnpm build production build
pnpm start serve the production build
pnpm payload migrate:create generate a migration after schema/SDK changes
pnpm payload migrate apply pending migrations
pnpm seed seed a fresh database
pnpm lint run ESLint

pnpm payload exposes the full Payload CLI (types generation, import map, and more).

© ChaiBuilder. All rights reserved.