Skip to main content

CLI

CLI release notes

Release notes for cmpatch, published as @codemagic/patch-cli. The CLI has commands for app developers (release-react, wire, doctor) and for self-host operators (selfhost install, upgrade, backup); entries name the audience where it matters. The other surfaces' releases are on the Release Notes page.

npm install -g @codemagic/patch-cli@latest

Reference: CLI reference · GitHub releases

0.9.0​

3rd November 2026

Install with a separate Postgres database​

On a first cmpatch selfhost install, the wizard asks where the database runs. The default is still the bundled Postgres on the server. A separate database is for backups and point-in-time recovery, and is needed for disk space above a few million daily active users. Choose it and paste your provider's connection string (--database-url on an unattended run). The wizard shows the server's IP to allow, then checks from the server itself that the database user can connect and create tables. The choice is fixed once .env.selfhost is written, so --repair refuses --database-url.

The string has to end in sslmode=require. A string that names sslrootcert or sslmode=verify-full is refused. The stored string gains uselibpqcompat=true, so the server's PostgreSQL client (pg 8) treats require as encrypt-only. Without it, pg 8 treats require as verify-full, which rejects the certificates managed Postgres providers use. See Run the installer.

Promote picks deployments, and both release commands ask for the rollout​

cmpatch release promote now lists the app's deployments for you to pick the source and destination, instead of asking you to type their names. release-react already did this for its deployment. Both commands now ask for a rollout percentage (Enter keeps 100) instead of silently using 100, so the confirmation shows a value you chose. Runs that cannot prompt (--yes, CI, --format json, piped output) keep the default, and an explicit --rollout-percentage is left alone.

Usage report opt-out​

cmpatch selfhost install --no-telemetry writes SERVER_TELEMETRY=false, so the server never sends the daily anonymous usage report that server 0.9.0 turns on. The flag works on a first install, with --ngrok and --fly, and with --repair on an installed server. The install summary says whether the report is on.

Fixes​

  • init accepts every Patch server: cmpatch init turned down valid servers with "not like a Codemagic Patch server" because its /health/ready probe expected checks to be a list, while the server sends an object. The probe now matches what the server sends.
  • Silo, not MinIO: The storage choice in the install wizard and the local evaluation stack call the bundled object store Silo, which is what runs. The MINIO_* variables, the /minio/health/ready path, and backup archive names are unchanged.

See the CLI reference and CLI release.

0.8.0​

28th October 2026

Install on Fly.io​

cmpatch selfhost install --fly deploys Patch onto Fly.io with Tigris object storage, from this machine and without a VPS, DNS records, or certificates. It can create Postgres or use a database you run. Existing Fly installs can also be registered.

selfhost upgrade, backup, and restore work on a recorded Fly install: upgrade snapshots the database when cmpatch created it and deploys the newest release (or --tag), backup saves the database dump on this machine, and restore replaces the database from one of those backups while your apps keep downloading from storage. See Install on Fly.io, Fly backup, and Fly restore.

Install on this machine with ngrok​

cmpatch selfhost install --ngrok installs the full stack, with OAuth sign-in and bundled Postgres and storage, on the machine it runs on, reached at your ngrok account's https:// address. It is for trying Patch on real devices without a domain, open ports, or a server: the free plan is capped, and apps keep the address they were built with. See Reach a real phone with ngrok.

Fixes​

  • Overlapping runs no longer sign each other out: When two runs that share the stored session (a terminal and a CI step, two jobs on one machine) both needed to refresh an expired access token, the second refresh was refused and that run deleted the stored credentials, including the session the first run had just saved. Runs now refresh one at a time under a lock next to the credential store, and a run that gets the lock first re-reads the store: if another run has already refreshed the session, it uses that session instead of sending a refresh of its own. A refresh the server refuses still clears the stored credentials and asks you to sign in again.
  • Flag errors point at the command's help: An unknown flag, a missing or invalid value, or a stray argument inside a command now ends with Run `cmpatch help <command>` for usage instead of pointing at the root listing, which does not name the command's flags. Contributed in codemagic-patch#37.

See the CLI reference and CLI release.

0.7.0​

19th October 2026

Breaking​

