Skip to main content
The create command scaffolds a new Refine application with all the necessary configuration and dependencies.

Usage

npm create refine-app@latest [project-name] [options]

Arguments

project-name
string
Name of your new project. If not provided, you’ll be prompted to enter one.

Options

-v, --version
boolean
Output the current version of create-refine-app
npm create refine-app@latest --version
-h, --help
boolean
Display usage information
npm create refine-app@latest --help
-s, --source <source-path>
string
Specify a custom source of plugins
npm create refine-app@latest my-app --source custom-source
-b, --branch <source-git-branch>
string
Specify a custom branch in source of plugins
npm create refine-app@latest my-app --branch develop
-o, --preset <preset-name>
string
Specify a preset to use for the project
npm create refine-app@latest my-app --preset enterprise
-l, --lucky
boolean
Generate a project with random answers (quick start)
npm create refine-app@latest my-app --lucky
-e, --example <example>
string
Get a clone of an example from the Refine repository. Optionally specify a destination.
npm create refine-app@latest --example base-antd
npm create refine-app@latest --example base-antd my-app
-d, --download <type>
string
default:"zip"
Specify download type for source codeOptions: zip | git
npm create refine-app@latest my-app --download git
-p, --project <project-name>
string
Specify a project type to use
npm create refine-app@latest my-app --project vite
--disable-telemetry
boolean
Disable telemetry data collection
npm create refine-app@latest my-app --disable-telemetry

Examples

Interactive Mode

Create a new project with interactive prompts:
npm create refine-app@latest
Output
? What would you like to name your project?: my-app
? Choose your project type: Vite
? Choose your UI framework: Ant Design
? Choose your data provider: REST API
? Do you want to add authentication?: Yes

Quick Start with Lucky Mode

Generate a project with random selections:
npm create refine-app@latest my-app --lucky

Clone an Example

Start with an existing example:
npm create refine-app@latest --example base-antd my-antd-app
Available examples include:
  • base-antd - Ant Design starter
  • base-chakra-ui - Chakra UI starter
  • base-mantine - Mantine starter
  • base-mui - Material UI starter
  • base-headless - Headless starter

Specify Project Type

Create a Next.js project:
npm create refine-app@latest my-app --project nextjs
Available project types:
  • vite - Vite React app
  • nextjs - Next.js app
  • remix - Remix app

After Creation

Once your project is created:
  1. Navigate to the project directory:
    cd my-app
    
  2. Start the development server:
    npm run dev
    
  3. Open your browser at http://localhost:5173 (Vite) or the appropriate port for your project type.

Project Structure

A typical Refine project structure:
my-app/
├── src/
│   ├── App.tsx          # Main application component
│   ├── pages/           # Page components
│   └── providers/       # Data and auth providers
├── package.json
├── tsconfig.json
└── vite.config.ts       # Build configuration

What Gets Installed

The scaffolded project includes:
  • @refinedev/core - Core functionality
  • @refinedev/cli - CLI tools (dev dependency)
  • UI framework - Your chosen UI library (Ant Design, Material UI, etc.)
  • Data provider - REST API, GraphQL, or other selected provider
  • Router - React Router or framework-specific routing
  • Build tool - Vite, Next.js, or Remix configuration

Troubleshooting

Installation Fails

If package installation fails:
npm create refine-app@latest my-app
cd my-app
rm -rf node_modules package-lock.json
npm install

Port Already in Use

If the default port is occupied, the dev server will automatically try the next available port.

Next Steps

Build docs developers (and LLMs) love