Skip to main content
The Refine CLI is a command-line tool that streamlines the development of Refine applications. It provides commands for creating projects, running development servers, managing resources, and updating dependencies.

Installation

Install the Refine CLI globally:
npm install -g @refinedev/cli
Alternatively, use it directly with npx:
npx @refinedev/cli [command]

Quick Start

Create a new Refine project:
npm create refine-app@latest my-app
Navigate to your project and start the development server:
cd my-app
refine dev

Available Commands

The Refine CLI provides the following commands:

Project Management

  • create - Create a new Refine application with create-refine-app
  • dev - Start the development server
  • build - Build your application for production
  • run - Run custom scripts or commands
  • start - Start the production server

Code Generation

  • add - Add resources, providers, or integrations to your project

Maintenance

  • update - Update Refine packages to the latest versions

Global Options

All commands support these global options:
-v, --version
boolean
Output the current version of the CLI
-h, --help
boolean
Output usage information for any command

Usage

View available commands:
refine --help
View help for a specific command:
refine [command] --help

Platform Support

The CLI automatically detects your project type and runs the appropriate commands for:
  • Vite - Modern React development
  • Next.js - React framework with SSR
  • Remix - Full-stack React framework
  • Craco - Create React App with custom config
You can override platform detection using the --platform flag on supported commands.

Node Version

Refine CLI requires Node.js version 20 or higher.
node --version
# v20.0.0 or higher

Build docs developers (and LLMs) love