Install and scaffold
Scaffolding asks four questions, then a Kywi project needs a database and a migration before it serves anything, and a seed before you can log in.
One command scaffolds a project. Answer, or skip straight past, four questions — project name, database provider (postgresql or mysql), auth providers (any of credentials, google, github, comma-separated), and deployment mode (coupled, headless or decoupled — see Coupled, headless, decoupled). Each has its own flag (--db, --auth, --mode), and --yes/-y takes every default and asks nothing.
pnpm
pnpm dlx create-kywi-app my-sitenpm
npx create-kywi-app my-siteyarn
yarn dlx create-kywi-app my-sitebun
bunx create-kywi-app my-siteIt refuses to run into a directory that already has files in it, rather than merging into one — pick an empty or new directory name.
Getting it running
The scaffold prints its own next steps, in this order, and each step depends on the one before it:
cd my-site
pnpm install
createdb my_site
cp .env.example .env # set DATABASE_URL + AUTH_SECRET
pnpm migrate
pnpm seed # prints the superadmin credentials
pnpm dev # http://localhost:3000/ already renders once pnpm migrate finishes — the migration step also creates your site's database row, with a published home page attached, so there is a page to serve before you have ever logged in. pnpm seed is what gets you an account to log in with.
pnpm migrate and pnpm seed are the project's own kywi migrate / kywi seed scripts — the CLI prints them literally, regardless of which package manager you scaffolded with. drizzle-kit, drizzle-orm and tsx are dev-dependencies of your project rather than of core because kywi migrate shells out to drizzle-kit against the schema generated into kywi-generated/, and loads your kywi.config.ts through the tsx loader. A plain kywi migrate bootstraps the migration journal on its first run — writing kywi-generated/migrations/ and its meta/_journal.json — so a fresh project is journal-managed from the start; commit that directory, since it is the project's reviewable schema history. The bootstrap migration is idempotent, so running it against a database that already has tables in it (one you built with drizzle-kit push, say) applies cleanly instead of conflicting.
Next: Your first site covers what the seed actually created. For the day-to-day loop — what needs a restart and what doesn't — see The local dev loop; for moving to a newer core later, see Upgrading between minor versions.