Skip to main content
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 create next-app [project-name] [options]

Flags

TypeScript and JavaScript

--ts / --typescript
boolean
Initialize as a TypeScript project. This is the default.
--js / --javascript
boolean
Initialize as a JavaScript project.

Styling

--tailwind
boolean
Initialize with Tailwind CSS configuration. Enabled by default.

Linting

--eslint
boolean
Initialize with ESLint configuration.
--biome
boolean
Initialize with Biome configuration (fast linter and formatter).
--no-linter
boolean
Skip linter configuration entirely.

Router and structure

--app
boolean
Initialize as an App Router project.
--api
boolean
Initialize a minimal project with only route handlers (no UI).
--src-dir
boolean
Place the project code inside a src/ directory.
--import-alias <alias>
string
default:"@/*"
Configure the import alias used throughout the project.
--empty
boolean
Initialize a minimal empty project.

Bundler

--rspack
boolean
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

--use-npm
boolean
Bootstrap the project using npm.
--use-pnpm
boolean
Bootstrap the project using pnpm.
--use-yarn
boolean
Bootstrap the project using Yarn.
--use-bun
boolean
Bootstrap the project using Bun.

Examples

-e / --example [name] [github-url]
string
Bootstrap from a named Next.js example or any public GitHub repository URL.
--example-path <path>
string
Specify a subdirectory path within the example repository.

Compiler

--react-compiler
boolean
Initialize with React Compiler enabled.

Other

--reset-preferences
boolean
Clear any stored CLI preferences and start fresh.
--skip-install
boolean
Create the project files without running package installation.
--disable-git
boolean
Skip git repository initialization.
--agents-md
boolean
Include AGENTS.md and CLAUDE.md files to guide coding agents. Enabled by default.
--yes
boolean
Accept all defaults or reuse previous preferences without interactive prompts.
-h / --help
boolean
Show all available options.
-v / --version
boolean
Output the create-next-app version number.

Interactive mode

Run create-next-app without flags to start the interactive prompt:
npx create-next-app@latest
You will be asked:
What is your project named? my-app
Would you like to use the recommended Next.js defaults?
    Yes, use recommended defaults - TypeScript, ESLint, Tailwind CSS, App Router, AGENTS.md
    No, reuse previous settings
    No, customize settings - Choose your own preferences
Choosing customize settings presents:
Would you like to use TypeScript? No / Yes
Which linter would you like to use? ESLint / Biome / None
Would you like to use React Compiler? No / Yes
Would you like to use Tailwind CSS? No / Yes
Would you like your code inside a `src/` directory? No / Yes
Would you like to use App Router? (recommended) No / Yes
Would you like to customize the import alias (`@/*` by default)? No / Yes
What import alias would you like configured? @/*
Would you like to include AGENTS.md? No / Yes

Non-interactive mode

Pass all flags at once to skip prompts:
npx create-next-app@latest my-app --typescript --tailwind --eslint --app --src-dir --import-alias "@/*"

Examples

Default template

npx create-next-app@latest my-app

From an official example

npx create-next-app@latest my-app --example with-tailwindcss
Browse all available examples in the Next.js repository.

From a GitHub repository

npx create-next-app@latest my-app --example "https://github.com/my-org/my-template"

JavaScript project

npx create-next-app@latest my-app --no-ts --no-tailwind
(--no-* negates any default option.)

Build docs developers (and LLMs) love