CLI Reference
Commands, arguments, prompts, and flags supported by create-next-mui.
CLI Reference
create-next-mui has two primary workflows: create a new project, or add an official feature installer to an existing project.
Commands
| Command | Description |
|---|---|
create-next-mui | Start interactive project creation |
create-next-mui <project-name> | Create a project in the named directory |
create-next-mui . | Create a project in the current empty directory |
create-next-mui add <feature> | Install an official feature in the current project |
The same commands can be run through npx:
npx create-next-mui@latest my-appProject Arguments
<project-name>
Creates a project in a new directory:
npx create-next-mui@latest my-appProject names can contain letters, numbers, dashes, and underscores.
.
Creates the project in the current directory:
npx create-next-mui@latest .The current directory must be empty. The generated package name is based on the current folder name.
Flags
| Flag | Description |
|---|---|
--yes | Skip prompts and use defaults |
-y | Alias for --yes |
--js | Use JavaScript as the default language when combined with --yes |
Non-interactive TypeScript
npx create-next-mui@latest my-app --yesThis creates a TypeScript project with Oxlint and no optional features.
Non-interactive JavaScript
npx create-next-mui@latest my-app --yes --jsThis creates a JavaScript project with Oxlint and no optional features.
Interactive Prompts
When --yes is not provided, the CLI asks for:
| Prompt | Choices |
|---|---|
| Project name | Any valid project name, or . |
| Language | TypeScript or JavaScript |
| Linter | Oxlint, ESLint, or none |
| Optional features | React Query, Zustand, both, or none |
| Auto install | Yes or no |
Before scaffolding starts, the CLI shows a configuration summary and asks for confirmation.
Add Command
Install a feature from the root of an existing project:
npx create-next-mui@latest add <feature>Supported feature names:
| Feature | Adds |
|---|---|
oxlint | Oxlint and Oxfmt dependencies, config files, lint scripts, and format scripts |
eslint | ESLint flat config, ESLint dependencies, lint, and lint:fix scripts |
react-query | TanStack Query provider, dependencies, and root layout wrapper |
zustand | Zustand dependency and starter counter store |
The command must be run in a directory that already contains package.json. TypeScript projects are detected by the presence of tsconfig.json; otherwise the JavaScript files are installed.
After using add, run:
npm install