create-next-app is the official CLI tool for bootstrapping a new Next.js project. It sets up a fully configured project with your chosen options.
Usage
- pnpm
- npm
- yarn
- bun
Flags
TypeScript and JavaScript
Initialize as a TypeScript project. This is the default.
Initialize as a JavaScript project.
Styling
Initialize with Tailwind CSS configuration. Enabled by default.
Linting
Initialize with ESLint configuration.
Initialize with Biome configuration (fast linter and formatter).
Skip linter configuration entirely.
Router and structure
Initialize as an App Router project.
Initialize a minimal project with only route handlers (no UI).
Place the project code inside a
src/ directory.Configure the import alias used throughout the project.
Initialize a minimal empty project.
Bundler
Enable Rspack as the bundler in the generated project.
Turbopack is the default bundler for Next.js development. You can switch to webpack at any time using
next dev --webpack or next build --webpack in your project.Package manager
Bootstrap the project using npm.
Bootstrap the project using pnpm.
Bootstrap the project using Yarn.
Bootstrap the project using Bun.
Examples
Bootstrap from a named Next.js example or any public GitHub repository URL.
Specify a subdirectory path within the example repository.
Compiler
Initialize with React Compiler enabled.
Other
Clear any stored CLI preferences and start fresh.
Create the project files without running package installation.
Skip git repository initialization.
Include
AGENTS.md and CLAUDE.md files to guide coding agents. Enabled by default.Accept all defaults or reuse previous preferences without interactive prompts.
Show all available options.
Output the
create-next-app version number.Interactive mode
Runcreate-next-app without flags to start the interactive prompt:
Non-interactive mode
Pass all flags at once to skip prompts:Examples
Default template
From an official example
From a GitHub repository
JavaScript project
--no-* negates any default option.)