Skip to content

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 --prettier

Supported customizations

OptionCLI flagsType / valuesDefaultNotes
TypeScript--typescript
--no-typescript
booleantrueChoose TypeScript or JavaScript output.
Tailwind CSS--tailwind
--no-tailwind
booleantrueAdds Tailwind CSS during project creation.
shadcn/ui--shadcn
--no-shadcn
booleanfalseAdds shadcn/ui after project creation when Tailwind is enabled.
ESLint--eslint
--no-eslint
booleantrueControls whether create-next-app enables ESLint.
Prettier--prettier
--no-prettier
booleanfalseAdds Prettier after project creation.
App Router--app-router
--no-app-router
booleantrueChoose App Router or the Pages Router scaffold.
src directory--src-dir
--no-src-dir
booleantrueControls whether the project uses a src/ directory.

--yes defaults

Keyvalue
typescripttrue
tailwindtrue
shadcnfalse
eslinttrue
prettierfalse
appRoutertrue
srcDirtrue

Notes

  • The shadcn step only runs when Tailwind support is enabled.

Shared flow reminder

  • Shared flags such as --name, --directory, --package-manager, --git, and --debug apply 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.

Released under the MIT License.