next
Next.js command-line interface
TLDR
SYNOPSIS
next [command] [options]
DESCRIPTION
next is the Next.js CLI for developing, building, and serving React applications. It provides file-based routing, server-side rendering, static generation, and API routes out of the box.Running next with no command is an alias for next dev. Configuration lives in next.config.js (or .mjs/.ts). Starting with Next 13 the default output directory is .next.
PARAMETERS
dev [directory]
Start development server with Hot Module Reloading.build [directory]
Create an optimized production build.start [directory]
Start the production server (requires build first).lint
Run ESLint on the project.info
Print system, binary, and package versions (for bug reports).telemetry --enable | --disable
Enable or disable anonymous telemetry.-p, --port port
Port to listen on (default: 3000). Applies to dev and start.-H, --hostname host
Hostname to bind to (default: 0.0.0.0).--turbopack
Force enable Turbopack (default in recent versions).--webpack
Use Webpack instead of Turbopack.--experimental-https
Serve dev over HTTPS using a self-signed certificate.-h, --help
Display help information.-v, --version
Display Next.js version.
INSTALL
CAVEATS
Requires Node.js. The standalone next export command was removed in Next.js 14 in favor of `output: 'export'` in next.config.js. Linting as part of next build is being phased out starting in Next.js 15.5.
HISTORY
Next.js was created by Vercel (then ZEIT) and released in 2016 as a React framework for production applications. Later versions introduced App Router, React Server Components, and Turbopack.