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
PresetDefault targetMain surface
minimalserverAuthentication and basic workspace pages
saasvercelMarketing, auth, settings, admin, support, subscriptions, and credits
ai-saascloudflareSaaS pages plus AI, blog, and PSEO
customserverExplicitly 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:

SourceFlag
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

FlagValues or purpose
--modefull or demo; defaults to full
--presetFull mode: minimal, saas, ai-saas, custom
--modulesComma-separated custom module IDs in full mode
--targetFull mode: server, docker, vercel, cloudflare; demo: server only
--paymentcreem, stripe, none
--storages3-compatible, r2-binding, none
--maildisabled, resend, smtp, cloudflare-email
--aiopenai-compatible, anthropic, workers-ai, none
--alertsnoop, email, webhook
--analyticsnoop, logger, posthog, ga4, umami, none
--jobsinngest, cloudflare-workflows, none
--rate-limitnoop, upstash, cloudflare-rate-limit
--skindefault, a local directory, or an HTTPS archive
--skin-sha25664-character hexadecimal SHA-256 for a remote archive
--skin-token-envEnvironment variable name for a remote skin token
--paletteStyleKit theme ID for the built-in default skin
--yesAccept prompts using defaults
--no-installGenerate 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.

On this page