Skip to content
masterclassBuddyTech Buzz5 fresh blogs · 5:00 AM IST

Next.js 16+ · Command

create-next-app

create-next-app scaffolds a Next.js application from the default template or a public GitHub example. It supports interactive prompts and command-line options for repeatable project setup.

How it works

create-next-app scaffolds a new Next.js application from the default template or a public GitHub example. It can run interactively or accept options for a non-interactive setup, then creates the project directory and installs its dependencies.

Syntax

create-next-app <project-directory> [options]

Parameters

NameTypeDescription
project-directorystringDestination directory or project name for the generated application.
optionsstringOptional CLI flags controlling the generated project.

Returns

Creates a Next.js project directory and installs the required dependencies.

Key points

  • The CLI generates a Next.js app from the standard starter template.
  • The --example option lets you bootstrap from a public GitHub example instead.
  • Use it as the normal starting point for a new Next.js project.
  • Pass --help to inspect the available command-line options.
  • Pass --version to print the CLI version.

Example: Create an App Router project

npx create-next-app@latest my-app --ts --eslint --app

Creates a new Next.js application named my-app with TypeScript, ESLint, and the App Router enabled.

When to use it

Scaffold a standard Next.js app

Starting a new product or prototype

Initialize from an official example

Reproducing a documented starter

Generate a project in scripts or CI

Automating project creation

Interview questions

QWhat is create-next-app used for?

It is the CLI for scaffolding a new Next.js application. It supports the default template and examples from public GitHub repositories.

Follow-up: How would you start from an example? Use --example with an example name or repository URL, followed by the project name.

QHow do you configure a project without prompts?

The command accepts a project directory and options. It can prompt for configuration interactively, or configure the project non-interactively through flags.

Follow-up: How can a script disable a default feature? Prefix its option with --no-, such as --no-eslint.

QWhat are the supported ways to invoke it?

Use a package-manager launcher such as npx create-next-app@latest, pnpm create next-app, yarn create next-app, or bun create next-app. Add the project name and supported options.

Follow-up: What is the basic positional structure? It is create-next-app <project-directory> [options].

  • next
  • App Router
  • Installation

Source: CLI: create-next-app - Next.js. Checked 2026-10-15.