Skip to content
Documentation

Getting started

Create your first Stanza project and add modules.

Scaffold a new monorepo, then layer in modules as you go.

Prerequisites

  • Node.js 22 or newer.
  • A package manager — pnpm (recommended), npm, or bun. Stanza writes a workspace-based monorepo, so a workspace-aware package manager is required.

Create a project

The create command launches an interactive wizard that walks you through each category:

pnpm create stanza my-app

The same command works across package managers:

npm init stanza -- my-app
bun create stanza my-app

To run it without the wizard — in CI, for example — see Non-interactive setup below.

What you get

Stanza generates a clean monorepo: your app under apps/web/ (one of potentially many apps as the registry grows), internal packages under packages/, and a stanza.json manifest at the root. The manifest records the apps in the project, the modules you selected, and which files each one owns — it's how add and remove know what's installed and what to clean up. You generally don't edit it by hand.

Install and run

cd my-app
pnpm install
pnpm dev

Add a module

Every category is one command away — framework, ui, db, orm, auth, tooling, testing, and more:

npx stanza-cli add auth better-auth

Stanza resolves peer constraints, picks the adapter that matches your stack, and writes the module's templates, dependencies, and environment variables into the appropriate place.

Some modules require one or more peer modules to be set up first. Better Auth, for example, peers on framework and orm, so the command above assumes your project already has an ORM like Drizzle or Prisma. If it doesn't, Stanza fails with missing-peer and directs you to add a module from the absent category first.

After adding a module, re-run your package manager's install so the new workspace package(s) are linked:

pnpm install

Inspect and remove

npx stanza-cli list                  # show installed modules, grouped by category
npx stanza-cli doctor                # check the project still matches its manifest
npx stanza-cli search drizzle        # find modules in the registry by query
npx stanza-cli remove auth           # remove a module and sweep the files it owns

stanza search prints each module's category/id pair — use the id, not the display label, when passing it to add.

Non-interactive setup

Pass --yes and select each category explicitly with a flag. Single-choice categories take one id; multi-choice categories (like testing) take a comma-separated list:

npx -y stanza-cli@latest init my-app --yes \
  --framework=next \
  --ui=tailwind \
  --db=postgres \
  --orm=drizzle \
  --auth=better-auth \
  --testing=vitest,playwright \
  --pm=pnpm

--yes never fills in defaults for categories you omit — any category without a flag is simply skipped.

Next steps

  • Concepts — the mental model behind apps, categories, vendoring, peers, and the manifest.
  • CLI reference — every verb, flag, and environment variable.
  • Registry — the roadmap of available modules and how to pull from third-party registries.
  • Authoring — build your own modules and host them in your own registry.
  • Agents — drive Stanza from Claude Code, Codex, Cursor, or any other coding agent.