cmpatch member remove, member update, member invite-revoke, and token revoke now show what they change and ask before they change anyone's access, as app remove does. Without a terminal (in CI, with --non-interactive, or with --format json) they exit 2 instead of running. Add --yes to scripts that call them.

Dashboard parity: server, teams, app transfer​

  • cmpatch server status: Prints the server's own view of its database, storage, disk, download URL, and version, the same checks as the dashboard's Status page. cmpatch doctor checks from your machine instead.
  • cmpatch team list and cmpatch team show: List the teams you can see and show one team's details, so you can find the name or ID to pass as --team or store with cmpatch config set team.
  • cmpatch app transfer: Moves an app and its deployments to another team, picked with --dest-team / --dest-team-id or from a list of your other teams, and confirms unless --yes. Capacitor apps move the same way: pass the ID that cmpatch-capacitor app list shows as --app-id.

Metrics from the CLI​

cmpatch help metrics lists these commands alongside deployment metrics, deployment history, and release metrics.

  • cmpatch deployment timeseries: Prints a deployment's counters per day, the numbers behind the dashboard's deployment chart. Pick the window with --range 7d|30d|90d|1y or --from / --to, narrow it with --binary-version / --binary-version-prefix, and use --format json for the per-release series.
  • cmpatch deployment failures / failure-events and cmpatch release failures / failure-events: Drill into a failure reason from deployment metrics or release metrics, as the dashboard's failure dialog does. failures --reason <reason> lists the codes under it; adding --code <code>, or --no-code for the failures that reported none, shows that code's top exit reasons and messages. failure-events lists the single events of one code, a page at a time with --limit and --cursor.
  • cmpatch release list --binary-version: Lists only the releases that target one binary version (--binary-version 1.2.3) or every version under a prefix (--binary-version-prefix 1.2), like the binary version filter on the dashboard's deployment page.

Smaller changes​

  • cmpatch app setting without a flag shows the current settings: Run without --require-code-signing to see whether the app requires code signing, instead of failing on a missing flag or asking for a value. Pass --require-code-signing=<true|false> to change it, as before.
  • cmpatch release promote: Without --label, a terminal run lets you pick the release from the source deployment's list, newest first with its status and target binary version, instead of typing a label. Help no longer claims --rollout-percentage and --disabled default to the source release; they default to 100 and off.
  • cmpatch token revoke --name <name>: Revoke a token by the name you gave it at creation, instead of looking up its ID. A name shared by several tokens is refused with their IDs, so you can pass --token-id.
  • cmpatch release inspect --logs removed: The hidden flag only ever reported that no log API exists; it now fails as an unknown flag. For failure detail, use deployment failures / failure-events.

See the CLI reference and CLI release.

0.6.0​

6th October 2026

React Native app filtering​

Teams can now include Capacitor apps, which are managed with cmpatch-capacitor. cmpatch now shows only React Native apps: app create records the app as React Native, and app list, the interactive pickers, init, and doctor request only React Native apps from the server. Apps selected by id (--app-id, --deployment-id) are not checked. app show prints the framework when the server reports one. On servers older than 0.6.0, all apps are listed; every app on such a server is a React Native app.

  • Server error hints: Server 0.6.0 error messages no longer name a cmpatch command, so the CLI now prints the remedy itself. For example, an upload rejected for a missing signature still prints the --private-key-path commands to run.

See the CLI reference and CLI release.

0.5.0​

23rd September 2026

cmpatch wire​

cmpatch wire installs the Patch SDK in a supported React Native or Expo project and configures it. It sets the deployment key and server URLs, adds the native bundle-loading hooks, and wraps your root component with Patch.wrap. cmpatch init now runs it automatically; pass --skip-wire to only connect the app. Run cmpatch wire --dry-run --diff to preview the changes. If wire cannot finish the setup automatically, it prints a Patch.wrap snippet to add by hand.

init does not run wiring while CodePush or expo-updates is still in the project. See Native setup.

GitLab and Bitbucket sign-in in the self-host wizard​

