ArchiveExpo SnackDiscord and ForumsNewsletter

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.

Installation

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:

Terminal
- 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.

Checking CLI version

To check the current version of the global Expo CLI you are using, use the --version option.

Terminal
- expo --version

Commands

You can view the list of commands available with your version in your terminal using the --help option.

Terminal
- expo --help

To learn more about a specific command and the options it may have, use expo [command] --help.

Terminal
# Usage: expo [command] [options]

You will find a list of all commands derived from the latest version of Expo CLI.

Based on expo-cli v5.2.0


Core

expo export

Export the static files of the app for hosting it on a web server
OptionDescription
--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.

expo init

Create a new Expo project

Alias: expo i

OptionDescription
-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

expo install

Install a module or other package to a project

Alias: expo add

OptionDescription
--npmUse npm to install dependencies. (default when package-lock.json exists)
--yarnUse Yarn to install dependencies. (default when yarn.lock exists)

expo run:android

Run the Android app binary locally
OptionDescription
--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.

expo run:ios

Run the iOS app binary locally
OptionDescription
--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.

expo send

Share the project's URL to an email address
OptionDescription
-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.

expo start

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. |

expo start:web

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. |


Auth

expo login

Login to an Expo account

Alias: expo signin

OptionDescription
-u, --username [string]Username
-p, --password [string]Password
--otp [string]One-time password from your 2FA device

expo logout

Logout of an Expo account

This command does not take any options.

expo register

Sign up for a new Expo account

This command does not take any options.

expo whoami

Return the currently authenticated account

Alias: expo w

This command does not take any options.


Client

expo client:install:ios

Install Expo Go for iOS on the simulator
OptionDescription
--latestInstall the latest version of Expo Go, ignoring the current project version.

expo client:install:android

Install Expo Go for Android on a connected device or emulator
OptionDescription
-d, --device [device]Device name to install the client on
--latestInstall the latest version of Expo Go, ignore the current project version.

Info

expo config

Show the project config
OptionDescription
-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.

expo diagnostics

Log environment info to the console
OptionDescription
--config [file]Deprecated: Use app.config.js to switch config files instead.

expo doctor

Diagnose issues with the project
OptionDescription
--fix-dependenciesFix incompatible dependency versions
--config [file]Deprecated: Use app.config.js to switch config files instead.

expo upgrade

Upgrade the project packages and config for the given SDK version

Alias: expo update

OptionDescription
--npmUse npm to install dependencies. (default when package-lock.json exists)
--yarnUse Yarn to install dependencies. (default when yarn.lock exists)

Eject

expo customize:web

Eject the default web files for customization
OptionDescription
-f, --forceAllows replacing existing files
--offlineAllows this command to run while offline
--config [file]Deprecated: Use app.config.js to switch config files instead.

expo eject

Create native Android and iOS project files. Learn more: https://docs.expo.dev/workflow/customizing/
OptionDescription
--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: ios, android, all. Default: all
--config [file]Deprecated: Use app.config.js to switch config files instead.

expo prebuild

Create native Android and iOS project files before building natively. Learn more: https://docs.expo.dev/workflow/customizing/
OptionDescription
--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: ios, android, 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.

Publish

SDK 49 will be the last version to support Classic Updates. To continue using the deprecated expo publish command, set updates.useClassicUpdates in your app config.

expo publish

Deploy a project to Expo hosting

Alias: expo p

OptionDescription
-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.

expo publish:set

Specify the channel to serve a published release

Alias: expo ps

OptionDescription
-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.

expo publish:rollback

Undo an update to a channel

Alias: expo pr

OptionDescription
--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.

expo publish:history

Log the project's releases

Alias: expo ph

OptionDescription
-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.

expo publish:details

Log details of a published release

Alias: expo pd

OptionDescription
--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

expo build:web

Build the web app for production
OptionDescription
-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.

Credentials

expo credentials:manager

Manage your credentials
OptionDescription
-p --platform [android|ios]Platform: [android|ios]
--config [file]Deprecated: Use app.config.js to switch config files instead.

expo fetch:ios:certs

Download the project's iOS standalone app signing credentials
OptionDescription
--config [file]Deprecated: Use app.config.js to switch config files instead.

expo fetch:android:keystore

Download the project's Android keystore
OptionDescription
--config [file]Deprecated: Use app.config.js to switch config files instead.

expo fetch:android:hashes

Compute and log the project's Android key hashes
OptionDescription
--config [file]Deprecated: Use app.config.js to switch config files instead.

expo fetch:android:upload-cert

Download the project's Android keystore
OptionDescription
--config [file]Deprecated: Use app.config.js to switch config files instead.

Notifications

expo push:android:upload

Upload an FCM key for Android push notifications
OptionDescription
--api-key [api-key]Server API key for FCM.
--config [file]Deprecated: Use app.config.js to switch config files instead.

expo push:android:show

Log the value currently in use for FCM notifications for this project
OptionDescription
--config [file]Deprecated: Use app.config.js to switch config files instead.

expo push:android:clear

Delete a previously uploaded FCM credential
OptionDescription
--config [file]Deprecated: Use app.config.js to switch config files instead.

Url

expo url

Log a URL for opening the project in Expo Go

Alias: expo u

OptionDescription
--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.

expo url:ipa

Log the download URL for the standalone iOS binary
OptionDescription
--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.

expo url:apk

Log the download URL for the standalone Android binary
OptionDescription
--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.

Webhooks

expo webhooks

List all webhooks for a project
OptionDescription
--config [file]Deprecated: Use app.config.js to switch config files instead.

expo webhooks:add

Add a webhook to a project
OptionDescription
--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.

expo webhooks:remove

Delete a webhook
OptionDescription
--id [id]ID of the webhook to remove.
--config [file]Deprecated: Use app.config.js to switch config files instead.

expo webhooks:update

Update an existing webhook
OptionDescription
--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.

Deprecated

expo build:ios

Superseded by eas build in eas-cli

Alias: expo bi

OptionDescription
-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.

expo build:android

Superseded by eas build in eas-cli

Alias: expo ba

OptionDescription
-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.

expo build:status

Superseded by eas build:list in eas-cli

Alias: expo bs

OptionDescription
--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.

expo upload:android

Superseded by eas submit in eas-cli

Alias: expo ua

OptionDescription
--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.

expo upload:ios

Superseded by eas submit in eas-cli

Alias: expo ui

OptionDescription
--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.

expo client:ios

Superseded by Expo Dev Clients
OptionDescription
--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.

Expo CLI migration

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.

LegacyNewNotes
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

Deprecated

LegacyNotes
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

Services

The new expo update command uses a different hosting service than the legacy expo publish command.

LegacyNewNotes
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

Other notes

  • 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.

Environment Variables

  • Dropped $XDL_PORT, $XDL_HOST, $XDL_SCHEME, $SERVER_URL in favor of $EXPO_STAGING and $EXPO_LOCAL environment variables.