codepush_cli 0.2.10 copy "codepush_cli: ^0.2.10" to clipboard
codepush_cli: ^0.2.10 copied to clipboard

Command line tool for CodePush: register an app, build a patchable release, and publish signed Dart patches to installed Android and iOS apps.

codepush_cli #

The codepush command: register an app, build a patchable release, and publish signed Dart patches to installed apps.

dart pub global activate codepush_cli

Once per machine #

codepush login --token <key from your dashboard>

# iOS only — where your engine fork lives. Android needs none of this.
codepush setup --engine-src ~/src/flutter-engine/flutter/engine/src

This writes ~/.codepush/. Engine paths, your login and your private signing key live there, never in a project: an engine checkout under one developer's home directory is why that used to be an uncommittable file.

Once per project #

codepush init                 # registers the app, writes codepush.yaml
codepush keys generate        # do this BEFORE your first release

codepush.yaml holds one key, app_id, and is safe to commit.

keys generate is not optional and not deferrable. The public key is compiled into every release, so a release built without one can never accept a patch — the only fix is another trip through app-store review.

The private half is written to ~/.codepush/keys/. Back it up. Lose it and no already-built release can be patched again, because the key those binaries trust cannot be changed.

The loop #

codepush release android          # build; ship this APK to the Play Store
# ... edit lib/ ...
codepush patch android --rollout-percent 10
codepush patches rollout 2 --percent 100

Start small. A rollout can be widened without rebuilding, and it needs a fresh signature each time — the server cannot widen one on its own.

iOS is the same shape with ios in place of android, plus an archive step so the release's kernel survives for patches to compile against:

codepush release ios
codepush releases archive <release-id>
codepush patch ios

When something is wrong #

codepush patches revoke 7 --reason "crash loop"

Devices running that patch go back to the shipped build on their next cold start. This is the only command that needs no signing key, deliberately: needing one to stop a bad patch means being unable to stop it from a machine that does not hold it.

Everything else #

codepush doctor               can this engine actually patch a release? (iOS)
codepush releases list        what can still be patched
codepush patches list         what has been published
codepush verify ios           install on a connected iPhone and report
codepush keys show            which key this app trusts, and whether you have it

What the CLI never sends #

Your private signing key. Patches are signed here, on this machine, and the control plane verifies with the public half. That is what makes a compromised server unable to ship code to your users.

0
likes
120
points
0
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Command line tool for CodePush: register an app, build a patchable release, and publish signed Dart patches to installed Android and iOS apps.

Topics

#code-push #cli #deployment

License

MIT (license)

Dependencies

args, codepush_protocol, crypto, path, yaml

More

Packages that depend on codepush_cli