Global Expo CLI The global Expo CLI expo-cli was succeeded by the local CLI @expo/cli in SDK 46. This documentation contains info on the now deprecated expo-cli package.
If you're using a project that is SDK 46 or higher, see Expo CLI .
The legacy Expo CLI can be installed as a global npm package on your development machine. To download and install it, run the following command:
- npm install -g expo-cli
Not versioning the CLI with your project lowers backwards compatibility, and makes it harder to use your project in continuous environments like GitHub Actions. To combat this, we moved to using a versioned CLI in SDK 46.
To check the current version of the global Expo CLI you are using, use the --version option.
You can view the list of commands available with your version in your terminal using the --help option.
To learn more about a specific command and the options it may have, use expo [command] --help.
# Usage: expo [command] [options]
You will find a list of all commands derived from the latest version of Expo CLI.
Export the static files of the app for hosting it on a web server Option Description --platform [all|android|ios]Platforms: android, ios, all -p, --public-url [url]The public url that will host the static files (required) -c, --clearClear the Metro bundler cache --output-dir [dir]The directory to export the static files to -a, --asset-url [url]The absolute or relative url that will host the asset files -d, --dump-assetmapDump the asset map for further processing --devConfigure static files for developing locally using a non-https server -s, --dump-sourcemapDump the source map for debugging the JS bundle -q, --quietSuppress verbose output -t, --target [managed|bare]Target environment for which this export is intended --merge-src-dir [dir]A repeatable source dir to merge in --merge-src-url [url]A repeatable source tar.gz file URL to merge in --max-workers [num]Maximum number of tasks to allow Metro to spawn --experimental-bundleexport bundles for use with EAS updates --config [file]Deprecated: Use app.config.js to switch config files instead.
Create a new Expo project Alias: expo i
Option Description -t, --template [name]Specify which template to use. Valid options are "blank", "tabs", "bare-minimum" or a package on npm (for example, "expo-template-bare-minimum") that includes an Expo project template. --npmUse npm to install dependencies. (default when Yarn is not installed) --yarnUse Yarn to install dependencies. (default when Yarn is installed) --no-installSkip installing npm packages or CocoaPods. --name [name]The name of your app visible on the home screen. --yesUse default options. Same as "expo init . --template blank
Install a module or other package to a project Alias: expo add
Option Description --npmUse npm to install dependencies. (default when package-lock.json exists) --yarnUse Yarn to install dependencies. (default when yarn.lock exists)
Run the Android app binary locally Option Description --no-bundlerSkip starting the Metro bundler -d, --device [device]Device name to build the app on -p, --port [port]Port to start the Metro bundler on. Default: 8081 --variant [name](Android) build variant --config [file]Deprecated: Use app.config.js to switch config files instead.
Run the iOS app binary locally Option Description --no-build-cacheClear the native derived data before building --no-installSkip installing dependencies --no-bundlerSkip starting the Metro bundler -d, --device [device]Device name or UDID to build the app on -p, --port [port]Port to start the Metro bundler on. Default: 8081 --scheme [scheme]Scheme to build --configuration [configuration]Xcode configuration to use. Debug or Release. Default: Debug --config [file]Deprecated: Use app.config.js to switch config files instead.
Share the project's URL to an email address Option Description -s, --send-to [dest]Email address to send the URL to --dev-clientExperimental: Starts the bundler for use with the expo-development-client --scheme [scheme]Custom URI protocol to use with a development build -a, --androidOpens your app in Expo Go on a connected Android device -i, --iosOpens your app in Expo Go in a currently running iOS Simulator on your computer -w, --webOpens your app in a web browser -m, --host [mode]lan (default), tunnel, localhost. Type of host to use. "tunnel" allows you to view your link on other networks --tunnelSame as --host tunnel --lanSame as --host lan --localhostSame as --host localhost --config [file]Deprecated: Use app.config.js to switch config files instead.
Start a local dev server for the app Alias: expo r
| Option | Description |
| ---------------------- | -------------------------------------------------------------------------------------------------------------- | --- |
| -s, --send-to [dest] | An email address to send a link to |
| -c, --clear | Clear the Metro bundler cache |
| --max-workers [num] | Maximum number of tasks to allow Metro to spawn. |
| --no-dev | Turn development mode off |
| --minify | Minify code |
| --https | To start webpack with https protocol | |
| -p, --port [port] | Port to start the native Metro bundler on (does not apply to web or tunnel). Default: 19000 |
| --dev-client | Experimental: Starts the bundler for use with the expo-development-client |
| --scheme [scheme] | Custom URI protocol to use with a development build |
| -a, --android | Opens your app in Expo Go on a connected Android device |
| -i, --ios | Opens your app in Expo Go in a currently running iOS Simulator on your computer |
| -w, --web | Opens your app in a web browser |
| -m, --host [mode] | lan (default), tunnel, localhost. Type of host to use. "tunnel" allows you to view your link on other networks |
| --tunnel | Same as --host tunnel |
| --lan | Same as --host lan |
| --localhost | Same as --host localhost |
| --offline | Allows this command to run while offline |
| --dev | Deprecated: Dev mode is used by default |
| --no-minify | Deprecated: Minify is disabled by default |
| --no-https | Deprecated: https is disabled by default |
| --config [file] | Deprecated: Use app.config.js to switch config files instead. |
Start a webpack dev server for the web app Alias: expo web
| Option | Description |
| ---------------------- | -------------------------------------------------------------------------------------------------------------- | --- |
| --no-dev | Turn development mode off |
| --minify | Minify code |
| --https | To start webpack with https protocol | |
| -p, --port [port] | Port to start the webpack bundler on. Default: 19006 |
| -s, --send-to [dest] | An email address to send a link to |
| --dev-client | Experimental: Starts the bundler for use with the expo-development-client |
| --scheme [scheme] | Custom URI protocol to use with a development build |
| -a, --android | Opens your app in Expo Go on a connected Android device |
| -i, --ios | Opens your app in Expo Go in a currently running iOS Simulator on your computer |
| -w, --web | Opens your app in a web browser |
| -m, --host [mode] | lan (default), tunnel, localhost. Type of host to use. "tunnel" allows you to view your link on other networks |
| --tunnel | Same as --host tunnel |
| --lan | Same as --host lan |
| --localhost | Same as --host localhost |
| --offline | Allows this command to run while offline |
| --dev | Deprecated: Dev mode is used by default |
| --no-minify | Deprecated: Minify is disabled by default |
| --no-https | Deprecated: https is disabled by default |
| --config [file] | Deprecated: Use app.config.js to switch config files instead. |
Login to an Expo account Alias: expo signin
Option Description -u, --username [string]Username -p, --password [string]Password --otp [string]One-time password from your 2FA device
Logout of an Expo account This command does not take any options.
Sign up for a new Expo account This command does not take any options.
Return the currently authenticated account Alias: expo w
This command does not take any options.
Install Expo Go for iOS on the simulator Option Description --latestInstall the latest version of Expo Go, ignoring the current project version.
Install Expo Go for Android on a connected device or emulator Option Description -d, --device [device]Device name to install the client on --latestInstall the latest version of Expo Go, ignore the current project version.
Show the project config Option Description -t, --type [public|prebuild|introspect]Type of config to show. --fullInclude all project config data --jsonOutput in JSON format --config [file]Deprecated: Use app.config.js to switch config files instead.
Log environment info to the console Option Description --config [file]Deprecated: Use app.config.js to switch config files instead.
Diagnose issues with the project Option Description --fix-dependenciesFix incompatible dependency versions --config [file]Deprecated: Use app.config.js to switch config files instead.
Upgrade the project packages and config for the given SDK version Alias: expo update
Option Description --npmUse npm to install dependencies. (default when package-lock.json exists) --yarnUse Yarn to install dependencies. (default when yarn.lock exists)
Eject the default web files for customization Option Description -f, --forceAllows replacing existing files --offlineAllows this command to run while offline --config [file]Deprecated: Use app.config.js to switch config files instead.
Create native Android and iOS project files. Learn more: https://docs.expo.dev/workflow/customizing/ Option Description --no-installSkip installing npm packages and CocoaPods. --npmUse npm to install dependencies. (default when Yarn is not installed) -p, --platform [all|android|ios]Platforms to sync: Android, iOS, all. Default: all --config [file]Deprecated: Use app.config.js to switch config files instead.
Create native Android and iOS project files before building natively. Learn more: https://docs.expo.dev/workflow/customizing/ Option Description --no-installSkip installing npm packages and CocoaPods. --cleanDelete the native folders and regenerate them before applying changes --npmUse npm to install dependencies. (default when Yarn is not installed) --template [template]Project template to clone from. File path pointing to a local tar file or a github repo -p, --platform [all|android|ios]Platforms to sync: Android, iOS, all. Default: all --skip-dependency-update [dependencies]Preserves versions of listed packages in package.json (comma separated list) --config [file]Deprecated: Use app.config.js to switch config files instead.
SDK 49 was the last version to support Classic Updates. To continue using the deprecated expo publish command, set updates.useClassicUpdates in your app config.
Deploy a project to Expo hosting Alias: expo p
Option Description -q, --quietSuppress verbose output from the Metro bundler. -s, --send-to [dest]A phone number or email address to send a link to -c, --clearClear the Metro bundler cache -t, --target [managed|bare]Target environment for which this publish is intended. Options are managed or bare. --max-workers [num]Maximum number of tasks to allow Metro to spawn. --release-channel [name]The release channel to publish to. Default is 'default'. --config [file]Deprecated: Use app.config.js to switch config files instead.
Specify the channel to serve a published release Alias: expo ps
Option Description -c, --release-channel [name]The channel to set the published release. (Required) -p, --publish-id [publish-id]The id of the published release to serve from the channel. (Required) --config [file]Deprecated: Use app.config.js to switch config files instead.
Undo an update to a channel Alias: expo pr
Option Description --channel-id [channel-id]This flag is deprecated. -c, --release-channel [name]The channel to rollback from. (Required) -s, --sdk-version [version]The sdk version to rollback. (Required) -p, --platform [android|ios]The platform to rollback. --config [file]Deprecated: Use app.config.js to switch config files instead.
Log the project's releases Alias: expo ph
Option Description -c, --release-channel [name]Filter by release channel. If this flag is not included, the most recent publications will be shown. --count [number-of-logs]Number of logs to view, maximum 100, default 5. -p, --platform [android|ios]Filter by platform, android or ios. Defaults to both platforms. -s, --sdk-version [version]Filter by SDK version. For example, 35.0.0 -r, --rawProduce some raw output. --config [file]Deprecated: Use app.config.js to switch config files instead.
Log details of a published release Alias: expo pd
Option Description --publish-id [publish-id]Publication id. (Required) -r, --rawProduce some raw output. --config [file]Deprecated: Use app.config.js to switch config files instead.
Build the web app for production Option Description -c, --clearClear all cached build files and assets. --no-pwaPrevent webpack from generating the manifest.json and injecting meta into the index.html head. -d, --devTurns dev flag on before bundling --config [file]Deprecated: Use app.config.js to switch config files instead.
Manage your credentials Option Description -p --platform [android|ios]Platform: [android|ios] --config [file]Deprecated: Use app.config.js to switch config files instead.
Download the project's iOS standalone app signing credentials Option Description --config [file]Deprecated: Use app.config.js to switch config files instead.
Download the project's Android keystore Option Description --config [file]Deprecated: Use app.config.js to switch config files instead.
Compute and log the project's Android key hashes Option Description --config [file]Deprecated: Use app.config.js to switch config files instead.
Download the project's Android keystore Option Description --config [file]Deprecated: Use app.config.js to switch config files instead.
Upload an FCM key for Android push notifications Option Description --api-key [api-key]Server API key for FCM. --config [file]Deprecated: Use app.config.js to switch config files instead.
Log the value currently in use for FCM notifications for this project Option Description --config [file]Deprecated: Use app.config.js to switch config files instead.
Delete a previously uploaded FCM credential Option Description --config [file]Deprecated: Use app.config.js to switch config files instead.
Log a URL for opening the project in Expo Go Alias: expo u
Option Description --dev-clientExperimental: Starts the bundler for use with the expo-development-client --scheme [scheme]Custom URI protocol to use with a development build -a, --androidOpens your app in Expo Go on a connected Android device -i, --iosOpens your app in Expo Go in a currently running iOS Simulator on your computer -w, --webOpens your app in a web browser -m, --host [mode]lan (default), tunnel, localhost. Type of host to use. "tunnel" allows you to view your link on other networks --tunnelSame as --host tunnel --lanSame as --host lan --localhostSame as --host localhost --offlineAllows this command to run while offline --config [file]Deprecated: Use app.config.js to switch config files instead.
Log the download URL for the standalone iOS binary Option Description --public-url [url]The URL of an externally hosted manifest (for self-hosted apps) --config [file]Deprecated: Use app.config.js to switch config files instead.
Log the download URL for the standalone Android binary Option Description --public-url [url]The URL of an externally hosted manifest (for self-hosted apps) --config [file]Deprecated: Use app.config.js to switch config files instead.
List all webhooks for a project Option Description --config [file]Deprecated: Use app.config.js to switch config files instead.
Add a webhook to a project Option Description --url [url]URL to request. (Required) --event [event-type]Event type that triggers the webhook. [build] (Required) --secret [secret]Secret used to create a hash signature of the request payload, provided in the 'Expo-Signature' header. --config [file]Deprecated: Use app.config.js to switch config files instead.
Delete a webhook Option Description --id [id]ID of the webhook to remove. --config [file]Deprecated: Use app.config.js to switch config files instead.
Update an existing webhook Option Description --id [id]ID of the webhook to update. --url [url]URL the webhook will request. --event [event-type]Event type that triggers the webhook. [build] --secret [secret]Secret used to create a hash signature of the request payload, provided in the 'Expo-Signature' header. --config [file]Deprecated: Use app.config.js to switch config files instead.
Superseded by eas build in eas-cli Alias: expo bi
Option Description -c, --clear-credentialsClear all credentials stored on Expo servers. --clear-dist-certRemove Distribution Certificate stored on Expo servers. --clear-push-keyRemove Push Notifications Key stored on Expo servers. --clear-push-certRemove Push Notifications Certificate stored on Expo servers. Use of Push Notifications Certificates is deprecated. --clear-provisioning-profileRemove Provisioning Profile stored on Expo servers. -r --revoke-credentialsRevoke credentials on developer.apple.com, select appropriate using --clear-* options. --apple-id [login]Apple ID username (please also set the Apple ID password as EXPO_APPLE_PASSWORD environment variable). -t --type [archive|simulator]Type of build: [archive|simulator]. --release-channel [name]Pull from specified release channel. --no-publishDisable automatic publishing before building. --no-waitExit immediately after scheduling build. --team-id [apple-teamId]Apple Team ID. --dist-p12-path [path]Path to your Distribution Certificate P12 (set password as EXPO_IOS_DIST_P12_PASSWORD environment variable). --push-id [push-id]Push Key ID (ex: 123AB4C56D). --push-p8-path [path]Path to your Push Key .p8 file. --provisioning-profile-path [path]Path to your Provisioning Profile. --public-url [url]The URL of an externally hosted manifest (for self-hosted apps). --skip-credentials-checkSkip checking credentials. --skip-workflow-checkSkip warning about build service bare workflow limitations. --config [file]Deprecated: Use app.config.js to switch config files instead.
Superseded by eas build in eas-cli Alias: expo ba
Option Description -c, --clear-credentialsClear stored credentials. --release-channel [name]Pull from specified release channel. --no-publishDisable automatic publishing before building. --no-waitExit immediately after triggering build. --keystore-path [path]Path to your Keystore: *.jks. --keystore-alias [alias]Keystore Alias --generate-keystore[deprecated] Generate Keystore if one does not exist --public-url [url]The URL of an externally hosted manifest (for self-hosted apps) --skip-workflow-checkSkip warning about build service bare workflow limitations. -t --type [app-bundle|apk]Type of build: [app-bundle|apk]. --config [file]Deprecated: Use app.config.js to switch config files instead.
Superseded by eas build:list in eas-cli Alias: expo bs
Option Description --public-url [url]The URL of an externally hosted manifest (for self-hosted apps). --config [file]Deprecated: Use app.config.js to switch config files instead.
Superseded by eas submit in eas-cli Alias: expo ua
Option Description --verboseMigrate to eas submit --verbose --latestMigrate to eas submit --latest --id [id]Migrate to eas submit --id [id] --path [path]Migrate to eas submit --path [path] --url [url]Migrate to eas submit --url [url] --android-package [android-package]Migrate to eas submit (android-package is auto inferred) --type [archive-type]Migrate to eas submit (type is auto inferred) --key [key]Migrate to eas.json's serviceAccountKeyPath property --track [track]Migrate to eas.json's track property --release-status [release-status]Migrate to eas.json's releaseStatus property --config [file]Deprecated: Use app.config.js to switch config files instead.
Superseded by eas submit in eas-cli Alias: expo ui
Option Description --verboseMigrate to eas submit --verbose --latestMigrate to eas submit --latest --id [id]Migrate to eas submit --id [id] --path [path]Migrate to eas submit --path [path] --url [url]Migrate to eas submit --url [url] --apple-id [apple-id]Migrate to eas.json's appleId property --itc-team-id [itc-team-id]Migrate to eas.json's appleTeamId property --app-name [app-name]Migrate to eas.json's appName property --company-name [company-name]Migrate to eas.json's companyName property --sku [sku]Migrate to eas.json's sku property --language [language]Migrate to eas.json's language property --config [file]Deprecated: Use app.config.js to switch config files instead.
Superseded by Expo Dev Clients Option Description --apple-id [login]Apple ID username (please also set the Apple ID password as EXPO_APPLE_PASSWORD environment variable). --config [file]Deprecated: Use app.config.js to switch config files instead.
In Expo SDK 46, we migrated to a new suite of tooling that is versioned in the expo package. Below is a migration guide showing where the legacy expo-cli commands live now.
Legacy expo-cli will be in maintenance mode and continue to work while we migrate to the new tooling.
Legacy New Notes expo initnpx create-expo-appNew CLI expo startnpx expo startVersioned expo exportnpx expo exportVersioned, --experimental-bundle is default expo installnpx expo installVersioned expo run:androidnpx expo run:androidVersioned expo run:iosnpx expo run:iosVersioned expo loginnpx expo loginVersioned expo logoutnpx expo logoutVersioned expo registernpx expo registerVersioned expo whoaminpx expo whoamiVersioned expo confignpx expo configVersioned expo prebuildnpx expo prebuildVersioned expo customize:webnpx expo customizeVersioned, and renamed expo build:webnpx expo export:webVersioned, and renamed expo ejectnpx expo prebuildMerged into npx expo prebuild expo start:webnpx expo startMerged into npx expo start
Legacy Notes expo client:iosRemoved in favor of Dev Clients expo sendRemoved expo client:install:iosUnimplemented expo client:install:androidUnimplemented expo doctorMoved to npx expo-doctor expo upgradeUndecided
The new expo update command uses a different hosting service than the legacy expo publish command.
Legacy New Notes expo publisheas updateMoved to eas-cli expo publish:seteas updateMoved to eas-cli expo publish:rollbackeas updateMoved to eas-cli expo publish:historyeas updateMoved to eas-cli expo publish:detailseas updateMoved to eas-cli expo credentials:managereas credentialsMoved to eas-cli expo fetch:ios:certseas credentialsMoved to eas-cli expo fetch:android:keystoreeas credentialsMoved to eas-cli expo fetch:android:hasheseas credentialsMoved to eas-cli expo fetch:android:upload-certeas credentialsMoved to eas-cli expo push:android:uploadeas credentialsMoved to eas-cli expo push:android:showeas credentialsMoved to eas-cli expo push:android:cleareas credentialsMoved to eas-cli expo urleas build:listMoved to eas-cli expo url:ipaeas build:listMoved to eas-cli expo url:apkeas build:listMoved to eas-cli expo webhookseas webhookMoved to eas-cli expo webhooks:addeas webhook:createMoved to eas-cli expo webhooks:removeeas webhook:deleteMoved to eas-cli expo webhooks:updateeas webhook:updateMoved to eas-cli expo build:ioseas build -p iosMoved to eas-cli expo build:androideas build -p androidMoved to eas-cli expo build:statuseas build:listMoved to eas-cli expo upload:androideas submit -p androidMoved to eas-cli expo upload:ioseas submit -p iosMoved to eas-cli
Dev Tools UI has been deprecated in favor of the CLI's Terminal UI, Flipper, and Remote Debugging.
npx expo install now supports installing the correct version of react-native, react, react-dom automatically.
Tooling now supports pnpm along with Yarn and npm, the default is still Yarn.
Dropped the deprecated --config argument across all commands. Use app.config.js instead.
No longer shipping adb in the CLI. Users must manually install adb to interact with connected Android devices.
Experimental $EXPO_USE_APPLE_DEVICE feature (expo run:ios -d) is now the default behavior. Global ios-deploy package is no longer required.
npx expo export works like expo export --experimental-bundle which is exports for eas update and not expo publish. PR .
Dropped arguments: --public-url, --asset-url, --merge-src-url, --merge-src-dir, -t, --target, --experimental-bundle, --config, -q, --quiet
Dropped aliases for --dump-assetmap (-d) and --dump-sourcemap (-s).
Dropped warning about clearing dist folder that is shown between runs, this is akin to all other bundler commands across web tooling.
Dropped all merging code because experimental bundle does not support index files so we don't need to support merging index files.
Dropped the quiet flag as this appears to do nothing anymore.
Parts of expo upgrade have been merged into npx expo install via the --fix and --check flags. PR .
expo doctor has been deprecated in favor of npx expo-doctor for projects using SDK 46 and higher.
Dropped unused generated .exprc, .expo/packager-info.json files.
Dropped all deprecated support for *.expo.js files.
Reduced usage of .expo/settings.json to provide a more sandboxed state between processes.
Dropped $XDL_PORT, $XDL_HOST, $XDL_SCHEME, $SERVER_URL in favor of $EXPO_STAGING and $EXPO_LOCAL environment variables.
Expo 中文网 - 粤ICP备13048890号