Skip to main content
The React Native CLI is your primary tool for creating, running, building, and managing React Native applications from the command line.

Installation

The React Native CLI is included when you create a new project. You can run commands using npx:

Available Commands

Project Initialization

  • init - Create a new React Native project

Development

  • start - Start the Metro development server
  • run-android - Build and run your app on Android
  • run-ios - Build and run your app on iOS

Building

Debugging

Configuration

Basic Workflow

1

Create a project

2

Navigate to project

3

Start Metro

4

Run on device

In a new terminal:

Global Options

Most commands support these common options:

CLI Configuration

You can configure CLI behavior using a react-native.config.js file in your project root:
react-native.config.js

Environment Variables

Metro Port

Skip Package Manager

Troubleshooting

Clear Cache

If you encounter bundling issues:

Check CLI Version

Verbose Logging

For detailed output during debugging:

Next Steps

Start Command

Learn how to start the Metro development server

Run Commands

Build and run your app on simulators and devices

Bundle Command

Create production JavaScript bundles

Metro Config

Configure the Metro bundler