logoNext MUI
Reference

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

CommandDescription
create-next-muiStart 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-app

Project Arguments

<project-name>

Creates a project in a new directory:

npx create-next-mui@latest my-app

Project 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

FlagDescription
--yesSkip prompts and use defaults
-yAlias for --yes
--jsUse JavaScript as the default language when combined with --yes

Non-interactive TypeScript

npx create-next-mui@latest my-app --yes

This creates a TypeScript project with Oxlint and no optional features.

Non-interactive JavaScript

npx create-next-mui@latest my-app --yes --js

This creates a JavaScript project with Oxlint and no optional features.

Interactive Prompts

When --yes is not provided, the CLI asks for:

PromptChoices
Project nameAny valid project name, or .
LanguageTypeScript or JavaScript
LinterOxlint, ESLint, or none
Optional featuresReact Query, Zustand, both, or none
Auto installYes 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:

FeatureAdds
oxlintOxlint and Oxfmt dependencies, config files, lint scripts, and format scripts
eslintESLint flat config, ESLint dependencies, lint, and lint:fix scripts
react-queryTanStack Query provider, dependencies, and root layout wrapper
zustandZustand 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

On this page