Skip to content

Commands

CodePushGo CLI commands should be run from your React Native project unless the command explicitly says otherwise. Public examples use npm and npx; inside this repo we use bun and bunx.

CodePushGo uses your native React Native app identity as the app id:

  • iOS: ios.bundleIdentifier from Expo config or PRODUCT_BUNDLE_IDENTIFIER from the Xcode project
  • Android: android.package from Expo config or applicationId from Gradle

Do not create a separate CodePushGo-specific id when the native bundle id already exists.

Login

Terminal window
npx @codepushgo/cli@latest login

Stores your CodePushGo API key for later CLI commands.

Options:

  • --apikey <key> overrides the stored key for one command
  • --local stores the key in the local project config instead of the global config

Init

Terminal window
npx @codepushgo/cli@latest init

Connects the current React Native app to CodePushGo. The command detects the native bundle id, creates or verifies the app in the console, and writes the local CodePushGo config used by upload commands.

Options:

  • --app-id <bundle-id> uses an explicit native bundle id when auto-detection is not possible
  • --name <name> sets the display name in the console
  • --apikey <key> uses a specific API key for this run

App Commands

Add

Terminal window
npx @codepushgo/cli@latest app add com.company.app

Creates a CodePushGo app record for a React Native native bundle id.

Options:

  • --name <name> sets the console display name
  • --icon <path> uploads a custom app icon when supported
  • --retention <days> sets bundle retention; 0 means keep indefinitely
  • --apikey <key> uses a specific API key

List

Terminal window
npx @codepushgo/cli@latest app list

Lists apps available to the current API key.

Set

Terminal window
npx @codepushgo/cli@latest app set com.company.app --name "Production app"

Updates app metadata.

Delete

Terminal window
npx @codepushgo/cli@latest app delete com.company.app

Deletes an app record. Use carefully; this removes the app from the update backend.

Bundle Commands

Upload

Terminal window
npx @codepushgo/cli@latest upload

Builds the JavaScript bundle for the detected React Native project and uploads it to CodePushGo.

Common options:

  • --app-id <bundle-id> uploads for a specific native bundle id
  • --platform ios|android builds one platform
  • --channel <channel> links the uploaded bundle to a channel
  • --version <version> sets the bundle version; by default the CLI reads the project version
  • --entry-file <file> sets the React Native entry file
  • --bundle-dir <dir> uploads an already-built bundle directory
  • --external <url> stores an external bundle URL instead of uploading bytes
  • --apikey <key> uses a specific API key

Release

Terminal window
npx @codepushgo/cli@latest release --channel production

Promotes the latest compatible bundle to a channel.

Options:

  • --app-id <bundle-id> releases for a specific app
  • --version <version> releases a specific bundle version
  • --channel <channel> selects the channel, for example production, beta, or development
  • --rollout <percent> starts a staged rollout

List Bundles

Terminal window
npx @codepushgo/cli@latest bundle list com.company.app

Lists uploaded JavaScript bundles for an app.

Delete Bundle

Terminal window
npx @codepushgo/cli@latest bundle delete com.company.app --bundle 1.0.2

Deletes one bundle version when it is not required by an active channel.

Channel Commands

Create

Terminal window
npx @codepushgo/cli@latest channel add production com.company.app

Creates a channel for a React Native app.

List

Terminal window
npx @codepushgo/cli@latest channel list com.company.app

Lists channels for the app.

Set

Terminal window
npx @codepushgo/cli@latest channel set production com.company.app --bundle 1.0.2

Points a channel to a bundle version. Devices on that channel receive the selected JavaScript bundle on their next update check.

Delete

Terminal window
npx @codepushgo/cli@latest channel delete beta com.company.app

Deletes an unused channel.

Debug

Terminal window
npx @codepushgo/cli@latest app debug com.company.app

Prints app, channel, and device update state useful for support.

Doctor

Terminal window
npx @codepushgo/cli@latest doctor

Checks the local React Native project, CodePushGo config, CLI version, and API connectivity.

CI Example

Terminal window
npm ci
npx @codepushgo/cli@latest upload --app-id com.company.app --platform ios --channel production --apikey "$CODEPUSHGO_API_KEY"
npx @codepushgo/cli@latest upload --app-id com.company.app --platform android --channel production --apikey "$CODEPUSHGO_API_KEY"

Use one app id per native app identity. If your iOS bundle id and Android application id differ, register and upload each one separately.