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.bundleIdentifierfrom Expo config orPRODUCT_BUNDLE_IDENTIFIERfrom the Xcode project - Android:
android.packagefrom Expo config orapplicationIdfrom Gradle
Do not create a separate CodePushGo-specific id when the native bundle id already exists.
Login
npx @codepushgo/cli@latest loginStores your CodePushGo API key for later CLI commands.
Options:
--apikey <key>overrides the stored key for one command--localstores the key in the local project config instead of the global config
Init
npx @codepushgo/cli@latest initConnects 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
npx @codepushgo/cli@latest app add com.company.appCreates 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;0means keep indefinitely--apikey <key>uses a specific API key
List
npx @codepushgo/cli@latest app listLists apps available to the current API key.
Set
npx @codepushgo/cli@latest app set com.company.app --name "Production app"Updates app metadata.
Delete
npx @codepushgo/cli@latest app delete com.company.appDeletes an app record. Use carefully; this removes the app from the update backend.
Bundle Commands
Upload
npx @codepushgo/cli@latest uploadBuilds 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|androidbuilds 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
npx @codepushgo/cli@latest release --channel productionPromotes 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 exampleproduction,beta, ordevelopment--rollout <percent>starts a staged rollout
List Bundles
npx @codepushgo/cli@latest bundle list com.company.appLists uploaded JavaScript bundles for an app.
Delete Bundle
npx @codepushgo/cli@latest bundle delete com.company.app --bundle 1.0.2Deletes one bundle version when it is not required by an active channel.
Channel Commands
Create
npx @codepushgo/cli@latest channel add production com.company.appCreates a channel for a React Native app.
List
npx @codepushgo/cli@latest channel list com.company.appLists channels for the app.
Set
npx @codepushgo/cli@latest channel set production com.company.app --bundle 1.0.2Points a channel to a bundle version. Devices on that channel receive the selected JavaScript bundle on their next update check.
Delete
npx @codepushgo/cli@latest channel delete beta com.company.appDeletes an unused channel.
Debug
npx @codepushgo/cli@latest app debug com.company.appPrints app, channel, and device update state useful for support.
Doctor
npx @codepushgo/cli@latest doctorChecks the local React Native project, CodePushGo config, CLI version, and API connectivity.
CI Example
npm cinpx @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.