Generator and Presets

Generator and Presets

create-nextdevtpl produces a standalone project. It copies the template, resolves module dependencies, removes unselected source and packages, composes the database schema and translations, and writes environment and deployment files. The generated app has no runtime dependency on the generator.

Basic command

Node.js 24 and pnpm 10 are required:

pnpm dlx create-nextdevtpl@latest my-app --preset saas --target vercel

The current CLI is flag-driven. Omitting --preset uses minimal; omitting the target uses the preset default. List every option with:

pnpm dlx create-nextdevtpl@latest --help

Official presets

PresetBest forDefault targetMain selection
minimalStarting from a small shellserverAuth, dashboard, disabled mail, no-op rate limit
saasA conventional subscription productvercelMarketing, settings, admin, support, Creem, S3, Resend, Inngest, Upstash
ai-saasAn AI SaaS on CloudflarecloudflareFull product surface, Stripe, R2, Email Binding, Workers AI, Workflows, native rate limits
customExact source controlserverModules and adapters supplied with flags

Preset services and targets can be overridden:

pnpm dlx create-nextdevtpl@latest my-app \
  --preset saas \
  --target docker \
  --payment stripe \
  --mail smtp \
  --rate-limit noop

Custom selection

pnpm dlx create-nextdevtpl@latest my-app \
  --preset custom \
  --modules auth,analytics,operations \
  --target docker \
  --payment stripe \
  --alerts webhook \
  --analytics posthog \
  --rate-limit noop

See Feature Modules and Service Adapters for valid choices. Dependencies are added automatically. Worker-only adapters require the cloudflare target; Node-only adapters are rejected for that target.

Common flags

FlagValues
--presetminimal, saas, ai-saas, custom
--modulesComma-separated module IDs for a custom selection
--targetserver, docker, vercel, cloudflare
--paymentcreem, stripe, none
--storages3-compatible, r2-binding, none
--maildisabled, resend, smtp, cloudflare-email
--aiopenai-compatible, anthropic, workers-ai, none
--alertsnoop, email, webhook (with operations)
--analyticsnoop, logger, posthog, ga4, umami, none
--jobsinngest, cloudflare-workflows, none
--rate-limitnoop, upstash, cloudflare-rate-limit
--no-installGenerate files without installing dependencies

After generation

nextdevtpl.generated.json records the effective selection without secrets. Inspect it, copy .env.example, and fill only the variables that remain:

Set-Location my-app
Get-Content nextdevtpl.generated.json
Copy-Item .env.example .env.local
pnpm db:push
pnpm dev

Keep nextdevtpl.generated.json; it recreates the same comparison project for future upgrades.

On this page