CLI for Capacitor
CLI for Capacitor release notes
Release notes for cmpatch-capacitor, published as
@codemagic/capacitor-patch-cli. It publishes and manages releases for apps
that use the Capacitor SDK. Self-host operator
commands (selfhost install, upgrade, backup) are in
cmpatch for all frameworks. The other surfaces'
releases are on the Release Notes page.
npm install -g @codemagic/capacitor-patch-cli@latest
Reference: CLI reference · Binary versions for Capacitor · GitHub releases
0.3.0
28th October 2026
Breaking
cmpatch-capacitor token revoke now shows what it is about to revoke and asks
first, as app remove does, because anything still signing in with the token,
such as a CI pipeline, stops working. Without a terminal (in CI, or with
--format json) it exits 2 instead of running. Add --yes to scripts that
call it.
Failures and daily numbers from the CLI
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|1yor--from/--to, and narrow it with--binary-version/--binary-version-prefix.deployment failures/failure-eventsandrelease failures/failure-events: Drill into a failure reason fromdeployment metricsorrelease metrics, as the dashboard's failure dialog does.failures --reason <reason>lists the codes under it; adding--code <code>, or--no-codefor the failures that reported none, shows that code's top exit reasons and messages.failure-eventslists the single events, a page at a time with--limitand--cursor.
A server that does not publish these numbers answers with one sentence saying
so, and the command exits 1.
Smaller changes
team listandteam show: List the teams you can see and show one, so you can find the name or ID to pass as--team.release list --binary-version: Lists only the releases that target one binary version (--binary-version 1.4.0) or every version under a prefix (--binary-version-prefix 1.4).app settingwithout a flag shows the current settings: Run it without--require-code-signingto see whether the app requires code signing.token revoke --name <name>: Revoke a token by the name you gave it, instead of looking up its ID. A name shared by several tokens is refused with their IDs, so you can pass--token-id.
Fixes
- Overlapping runs no longer sign each other out: Runs that share the stored session (a terminal and a CI step, two jobs on one machine) now refresh an expired access token one at a time under a lock next to the credential store. A run that gets the lock first re-reads the store and, if another run has already refreshed the session, 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-capacitor <command> --help` for usageinstead of pointing at the root listing.
See the CLI reference and CLI release.
0.2.0
19th October 2026
Breaking
Without --format, cmpatch-capacitor now prints results as JSON when stdout
is piped or redirected, as cmpatch does. On a terminal the output is still
text. Scripts that read the text output from a pipe should pass
--format text. Progress lines and prompts are unchanged: a piped run still
asks before a change when someone is at the terminal, and only an explicit
--format json never asks.
cmpatch-capacitor doctor
doctor checks why an app may not receive updates, without changing
anything. Run it from the app's root:
cmpatch-capacitor doctor
It reads the app's Capacitor configuration and checks the sign-in, the server
connection, the app and deployment that each platform's deployment key belongs
to, the native project setup, and the download origin. It reports deployment
keys that are missing or do not match the app's settings. With
--verify-delivery it also checks the published manifest and artifacts for
the app's exact version. It ends by naming where to watch the SDK's logs on a
device. It exits 1 when a check fails; --platform checks one platform and --verbose
shows every check.
See the CLI reference and CLI release.
0.1.0
6th October 2026 · Requires server 0.6.0 or newer
First published version. Flags may still change before 1.0.
cmpatch-capacitor is a standalone CLI for Capacitor apps and does not
require cmpatch. It signs in, creates apps and deployments, publishes built
web assets with release create, and manages existing releases with
release patch, disable, enable, promote, rollback, and adoption
metrics. CI can sign in with personal access tokens.
- Web root check:
release createchecks that the bundle hasindex.htmlat its top level before uploading. A bundle rooted one folder too high installs but boots to a blank screen. - Binary version targeting: The CLI does not compute a native
fingerprint;
--target-binary-versionties a release to a native build. See Binary versions for Capacitor.release patchandpromoterefuse a target override that moves a Capacitor release to another binary version. - Framework scoping:
app createrecords the app as a Capacitor app, and app lists and pickers show only Capacitor apps. Server 0.6.0 stores the framework, and the dashboard shows thecmpatch-capacitorrelease command for these apps. - Shared default server:
cmpatch-capacitorreads the default server from the same~/.codemagic-patch/config.jsonascmpatch, andconfig setwrites to it. Sign-ins are stored separately incredentials-capacitor.json.
See the CLI release.