For operators: cmpatch selfhost install now supports Bitbucket Cloud and GitLab sign-in, in the wizard and in non-interactive setup. For a self-managed GitLab instance, enter its address when asked or pass --gitlab-oauth-base-url.

  • Release conflict hints: When a release change is blocked by a 409 conflict, the CLI now names the release to wait for and the cmpatch release inspect --release-id <id> --wait command to run before retrying.
  • React Native 0.87: Fixed cmpatch release-react on React Native 0.87, which removed react-native/cli.js from its package exports. Previously the command failed with "Could not resolve react-native from project root", mostly in npm projects.
  • Binary version detection: Improved iOS and Android version detection, so OTA releases target the correct app version. It now handles Android versionNameSuffix and asks you to pass the target explicitly when the project is ambiguous.
  • cmpatch doctor: No longer fails the credential check for logins made with cmpatch login --token. Added --xcode-project-file, --xcode-target-name, and --build-configuration-name.
  • CI logs: Progress steps now appear in non-interactive output, including during long builds and bundle uploads.
  • cmpatch debug: Now shows only Patch SDK logs and filters out unrelated system messages.
  • cmpatch release metrics: Columns are now labeled ready and applied.

See the CLI reference and CLI release.

0.4.0​

14th September 2026

cmpatch demo​

With the local evaluation stack running, cmpatch demo runs an OTA update on a demo app, without integrating Patch into your own app. The wizard checks prerequisites, builds a bundled demo app on an iOS simulator or Android emulator, and shows a bug in its catalog. After you approve publishing the fix, it resumes the app, which downloads, installs, and applies the update.

cmpatch doctor​

cmpatch doctor checks React Native and Expo integration on iOS and Android, including native configuration, authentication, and deployment settings. The report lists likely causes and separates confirmed failures from incomplete checks. Add --verify-delivery to probe manifests and artifacts; JSON output is available for CI. The optional --fix --server-url <url> creates missing server configuration after a readiness check, if you approve it.

External storage and DNS in the self-host wizard​

For operators: cmpatch selfhost install now offers Cloudflare R2, Amazon S3, and Google Cloud Storage alongside bundled MinIO. The wizard configures storage automatically or prints console instructions, then verifies public downloads and private-object protection. DNS setup supports Cloudflare and compatible Domain Connect providers, with manual instructions as a fallback.

When a setup step fails, the wizard lets you correct it and retry. These options apply to new installations; they do not migrate existing storage.

See the CLI reference and CLI release.

0.3.0​

7th September 2026

Self-host install wizard​

For operators: cmpatch selfhost install installs and operates a production server from your own machine. The wizard pairs with the host over SSH, checks it, can install Docker and Git with your consent, then sets up domains, DNS, GitHub OAuth, and optional Cloudflare or CloudFront. The CLI also runs backup, restore, and upgrade.

cmpatch selfhost install

If you have no server URL yet, cmpatch init offers to run the install, then continues with sign-in and app creation. An interrupted backup restarts the server before it exits, so the server is not left stopped. Interrupted restore and upgrade runs print the rollback command instead. The wizard sets up the bundled Postgres and MinIO stack with GitHub sign-in. Bitbucket, external databases, and S3/GCS still require running install.sh directly. See Install and Operations.

cmpatch selfhost local-eval​

The evaluation stack is unchanged, but you no longer clone the repo first. cmpatch keeps its own copy and updates it on later runs. If Docker is missing or not running, it asks before installing or starting it.

cmpatch selfhost local-eval

See Local quickstart and the CLI release.

0.2.0​

25th August 2026

Interactive prompts​

When a flag is missing, cmpatch now prompts for it instead of exiting with a usage line. It also shows progress and offers sign-in and retry options when browser login fails. In CI and scripts the CLI stays non-interactive: pass the flags you need, or use --yes where supported. See CLI command reference.

Fingerprint mismatch check​

The CLI now blocks a release aimed at the wrong native binary unless you confirm it. It compares the release fingerprint against the value already recorded for that deployment and binary version. When they differ, the CLI shows the details and lets you cancel or proceed.

In CI, where there is no prompt, pass --allow-fingerprint-mismatch only after you have verified the release targets the intended native binary:

cmpatch release-react \
--deployment Production \
--allow-fingerprint-mismatch \
--yes

The CLI sends block_on_fingerprint_mismatch: true by default, so on server 0.2.0 or newer a mismatch returns 409 and no release is created. See Fingerprinting.

  • Failure reasons: cmpatch release metrics now breaks failures down by category (integrity, signature, rollout, or another category) instead of showing a single failed count. See Analytics and metrics.

See the CLI release.