@zimbstech/patchforge-cli
v0.1.3
Published
PatchForge CLI — ship OTA releases from CI/CD
Readme
@zimbstech/patchforge-cli
Ship OTA releases to PatchForge from CI/CD — create a release from a CI-built React Native bundle, wait for server-side processing (hash → sign → manifest → patches), and deploy it per your server's auto-deploy policy.
npx @zimbstech/patchforge-cli@latest release \
--app my-app --channel Staging \
--bundle ./build/index.android.bundle \
--store-version 1.4.0 --bundle-version "1.4.0.$GITHUB_RUN_NUMBER" \
--server https://patchforge.example.com \
--api-token "$PATCHFORGE_TOKEN"Requires Node ≥ 20. Authenticates with a PatchForge Personal Access Token (dashboard →
Settings → API Keys); pass it via --api-token or the PATCHFORGE_TOKEN env var (preferred
in CI). The server URL comes from --server or PATCHFORGE_SERVER.
patchforge release
| Flag | Required | Description |
|---|---|---|
| --app <slug> | yes | Application slug |
| --channel <name> | yes | Channel name |
| --bundle <path> | yes | Path to the built bundle file (uploaded verbatim) |
| --store-version <v> | yes | Store/app version (x.y.z) |
| --bundle-version <v> | yes | Bundle version (x.y.z or x.y.z.w) |
| --build-number <n> | no | Build number |
| --release-type <type> | no | Standard | Hotfix | Mandatory |
| --notes <text> | no | Release notes |
| --git-sha <sha> | no | Commit SHA recorded on the release |
| --source-ref <ref> | no | Branch/tag ref recorded on the release |
| --auto-deploy <bool> | no | Overrides the server's auto-deploy default |
| --rollout <percent> | no | Rollout percentage (1–100) |
| --wait-timeout <sec> | no | Max seconds to wait for processing (default 600) |
| --server <url> | yes* | Server base URL (or PATCHFORGE_SERVER) |
| --api-token <token> | yes | PAT (*or PATCHFORGE_TOKEN) |
Exit codes: 0 success — including a re-run where the same bundle version is already
released (idempotent, never re-uploads or re-deploys); 1 failed release, timeout, or HTTP
error; 2 bad arguments.
Auto-deploy: the server computes resolvedAutoDeploy per channel (on for non-Production
environments, off for Production) unless --auto-deploy overrides it; the CLI polls the release
to Ready, then deploys only when it resolves true.
Prefer GitHub Actions? Use the composite Action instead:
uses: ZimbsTech/patchforge/actions/release@main — see the repo's actions/release/README.md.
Full guide: docs/guides/ci-cd.md in the PatchForge repo.
