Generator and Presets
Generator and Presets
create-nextdevtpl copies the selected skin and application source during generation, resolves module dependencies in full mode, prunes unselected code, and writes nextdevtpl.generated.json. The generated project is independent source and does not install or call the generator at runtime.
Node.js 24 and pnpm 10 are required. Show the options shipped with the current CLI:
pnpm dlx create-nextdevtpl@4.0.0 --help
Full Mode
Full mode is the default. Choose a preset and target:
pnpm dlx create-nextdevtpl@4.0.0 my-app --preset saas --target vercel
| Preset | Default target | Main surface |
|---|---|---|
minimal | server | Authentication and basic workspace pages |
saas | vercel | Marketing, auth, settings, admin, support, subscriptions, and credits |
ai-saas | cloudflare | SaaS pages plus AI, blog, and PSEO |
custom | server | Explicitly selected modules and services |
Full mode supports server, docker, vercel, and cloudflare. Module dependencies are included automatically. Worker-only adapters require the cloudflare target; Node-only adapters cannot be used on that target.
pnpm dlx create-nextdevtpl@4.0.0 my-app \
--preset custom \
--modules auth,analytics,operations \
--target docker \
--payment stripe \
--analytics posthog
Older full-project records without a mode field are still treated as full projects. New records explicitly contain mode: "full".
Demo Mode
Demo mode retains 17 user-facing routes and 20 skin views and supports only the server target. The target defaults to server when omitted.
pnpm dlx create-nextdevtpl@4.0.0 my-demo --mode demo --target server
Demo mode rejects explicit --preset, --modules, and service-adapter flags. Skin sources and --palette remain available, with palettes limited to the built-in default skin. Demo mode has no database, business APIs, Server Actions, backend services, or business environment variables. Local interactions update only in-memory state for the current tab; refreshing restores the default sample. Demo mode is not a static export.
Select a Skin
Omitting --skin is equivalent to --skin default. Three source forms are accepted:
| Source | Flag |
|---|---|
| Built-in default skin | --skin default |
| Local directory | --skin ./my-skin |
| Remote HTTPS archive | --skin https://example.test/skin.tgz --skin-sha256 <64-digit-SHA-256> |
The remote URL must be a plain HTTPS URL without credentials, query, or fragment; the archive SHA-256 is required. Use --skin-token-env NAME to select an environment variable for an optional access token. The default name is NEXTDEVTPL_SKIN_TOKEN. Do not put the token value in command arguments. Generation fails when an explicitly named variable is missing or empty. The token is not written to generated records or passed to project installation scripts.
pnpm dlx create-nextdevtpl@4.0.0 my-app \
--skin ./my-skin \
--preset saas
The generated record stores the skin ID, version, package digest, and source type. Remote records retain the archive digest, not its URL; local records omit the absolute directory.
Select a Palette
--palette <slug> is available only for the built-in default skin. The bundled snapshot contains 149 StyleKit themes and is read offline during generation. Without a palette, the default skin CSS remains unchanged. With a palette, the generated record stores its ID, snapshot date, and digest, and the app receives the selected theme's STYLEKIT-LICENSE.txt.
pnpm dlx create-nextdevtpl@4.0.0 my-app \
--preset saas \
--palette glassmorphism
Palettes with local or remote skins are rejected. Palettes do not provide runtime switching or select different pages or layouts.
Common Flags
| Flag | Values or purpose |
|---|---|
--mode | full or demo; defaults to full |
--preset | Full mode: minimal, saas, ai-saas, custom |
--modules | Comma-separated custom module IDs in full mode |
--target | Full mode: server, docker, vercel, cloudflare; demo: server only |
--payment | creem, stripe, none |
--storage | s3-compatible, r2-binding, none |
--mail | disabled, resend, smtp, cloudflare-email |
--ai | openai-compatible, anthropic, workers-ai, none |
--alerts | noop, email, webhook |
--analytics | noop, logger, posthog, ga4, umami, none |
--jobs | inngest, cloudflare-workflows, none |
--rate-limit | noop, upstash, cloudflare-rate-limit |
--skin | default, a local directory, or an HTTPS archive |
--skin-sha256 | 64-character hexadecimal SHA-256 for a remote archive |
--skin-token-env | Environment variable name for a remote skin token |
--palette | StyleKit theme ID for the built-in default skin |
--yes | Accept prompts using defaults |
--no-install | Generate files without installing dependencies |
After Generation
Full mode uses .env.example to configure the selected services and may require database initialization. Demo mode requires no database or business environment variables; install and start the Next.js app directly.
cd my-demo
pnpm dev
Demo records have empty modules, adapters, and bindings; viewModules lists the eight registered view modules; demo.dataSha256 is a digest of the merged sample data, not the sample JSON. Demo pages read from an in-memory store. Pagination, form input, and business data are not written to browser persistence.
See Skin Authoring, Feature Modules, and Upgrade and Compatibility.