Skip to main content
The Expo CLI is a command-line tool for developing, building, and deploying Expo and React Native apps. It’s included when you install the expo package.

Installation

The CLI is automatically installed with the expo package:
npm install expo

Usage

Run Expo CLI commands using npx:
npx expo <command> [options]

Global Options

These options are available for all commands:
--version
flag
Output the version number
--help
flag
Display help for command
--non-interactive
flag
Disable interactive prompts

Commands

expo start

Start a development server for your project.
npx expo start [options]
--clear, -c
flag
Clear the Metro bundler cache
--dev
flag
default:"true"
Enable development mode
--no-dev
flag
Disable development mode (production mode)
--minify
flag
Minify JavaScript
--https
flag
Start server with HTTPS
--port, -p
number
default:"8081"
Port to run Metro bundler on
--host
string
Hostname for the dev server
--tunnel
flag
Start a tunnel for the dev server
--lan
flag
Use LAN connection
--localhost
flag
Use localhost connection
--offline
flag
Skip network requests
--dev-client
flag
Start for a development build (non-Expo Go)
--go
flag
Start for Expo Go
--scheme
string
Custom URL scheme to use when launching the app
--android
flag
Open on connected Android device/emulator
--ios
flag
Open on connected iOS simulator
--web
flag
Open in web browser
--private-key-path
string
Path to private key for code signing
Examples:
# Start development server
npx expo start

# Start with cache cleared
npx expo start --clear

# Start and open on iOS
npx expo start --ios

# Start for development build
npx expo start --dev-client

# Start with tunnel
npx expo start --tunnel

expo run:ios

Build and run the iOS app locally.
npx expo run:ios [options]
--device
string
Device name or UDID to build for
--scheme
string
Xcode scheme to build
--configuration
string
default:"Debug"
Xcode configuration (Debug or Release)
--port, -p
number
default:"8081"
Port to run Metro bundler on
--no-bundler
flag
Skip starting the Metro bundler
Examples:
# Run on default simulator
npx expo run:ios

# Run on specific device
npx expo run:ios --device "iPhone 15 Pro"

# Run release build
npx expo run:ios --configuration Release

expo run:android

Build and run the Android app locally.
npx expo run:android [options]
--device
string
Device name or ID to build for
--variant
string
default:"debug"
Build variant to use (debug or release)
--port, -p
number
default:"8081"
Port to run Metro bundler on
--no-bundler
flag
Skip starting the Metro bundler
Examples:
# Run on default device/emulator
npx expo run:android

# Run release variant
npx expo run:android --variant release

# Run on specific device
npx expo run:android --device emulator-5554

expo prebuild

Generate native iOS and Android directories for your project.
npx expo prebuild [options]
--clean
flag
Delete native directories before generating
--npm
flag
Use npm to install dependencies
--yarn
flag
Use Yarn to install dependencies
--no-install
flag
Skip installing npm packages
--template
string
Template to use for native directories
--platform
string
Platforms to generate (ios, android, or all)
Examples:
# Generate native projects
npx expo prebuild

# Clean and regenerate
npx expo prebuild --clean

# Generate only iOS
npx expo prebuild --platform ios
Running prebuild will create ios/ and android/ directories. These should be added to .gitignore if using continuous native generation.

expo install

Install a package and ensure compatible versions with your Expo SDK.
npx expo install <packages...> [options]
--check
flag
Check which packages need to be updated
--fix
flag
Automatically update packages to compatible versions
--npm
flag
Use npm
--yarn
flag
Use Yarn
--pnpm
flag
Use pnpm
--bun
flag
Use Bun
Examples:
# Install packages
npx expo install expo-camera expo-location

# Check for incompatible versions
npx expo install --check

# Fix incompatible versions
npx expo install --fix

expo export

Export the app for deployment.
npx expo export [options]
--platform
string
default:"all"
Platforms to export (ios, android, web, or all)
--output-dir
string
default:"dist"
Output directory for exported files
--clear
flag
Clear Metro bundler cache
--dev
flag
Export in development mode
--minify
flag
Minify JavaScript
Examples:
# Export all platforms
npx expo export

# Export only web
npx expo export --platform web

# Export to custom directory
npx expo export --output-dir build

expo build

Deprecated. Use EAS Build instead.
eas build
See EAS Build documentation.

expo config

Show the project config.
npx expo config [options]
--type
string
Type of config to show (public, prebuild, or introspect)
--full
flag
Show full config including internal values
Examples:
# Show config
npx expo config

# Show public config
npx expo config --type public

# Show full config
npx expo config --full

expo customize

Generate template files for customization.
npx expo customize [files...]
Examples:
# Show available files
npx expo customize

# Generate tsconfig.json
npx expo customize tsconfig.json

# Generate metro.config.js
npx expo customize metro.config.js

expo doctor

Check the project for potential issues.
npx expo doctor [options]
--fix-dependencies
flag
Fix dependency version issues
Examples:
# Check for issues
npx expo doctor

# Fix dependency issues
npx expo doctor --fix-dependencies

expo lint

Run ESLint on the project.
npx expo lint [options] [path]
--fix
flag
Automatically fix problems
Examples:
# Lint project
npx expo lint

# Lint and fix
npx expo lint --fix

expo login

Login to your Expo account.
npx expo login [options]
--username
string
Username
--password
string
Password
--sso
flag
Login with SSO

expo logout

Logout from your Expo account.
npx expo logout

expo whoami

Show the currently authenticated account.
npx expo whoami

expo register

Create a new Expo account.
npx expo register

Autolinking

expo-modules-autolinking

Search for Expo modules installed in the project.
npx expo-modules-autolinking [command]
Commands:
  • search - Search for Expo modules
  • resolve - Resolve module configuration
  • verify - Verify autolinking setup

Environment Variables

EXPO_DEBUG

Enable debug logging:
EXPO_DEBUG=1 npx expo start

EXPO_NO_TELEMETRY

Disable anonymous usage telemetry:
EXPO_NO_TELEMETRY=1 npx expo start

EXPO_USE_METRO_WORKSPACE_ROOT

Use the workspace root as the Metro project root:
EXPO_USE_METRO_WORKSPACE_ROOT=1 npx expo start

Package Manager Detection

The CLI automatically detects your package manager:
  • Checks for lockfiles (package-lock.json, yarn.lock, pnpm-lock.yaml, bun.lockb)
  • Falls back to npm if no lockfile is found
  • Can be overridden with --npm, --yarn, --pnpm, or --bun flags

Interactive Prompts

The CLI includes interactive prompts for better developer experience:
  • Device selection: Choose which device to run on
  • Package installation: Confirm installing missing packages
  • Config generation: Confirm creating config files
  • Platform selection: Choose which platforms to target
Disable prompts with --non-interactive for CI/CD environments.

Keyboard Shortcuts

When the dev server is running, use these shortcuts:
  • a - Open on Android
  • i - Open on iOS
  • w - Open in web browser
  • r - Reload app
  • m - Toggle menu
  • j - Open debugger
  • c - Clear Metro cache
  • d - Show dev menu
  • ? - Show all commands

Troubleshooting

Clear Cache

If you encounter bundling issues:
npx expo start --clear

Reset Project

For persistent issues:
# Delete native directories
rm -rf ios android

# Clear cache
rm -rf node_modules
npx expo start --clear

# Reinstall dependencies
npm install

# Regenerate native projects
npx expo prebuild

View Logs

Enable debug logging:
EXPO_DEBUG=1 npx expo start

EAS CLI

For building and deploying with EAS:
npm install -g eas-cli
eas build
eas submit
eas update
See EAS CLI documentation.