Skip to main content

CodePush CLI reference

note

The examples use plugin mode syntax. In standalone mode, replace bitrise :codepush with codepush.

Run bitrise :codepush <command> --help for detailed flags and usage of any command.

Global flagsClick to copy link

FlagDescription
--app-idRelease management app UUID (env: CODEPUSH_APP_ID)
--json, -jOutput results as JSON to stdout
--server-urlAPI server base URL (env: CODEPUSH_SERVER_URL)
--progress-styleProgress indicator style: bar (default), spinner, counter

CommandsClick to copy link

Release managementClick to copy link

CommandDescription
bundleBundle JavaScript for an OTA update
push [bundle-path]Push an OTA update
rollbackRollback to a previous release
promotePromote a release from one deployment to another
patchUpdate metadata on an existing release

Deployment managementClick to copy link

CommandDescription
deployment listList all deployments (--display-keys / -k to include key column)
deployment add <name>Create a new deployment (--key / -k for a custom deployment key)
deployment info <deployment>Show deployment details and latest release
deployment rename <deployment>Rename a deployment (--name, -n)
deployment remove <deployment>Delete a deployment (--yes / -y to confirm)
deployment history <deployment>Show release history (--limit / -n, default 10; --display-author / -a to include author column)
deployment clear <deployment>Delete all updates from a deployment (--yes / -y to confirm)

Update managementClick to copy link

CommandDescription
update info <deployment>Show update details (--label / -l for specific version)
update status <deployment>Show update processing status (--label / -l)
update remove <deployment>Delete an update (--label / -l required, --yes / -y to confirm)

SetupClick to copy link

CommandDescription
initInitialize project config (.codepush.json) with app ID
auth loginStore a Bitrise API token locally
auth revokeRemove the stored API token

Developer toolsClick to copy link

CommandDescription
debug <platform>Stream CodePush log output from a connected device or simulator (android or ios)

OtherClick to copy link

CommandDescription
versionPrint version information

Environment variablesClick to copy link

VariableDescription
BITRISE_API_TOKENAPI token for authentication
CODEPUSH_APP_IDDefault release management app UUID (used when --app-id is not set)
CODEPUSH_DEPLOYMENTDefault deployment name or UUID (used when --deployment is not set)
CODEPUSH_SERVER_URLAPI server base URL (used when --server-url is not set)
NO_COLORDisable colored terminal output

Bitrise CI variables (read automatically)Click to copy link

VariableDescription
BITRISE_BUILD_NUMBERAttached to push metadata
BITRISE_DEPLOY_DIRDirectory for summary file export
GIT_CLONE_COMMIT_HASHAttached to push metadata

Exported variables (Bitrise CI)Click to copy link

After a successful push, rollback, promote, or patch, the CLI exports these via envman for downstream Bitrise steps:

VariableDescription
CODEPUSH_UPDATE_IDID of the created or modified update
CODEPUSH_APP_VERSIONApp version of the release
CODEPUSH_LABELRelease label (patch command only)

Exit codesClick to copy link

CodeMeaning
0Success
1Error (authentication failure, API error, validation error, etc.)

A non-zero exit code means the operation failed. Check stderr for the error message.