Complete reference for every create-next-app command-line flag in Next.js 15, when to use each one, and copy-paste commands for common scenarios. Sourced from the bundled docs in next/dist/docs/01-app/03-api-reference/06-cli/create-next-app.md.
create-next-app is a standalone scaffolder published to npm. When you run it through npx, pnpm create, yarn create, or bun create, the package manager downloads the package to a temporary cache and runs its bin entry. The CLI:
Parses flags and merges them with any stored preferences under ~/.config/create-next-app/.
Prompts only for answers that were not provided on the command line.
Picks a template - the default template, --empty for a bare-bones one, or the repo pointed to by -e / --example.
Copies files into the target directory, rewriting package names.
Runs the chosen package manager's install command unless --skip-install is set.
Runs git init and an initial commit unless --disable-git is set.
Writes AGENTS.md and CLAUDE.md unless --no-agents-md is set.
Because stored preferences are respected, two developers running the same create-next-app command can get different scaffolds. --reset-preferences or passing every flag explicitly guarantees determinism.
Interactive mode: omit every flag - npx create-next-app@latest - and answer prompts one by one. Good for learners; bad for scripts.
Pin the CLI version:npx create-next-app@15.0.0 my-app ... so your scaffold is reproducible months later.
Skip git:--disable-git. Useful when scaffolding into an existing monorepo.
Skip install:--skip-install. You can then edit package.json before running the installer yourself.
Official example:--example blog-starter. See the examples/ folder in the vercel/next.js repo for the full list.
GitHub URL example:--example "https://github.com/owner/repo/tree/branch/path". Combine with --example-path if the example lives deep inside a monorepo.
The --typescript and --ts flags are aliases for the exact same behavior - they both write tsconfig.json with strict: true, moduleResolution: "bundler", the Next plugin registered, and @/* paths configured. Everything else is identical.
Compared to adding TypeScript manually later (npm install -D typescript @types/react @types/node, then running next dev), the flag saves one step: Next generates tsconfig.json automatically on first next dev anyway, but the flag also installs the dev dependencies and writes next-env.d.ts up front. For monorepos where you already control a shared tsconfig.base.json, skipping --typescript and wiring TS yourself is sometimes cleaner.
--tailwind vs --no-tailwind - there is no --no-ts-style symmetry for every flag. Most flags support --no-*, but the help text is the source of truth; always check with create-next-app --help.
-e means --example, not --eslint. The short flags are compressed and easy to mistype. Use long flags in scripts.
-ts is not a short flag - --ts requires two dashes. A single-dash -ts will be parsed as -t -s and error.
Defaults move between Next.js versions. Tailwind, ESLint, and Turbopack all became defaults relatively recently. If your README says npx create-next-app@latest, the resulting scaffold will drift over time; pin to @15 or pass every flag explicitly.
--use-npm does not block other package managers. It selects npm as the installer for the scaffold step; you can still pnpm install afterwards in the project and it will work (you will just have both lockfiles to clean up).
Interactive mode remembers previous answers. A second run in the same shell may silently pre-fill answers from the cache. Use --reset-preferences or --yes plus explicit flags for reproducibility.
--yes follows whatever the current defaults are. A CI job using --yes will produce different output after a Next.js major release. Prefer explicit flags in CI.
--example disables most other flags. When you bootstrap from an example, flags like --tailwind or --src-dir are ignored because the example already defines its own structure.
What is the difference between `--ts` and `--typescript`?
Nothing. They are aliases for the exact same flag and produce the same tsconfig.json, dependencies, and next-env.d.ts.
How do I opt out of a default flag?
Prefix it with --no-. For example, --no-tailwind, --no-eslint, --no-src-dir. Gotcha: not every flag supports negation; run create-next-app --help to confirm.
What does `--yes` do?
It skips every prompt and uses your stored preferences if they exist, otherwise the current defaults. Safe for first-time runs; risky in long-lived scripts because defaults drift.
Can I skip `git init`?
Yes - pass --disable-git. Useful when scaffolding into a directory that is already a git repo or a monorepo.
Can I skip `npm install`?
Yes - pass --skip-install. The CLI will still copy files and initialize git; you run the installer yourself afterwards.
How do I bootstrap from a GitHub example?
npx create-next-app@latest my-app --example "https://github.com/owner/repo/tree/branch/path/to/example". Works for any public GitHub repo.
What is `--empty` for?
It creates a minimal project with no demo content - no starter styles, no sample components - just the files you need for the router to boot.
Does `--use-npm` prevent me from using pnpm later?
No. It only controls which installer runs during scaffolding. You can switch package managers afterwards. Gotcha: delete the old lockfile first or you will end up with both package-lock.json and pnpm-lock.yaml.
Why did my scaffold look different today than last week?
You are running @latest and the defaults changed between Next.js versions. Pin the version: create-next-app@15.0.0. Gotcha: this happens silently, often after a Next.js minor release.
Is there a way to force Webpack instead of Turbopack?
Yes - --webpack writes the generated package.json so next dev and next build use Webpack.
Does `--typescript` differ from adding TS manually later?
Functionally, no. Both end up with the same tsconfig.json because Next generates it on first run either way. TS note: the flag additionally pre-installs typescript, @types/react, and @types/node so the first next dev does not pause to install them.
What does `--react-compiler` actually turn on?
It wires up the React Compiler (the memoization-at-build-time tool) in next.config.ts from the start. TS note: the compiler is orthogonal to TypeScript - it affects build output, not the type system.