Next.js 16 cheatsheet

Next.js 16: Command line

7 common Next.js 16 tasks.

Create an app

Create a new Next.js project with an interactive setup.

npx create-next-app@latest

Start the development server

Run the app at http://localhost:3000 with hot reload.

npm run dev

Use another port

Start the dev server on port 4000.

npx next dev -p 4000

Build for production

Create an optimized production build and print the route table.

npm run build

Run the production build

Start the server after a build.

npm run start

Print environment info

Show Node, npm and Next.js versions. Handy for bug reports.

npx next info

Turn off telemetry

Opt out of anonymous usage data collection.

npx next telemetry disable

Was this page helpful?