What is Expo CLI?
Expo CLI is distributed as the@expo/cli npm package and serves as the primary interface for:
- Starting development servers with Metro bundler
- Building and running native applications locally
- Generating native iOS and Android projects
- Managing dependencies compatible with your Expo SDK version
- Exporting production-ready bundles
- Authenticating with your Expo account
Main Features
Development Server
The CLI provides a powerful development server with Metro bundler integration that supports:- Multi-platform bundling (iOS, Android, and Web)
- Hot Module Replacement (HMR)
- Fast Refresh for instant updates
- Chrome DevTools Protocol for debugging
- TypeScript support with automatic type generation
- Server-side rendering and API routes
Native Development
Build and run your app on iOS simulators, Android emulators, and physical devices:- Automatic device detection and selection
- Xcode and Gradle build integration
- Code signing management for iOS
- Variant and configuration support
Project Management
- Generate native projects with
expo prebuild - Install compatible dependencies with
expo install - View resolved configuration with
expo config - Customize Metro bundler and native projects
Common Workflows
Starting Development
- Press
ito open iOS simulator - Press
ato open Android emulator - Press
wto open in web browser - Scan QR code with Expo Go or development build
Building Locally
Generating Native Projects
ios/ and android/ directories with native code that you can open in Xcode or Android Studio.
Installing Dependencies
Exporting for Production
- Minified JavaScript
- Compressed assets
- Platform-specific bundles
- Static HTML for web
Requirements
- Node.js 20.19.4 or newer (LTS version recommended)
- npm, yarn, pnpm, or bun package manager
- For iOS development: macOS with Xcode (not supported on Windows)
- For Android development: Android Studio or Android SDK
Getting Help
Run any command with the--help flag to see detailed usage information:
Environment Variables
Expo CLI supports various environment variables for customization:EXPO_DEBUG=1- Enable debug loggingEXPO_OFFLINE=1- Skip network requestsCI=1- Run in non-interactive CI modeEXPO_NO_TELEMETRY=1- Disable analytics