Next.js
Scaffold a Next.js project via the official create-next-app CLI
Primary commands
bash
npx scafix create next
npx scafix create next --name dashboard --yes --package-manager pnpm
npx scafix create next --no-tailwind --no-eslint --no-src-dir --prettierSupported customizations
| Option | CLI flags | Type / values | Default | Notes |
|---|---|---|---|---|
| TypeScript | --typescript--no-typescript | boolean | true | Choose TypeScript or JavaScript output. |
| Tailwind CSS | --tailwind--no-tailwind | boolean | true | Adds Tailwind CSS during project creation. |
| shadcn/ui | --shadcn--no-shadcn | boolean | false | Adds shadcn/ui after project creation when Tailwind is enabled. |
| ESLint | --eslint--no-eslint | boolean | true | Controls whether create-next-app enables ESLint. |
| Prettier | --prettier--no-prettier | boolean | false | Adds Prettier after project creation. |
| App Router | --app-router--no-app-router | boolean | true | Choose App Router or the Pages Router scaffold. |
| src directory | --src-dir--no-src-dir | boolean | true | Controls whether the project uses a src/ directory. |
--yes defaults
| Key | value |
|---|---|
| typescript | true |
| tailwind | true |
| shadcn | false |
| eslint | true |
| prettier | false |
| appRouter | true |
| srcDir | true |
Notes
- The shadcn step only runs when Tailwind support is enabled.
Shared flow reminder
- Shared flags such as
--name,--directory,--package-manager,--git, and--debugapply here as well. - If required values are omitted and a TTY is available, Scafix prompts for them before calling the stack adapter.
- See CLI Reference for the shared command surface used by
scafix.
