npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@capgo/cli

v8.123.1

Published

A CLI to upload to capgo servers

Readme

Capgo CLI

Discord npm GitHub latest commit Security Rating Bugs Maintainability Rating Vulnerabilities

Command line tool to manage Capgo apps, bundles, channels, compatibility checks, and cloud builds from your terminal or CI.

Open-source CLI for Capacitor live updates.

Why Capgo CLI?

Shipping live updates should not require clicking through a dashboard for every release. Capgo CLI solves this by:

  • Fast setup - Connect a Capacitor app to Capgo with one guided command
  • CI-ready uploads - Build your app, upload the web bundle, and assign it to a channel
  • Compatibility checks - Detect when a native release is required instead of an OTA update
  • Channel control - Promote bundles through production, beta, QA, or custom release tracks
  • Cloud builds - Save credentials locally and request iOS or Android builds from the CLI
  • Automation - Use the SDK or MCP server for scripts, agents, and release tooling

Perfect for first-time setup, repeatable releases, native-vs-OTA decisions, and teams that want Capgo controlled from CI.

Features

  • ☁️ Cloud / Self hosted Support: Use Capgo Cloud or your own Capgo backend.
  • 🚀 Guided Setup: Initialize a Capacitor app and verify live updates end to end.
  • 📦 Bundle Management: Upload, list, delete, encrypt, decrypt, and clean bundles.
  • 📺 Channel Support: Assign bundles to release channels and manage rollout tracks.
  • 🧪 Compatibility: Check native package compatibility before shipping OTA updates.
  • 🔁 Delta Updates: Upload changed files only when instant updates are enabled.
  • 🔒 Security: Support signed and encrypted bundles for sensitive apps.
  • 📱 Device Runner: Launch iOS or Android devices and simulators from the CLI.
  • 🏗️ Cloud Builds: Request iOS and Android builds with locally stored credentials.
  • 🤖 MCP + SDK: Automate Capgo from AI agents, Node.js, or TypeScript scripts.
  • 🔋 Supports Android and iOS
  • ⚡️ Capacitor 4/5/6/7/8 support through the Capgo updater ecosystem
  • 🌐 Open Source Backend: Self install our backend in your infra

You have 3 ways possible:

  • Use capgo.app for a full featured live-update system with setup, upload, channels, rollback, stats, and cloud builds.
  • Use your own self-hosted backend with --api-host on supported commands (or localApi in capacitor config).
  • Use the CLI programmatically through the SDK or MCP server for custom release automation.

Quick Start

Create your account in capgo.app, get your API key, and run:

npx @capgo/cli@latest init YOUR_API_KEY com.example.app

For an app that is already configured, upload a new bundle with:

npx @capgo/cli@latest bundle upload com.example.app --path ./dist --channel production

Cordova projects without capacitor.config.*:

npx @capgo/cli@latest bundle upload com.example.app --mode cordova --path www --channel production

CI Upload Example

npm ci
npm run build
npx @capgo/cli@latest bundle upload com.example.app \
  --apikey "$CAPGO_API_KEY" \
  --path ./dist \
  --channel production \
  --bundle "$GITHUB_SHA" \
  --version-exists-ok

Add --fail-on-incompatible when CI must stop instead of uploading a bundle that cannot safely update the current native build.

Add --accept-incompatible when the mismatch is intentional (for example your JavaScript already checks that a native plugin exists before using it). The upload still warns, but Capgo will not send the crash-warning email.

Documentation

The most complete documentation is here.

  • CLI guide: https://capgo.app/docs/cli/overview/
  • Live updates setup: https://capgo.app/docs/plugin/cloud-mode/getting-started/
  • Cloud build guides: https://capgo.app/docs/cli/cloud-build/ios/ and https://capgo.app/docs/cli/cloud-build/android/

Community

Join the discord to get help.

Forks and branding

This CLI, like the rest of the repository, is licensed under the GNU Affero General Public License v3.0 (AGPL-3.0). That license covers the code only. It grants no rights to the Capgo name, wordmark, logos, or branding. Public forks, custom builds, and hosted or self-hosted services presented to others must use their own name and branding and make clear they are not Capgo and not endorsed by Capgo. Private internal self-hosting and truthful plain-text attribution are fine. See TRADEMARK.md.

Dynamic monorepos

When a root capacitor.config.ts selects an app-specific source through an environment variable, keep that selector active and pass the source to Capgo:

CAP_APP=qr-code-reader npx @capgo/cli@latest init \
  --package-json ./package.json \
  --main-file ./projects/qr-code-reader/src/main.ts \
  --capacitor-config ./env-configs/capacitor.config.qr-code-reader.ts

Capgo continues to load the root config while writing only the selected source. Use --capacitor-config on every config-changing CLI command, or the matching capacitorConfig SDK/MCP option.

📑 Capgo CLI Commands

📋 Table of Contents

🚀 Init

Alias: i

npx @capgo/cli@latest init

🚀 Initialize a new app in Capgo Cloud with step-by-step guidance. This includes adding code for updates, building, uploading your app, and verifying update functionality. Capgo bundles are web assets and can be fetched by anyone who knows the URL. Use encryption for banking, regulated, or other high-security apps. During the iOS run-on-device step, choose a physical iPhone/iPad or simulator. If you choose a physical device, the CLI lets you connect, unlock, and check again before it launches the app. If the selected Xcode uses Device Hub and Capacitor's native-run cannot open it, onboarding gives you a manual launch path. Run npx cap open ios, select the simulator in Xcode, choose Product > Run, and confirm that the baseline app opens before continuing. MCP live-update onboarding gives the same instructions and waits for deviceRunConfirmed: true. Run npx @capgo/cli@latest doctor for the upstream fix status and upgrade guidance.

Example:

npx @capgo/cli@latest init YOUR_API_KEY com.example.app

Options (Init)

| Param | Type | Description | | -------------- | ------------- | -------------------- | | -a | string | API key to link to your account | | -n | string | App name for display in Capgo Cloud | | -i | string | App icon path for display in Capgo Cloud | | --api-host | string | Custom Capgo API URL for self-hosting or testing, e.g. https://api.example.com or http://127.0.0.1:8787 (env: CAPGO_API_HOST) | | --files-host | string | Custom Capgo files API URL when it differs from --api-host (env: CAPGO_FILES_HOST) | | --package-json | string | Package JSON for the Capacitor app to onboard (useful in monorepos) | | --main-file | string | Application entry file to update (useful in monorepos) | | --capacitor-config | string | Capacitor config source to update (useful with dynamic monorepo configs) | | --no-analytics | boolean | Disable init analytics and terminal replay for this run |

📱 Run

📱 Run Capacitor apps on devices from the CLI.

📱 Device

npx @capgo/cli@latest run device

📱 Run your Capacitor app on a connected device or simulator. If you omit the platform in an interactive terminal, the command asks whether to start on iOS or Android. The command lists available devices and simulators, lets you reload the list, and runs with your selection. For iOS, this asks whether to use a physical iPhone/iPad or simulator before showing devices. Use --no-launch to print the resolved command without starting the app. When the selected Xcode uses Device Hub and Capacitor's native-run lacks support, simulator selection prints instructions to run the app from Xcode with npx cap open ios and Product > Run. It does not attempt the incompatible simulator command. Physical-device selection remains available in interactive mode. Run npx @capgo/cli@latest doctor for the upstream fix status and upgrade guidance.

Example:

npx @capgo/cli@latest run device ios --no-launch

Options:

| Param | Type | Description | | -------------- | ------------- | -------------------- | | --no-launch | boolean | Resolve and print the run command without starting the app |

🔹 Star

npx @capgo/cli@latest star

⭐ Star a Capgo GitHub repository to support the project. If you do not pass a repository name, this defaults to capacitor-updater in the Cap-go org.

🔹 Star-all

npx @capgo/cli@latest star-all

⭐ Star all Capgo GitHub repositories with a small random delay between each request. If you do not pass repositories, this defaults to all Cap-go repositories whose name starts with capacitor-.

Options (Star-all)

| Param | Type | Description | | -------------- | ------------- | -------------------- | | --min-delay-ms | string | Minimum delay in ms between each star action (default: 20) | | --max-delay-ms | string | Maximum delay in ms between each star action (default: 180) | | --max-concurrency | string | Maximum number of star requests running in parallel (default: 4) |

🔹 Channel-self

Upgrade @capgo/capacitor-updater off the legacy channel override without changing its major version. A Capacitor 5 app stays on updater 5. The command installs ^5.34.0, ^6.34.0, or ^7.34.0 for the major already in the project. It does not move the app to a newer Capacitor major. After the install, ship a new store build. A live update cannot change the native plugin.

Example:

npx @capgo/cli@latest channel-self upgrade

🔹 Upgrade

npx @capgo/cli@latest channel-self upgrade

Install the current channel-override release of the same major.

Example:

npx @capgo/cli@latest channel-self upgrade

Options:

| Param | Type | Description | | -------------- | ------------- | -------------------- | | --package-json | string | Paths to package.json files for monorepos (comma-separated) | | --dry-run | boolean | Print the install command and do not run it |

👨‍⚕️ Doctor

npx @capgo/cli@latest doctor

👨‍⚕️ Check if your Capgo app installation is up-to-date and gather information useful for bug reports. This command helps diagnose issues with your setup. For local iOS projects on macOS, doctor also checks whether the selected Xcode uses Device Hub and whether the native-run resolved by your app's @capacitor/cli supports it. An incompatible version fails diagnostics with manual launch instructions. Installing a separate top-level native-run does not necessarily update the copy used by Capacitor. Xcode 27 removed Simulator.app. native-run 2.1.0 (released November 2, 2026) adds Device Hub support. Capacitor 8 and Capacitor 9 both accept it through their native-run ^2.0.3 range, so refreshing the lockfile entry for the native-run used by @capacitor/cli is enough; a Capacitor major upgrade is not required. See the upstream issue: https://github.com/ionic-team/capacitor/issues/8620 Until native-run is updated, use npx cap open ios, select the simulator in Xcode, and choose Product > Run. You can also use a physical device or select an older installed Xcode that includes Simulator.app. After updating native-run, run doctor again. Keep the Capacitor packages on the same major version. Doctor also reports whether the iOS project has a Podfile, a Swift Package Manager package, or both. CocoaPods trunk is read-only from December 2, 2026, so pods resolved from public trunk no longer receive new versions (including security fixes); pods loaded from node_modules or private spec repos are not affected. Doctor warns projects with a Podfile to migrate to Swift Package Manager: https://capgo.app/blog/how-to-migrate-your-capacitor-app-to-spm/

Example:

npx @capgo/cli@latest doctor

Options (Doctor)

| Param | Type | Description | | -------------- | ------------- | -------------------- | | --package-json | string | Paths to package.json files for monorepos (comma-separated) |

🔑 Login

Alias: l

npx @capgo/cli@latest login

🔑 Save your Capgo API key to your machine or local folder for easier access to Capgo Cloud services. Use --apikey=******** in any command to override it.

Example:

npx @capgo/cli@latest login YOUR_API_KEY

Options (Login)

| Param | Type | Description | | -------------- | ------------- | -------------------- | | -a | string | API key to link to your account | | --local | boolean | Only save in local folder, git ignored for security. | | --api-host | string | Custom Capgo API URL for self-hosting or testing, e.g. https://api.example.com or http://127.0.0.1:8787 (env: CAPGO_API_HOST) | | --files-host | string | Custom Capgo files API URL when it differs from --api-host (env: CAPGO_FILES_HOST) |

🔹 Get-qr

npx @capgo/cli@latest get-qr

🔳 Print a terminal QR code for a bundle or channel preview. Preview must be enabled for the app.

Example:

npx @capgo/cli@latest get-qr com.example.app --bundle 1.2.3
npx @capgo/cli@latest get-qr com.example.app --bundle 123
npx @capgo/cli@latest get-qr com.example.app --channel production
npx @capgo/cli@latest get-qr com.example.app production --type channel

Options (Get-qr)

| Param | Type | Description | | -------------- | ------------- | -------------------- | | -a | string | API key to link to your account | | --bundle | string | Bundle name or id to preview | | --channel | string | Channel name or id to preview | | --type | string | Type for positional target | | --png | string | Write the preview QR code as a PNG image to the given file path | | --url | boolean | Print preview URLs only (web and deep link), without a terminal QR code | | --web-url | boolean | Encode the web preview URL in the QR code and PNG instead of the capgo:// deep link | | --preview-env | string | Preview web URL environment | | --api-host | string | Custom Capgo API URL for self-hosting or testing, e.g. https://api.example.com or http://127.0.0.1:8787 (env: CAPGO_API_HOST) | | --files-host | string | Custom Capgo files API URL when it differs from --api-host (env: CAPGO_FILES_HOST) |

📦 Bundle

📦 Manage app bundles for deployment in Capgo Cloud, including upload, compatibility checks, and encryption.

🔹 Recommend

npx @capgo/cli@latest bundle recommend

Suggest the next version using Cloudflare AI (active paid subscription required)

Options:

| Param | Type | Description | | -------------- | ------------- | -------------------- | | -a | string | API key to link to your account | | --api-host | string | Custom Capgo API URL for self-hosting or testing, e.g. https://api.example.com or http://127.0.0.1:8787 (env: CAPGO_API_HOST) | | --base-version | string | Override the latest Capgo version as the release baseline | | --since | string | Git ref to compare from (defaults to the latest reachable local tag) | | --ref | string | Git ref to compare to (defaults to HEAD locally; required for GitHub) | | --repo | string | Use GitHub comparison history through your authenticated gh CLI | | --changelog | boolean | Also draft a Markdown changelog | | --json | boolean | Print the recommendation as JSON | | --dry-run | boolean | Print local context without sending it to Capgo or AI |

⬆️ Upload

Alias: u

npx @capgo/cli@latest bundle upload

⬆️ Upload a new app bundle to Capgo Cloud for distribution. Version must be > 0.0.0 and unique. Deleted versions cannot be reused for security. External option: Store only a URL link (useful for apps >200MB or privacy requirements). Capgo never inspects external content. Add encryption for trustless security. Cordova example: npx @capgo/cli@latest bundle upload com.example.app --mode cordova --path www --channel production

Example:

npx @capgo/cli@latest bundle upload com.example.app --path ./dist --channel production,beta

Options:

| Param | Type | Description | | -------------- | ------------- | -------------------- | | -a | string | API key to link to your account | | --mode | string | Project framework mode. Use cordova for Cordova apps without capacitor.config (webDir defaults to www) | | -p | string | Path of the folder to upload, if not provided it will use the webDir set in capacitor.config (or www with --mode cordova) | | -c | string | Channel to link to. Use commas for multiple channels, for example production,beta | | --rollout | string | Set the uploaded bundle as this channel's rollout target at a percentage from 0 to 100 | | --rollout-percentage-bps | string | Set the uploaded bundle rollout percentage in basis points from 0 to 10000 | | --rollout-advance | boolean | Promote the current rollout target to stable, then set the uploaded bundle as the new rollout. Reuses the previous percentage unless --rollout or --rollout-percentage-bps is also set | | --rollout-cache-ttl-seconds | string | Cloudflare rollout decision cache TTL in seconds | | -e | string | Link to external URL instead of upload to Capgo Cloud | | --iv-session-key | string | Set the IV and session key for bundle URL external | | --s3-region | string | Region for your S3 bucket | | --s3-apikey | string | API key for your S3 endpoint | | --s3-apisecret | string | API secret for your S3 endpoint | | --s3-endpoint | string | URL of S3 endpoint | | --s3-bucket-name | string | Name for your AWS S3 bucket | | --s3-port | string | Port for your S3 endpoint | | --no-s3-ssl | boolean | Disable SSL for S3 upload | | --key-v2 | string | Custom path for private signing key (v2 system) | | --key-data-v2 | string | Private signing key (v2 system) | | --key-vault | boolean | [Beta] Sign with the OTA private key stored in the Capgo key vault, decrypted in memory with CAPGO_KEY_VAULT_SECRET or --vault-secret-file (the API key needs app.upload_bundle) | | --vault-secret-file | string | File holding the OTA key vault secret (default: CAPGO_KEY_VAULT_SECRET) | | --bundle-url | boolean | Prints bundle URL into stdout | | --no-key | boolean | Ignore signing key and send clear update | | --no-code-check | boolean | Ignore checking if notifyAppReady() is called in source code and index present in root folder | | --ignore-notify-app-ready | boolean | Skip notifyAppReady() check (not recommended — updates may roll back) | | --display-iv-session | boolean | Show in the console the IV and session key used to encrypt the update | | -b | string | Bundle version number of the bundle to upload | | --link | string | Link to external resource (e.g. GitHub release) | | --comment | string | Comment about this version, could be a release note, a commit hash, a commit message, etc. | | --min-update-version | string | Minimal version required to update to this version. Used only if the disable auto update is set to metadata in channel | | --auto-min-update-version | boolean | Set the min update version based on native packages | | --ignore-metadata-check | boolean | Ignores the metadata (node_modules) check when uploading | | --fail-on-incompatible | boolean | Fail the upload (exit non-zero) instead of uploading when the bundle is incompatible with the channel's current native packages. In an interactive terminal you can still choose a native build; declining fails. Cannot be combined with --ignore-metadata-check or --accept-incompatible. | | --accept-incompatible | boolean | Accept native-package incompatibility as handled (still checks and warns, continues, skips the crash-warning email). Use this when your app already guards missing plugins at runtime. Cannot be combined with --fail-on-incompatible or --ignore-metadata-check. | | --ignore-checksum-check | boolean | Ignores the checksum check when uploading | | --force-crc32-checksum | boolean | Force CRC32 checksum for upload (override auto-detection) | | --timeout | string | Timeout for the upload process in seconds | | --multipart | boolean | [DEPRECATED] Use --tus instead. Uses multipart protocol for S3 uploads | | --zip | boolean | Upload the bundle using zip to Capgo cloud (legacy) | | --tus | boolean | Upload the bundle using TUS to Capgo cloud | | --tus-chunk-size | string | Chunk size in bytes for TUS resumable uploads (default: auto) | | --partial | boolean | [DEPRECATED] Use --delta instead. Upload incremental updates | | --partial-only | boolean | [DEPRECATED] Use --delta-only instead. Upload only incremental updates, skip full bundle | | --delta | boolean | Upload delta updates (only changed files) for instant, super-fast updates instead of big zip downloads. Capgo refuses delta uploads over 10,000 files (delta tracks each file); use --no-delta for a full zip, or reduce files in your web build. | | --delta-only | boolean | Upload only delta updates without full bundle for maximum speed (useful for large apps) | | --no-delta | boolean | Disable delta updates even if instant updates are enabled | | --delta-upload-concurrency | string | Maximum number of delta files processed concurrently (1-500) | | --encrypted-checksum | string | An encrypted checksum (signature). Used only when uploading an external bundle. | | --auto-set-bundle | boolean | Set the bundle version in Capacitor config | | --auto-bump | string | Auto-increment bundle version from the latest remote channel/app version. Level: major, minor (default), patch|fix, metadata (prerelease), or ai | | --capacitor-config | string | Capacitor config source to update (useful with dynamic monorepo configs) | | --dry-upload | boolean | Dry upload the bundle process: add the row in database without uploading files or updating channels (Used by Capgo for internal testing) | | --package-json | string | Paths to package.json files for monorepos (comma-separated) | | --node-modules | string | Paths to node_modules directories for monorepos (comma-separated) | | --encrypt-delta | boolean | Encrypt delta update files (auto-enabled for updater >= 6.14.4) | | --encrypt-partial | boolean | [DEPRECATED] Use --encrypt-delta instead. Encrypt delta update files | | --delete-linked-bundle-on-upload | boolean | Locates the currently linked bundle in the channel you are trying to upload to, and deletes it | | --no-brotli-patterns | string | Files to exclude from Brotli compression (comma-separated globs, e.g., ".jpg,.png") | | --disable-brotli | boolean | Completely disable brotli compression even if updater version supports it | | --version-exists-ok | boolean | Exit successfully if bundle version already exists, useful for CI/CD workflows with monorepos | | --self-assign | boolean | Allow devices to auto-join this channel (updates channel setting) | | --qr-preview | boolean | Print a terminal QR code for this bundle preview after upload | | --send-update-notification | boolean | Send a native update-check notification to devices after updating linked channel bundles | | --api-host | string | Custom Capgo API URL for self-hosting or testing, e.g. https://api.example.com or http://127.0.0.1:8787 (env: CAPGO_API_HOST) | | --files-host | string | Custom Capgo files API URL when it differs from --api-host (env: CAPGO_FILES_HOST) | | --verbose | boolean | Enable verbose output with detailed logging |

🧪 Compatibility

npx @capgo/cli@latest bundle compatibility

🧪 Check compatibility of a bundle with a specific channel in Capgo Cloud to ensure updates are safe.

Example:

npx @capgo/cli@latest bundle compatibility com.example.app --channel production

Options:

| Param | Type | Description | | -------------- | ------------- | -------------------- | | -a | string | API key to link to your account | | -c | string | Channel to check the compatibility with | | --text | boolean | Output text instead of emojis | | --package-json | string | Paths to package.json files for monorepos (comma-separated) | | --node-modules | string | Paths to node_modules directories for monorepos (comma-separated) | | --api-host | string | Custom Capgo API URL for self-hosting or testing, e.g. https://api.example.com or http://127.0.0.1:8787 (env: CAPGO_API_HOST) | | --files-host | string | Custom Capgo files API URL when it differs from --api-host (env: CAPGO_FILES_HOST) |

🔹 ReleaseType

npx @capgo/cli@latest bundle releaseType

🧭 Print "native" or "OTA" based on compatibility with a channel's latest metadata.

Example:

npx @capgo/cli@latest bundle releaseType com.example.app --channel production

Options:

| Param | Type | Description | | -------------- | ------------- | -------------------- | | -a | string | API key to link to your account | | -c | string | Channel to compare against | | --package-json | string | Paths to package.json files for monorepos (comma-separated) | | --node-modules | string | Paths to node_modules directories for monorepos (comma-separated) | | --api-host | string | Custom Capgo API URL for self-hosting or testing, e.g. https://api.example.com or http://127.0.0.1:8787 (env: CAPGO_API_HOST) | | --files-host | string | Custom Capgo files API URL when it differs from --api-host (env: CAPGO_FILES_HOST) |

🗑️ Delete

Alias: d

npx @capgo/cli@latest bundle delete

🗑️ Delete a specific bundle from Capgo Cloud, optionally targeting a single version.

Example:

npx @capgo/cli@latest bundle delete BUNDLE_ID com.example.app

Options:

| Param | Type | Description | | -------------- | ------------- | -------------------- | | -a | string | API key to link to your account | | --api-host | string | Custom Capgo API URL for self-hosting or testing, e.g. https://api.example.com or http://127.0.0.1:8787 (env: CAPGO_API_HOST) | | --files-host | string | Custom Capgo files API URL when it differs from --api-host (env: CAPGO_FILES_HOST) |

📋 List

Alias: l

npx @capgo/cli@latest bundle list

📋 List all bundles uploaded for an app in Capgo Cloud.

Example:

npx @capgo/cli@latest bundle list com.example.app

Options:

| Param | Type | Description | | -------------- | ------------- | -------------------- | | -a | string | API key to link to your account | | --api-host | string | Custom Capgo API URL for self-hosting or testing, e.g. https://api.example.com or http://127.0.0.1:8787 (env: CAPGO_API_HOST) | | --files-host | string | Custom Capgo files API URL when it differs from --api-host (env: CAPGO_FILES_HOST) |

🧹 Cleanup

Alias: c

npx @capgo/cli@latest bundle cleanup

🧹 Delete old bundles in Capgo Cloud, keeping specified number of recent versions. Bundles linked to channels are preserved unless --ignore-channel is used.

Example:

npx @capgo/cli@latest bundle cleanup com.example.app --bundle=1.0 --keep=3

Options:

| Param | Type | Description | | -------------- | ------------- | -------------------- | | -b | string | Bundle version number of the app to delete | | -a | string | API key to link to your account | | -k | string | Number of versions to keep | | -f | boolean | Force removal | | --ignore-channel | boolean | Delete bundles even if linked to channels (WARNING: deletes channels too) | | --api-host | string | Custom Capgo API URL for self-hosting or testing, e.g. https://api.example.com or http://127.0.0.1:8787 (env: CAPGO_API_HOST) | | --files-host | string | Custom Capgo files API URL when it differs from --api-host (env: CAPGO_FILES_HOST) |

🔒 Encrypt

npx @capgo/cli@latest bundle encrypt

🔒 Encrypt a zip bundle for secure external storage. Returns ivSessionKey for upload/decryption. Get checksum using 'bundle zip --json'. For @capgo/capacitor-updater 9+ (and 5.55.0+, 6.55.0+, 7.55.0+, 8.55.0+), the returned checksum also signs the SHA-256 of the encrypted zip (V4), so the input checksum must be SHA-256.

Example:

npx @capgo/cli@latest bundle encrypt ./myapp.zip CHECKSUM

Options:

| Param | Type | Description | | -------------- | ------------- | -------------------- | | --key | string | Custom path for private signing key | | --key-data | string | Private signing key | | -j | boolean | Output in JSON | | --package-json | string | Paths to package.json files for monorepos (comma-separated) |

🔓 Decrypt

npx @capgo/cli@latest bundle decrypt

🔓 Decrypt an encrypted bundle (mainly for testing). Prints base64 session key for verification.

Example:

npx @capgo/cli@latest bundle decrypt ./myapp_encrypted.zip IV_BASE64:SESSION_KEY_BASE64

Options:

| Param | Type | Description | | -------------- | ------------- | -------------------- | | --key | string | Custom path for private signing key | | --key-data | string | Private signing key | | --checksum | string | Checksum of the bundle, to verify the integrity of the bundle | | --package-json | string | Paths to package.json files for monorepos (comma-separated) |

🔹 Zip

npx @capgo/cli@latest bundle zip

🗜️ Create a zip file of your app bundle. Returns checksum for use with encryption. Use --json for machine-readable output. Works offline: no API key and no calls to Capgo. --for-upload produces exactly what 'bundle upload' would send (same checksum, v2 encryption, native packages metadata) so the zip can be uploaded through a signed URL. --delta-pack also writes the delta (manifest) files.

Example:

npx @capgo/cli@latest bundle zip com.example.app --path ./dist
npx @capgo/cli@latest bundle zip com.example.app --for-upload --delta-pack ./delta.zip --json

Options:

| Param | Type | Description | | -------------- | ------------- | -------------------- | | -p | string | Path of the folder to upload, if not provided it will use the webDir set in capacitor.config | | -b | string | Bundle version number to name the zip file | | -n | string | Name of the zip file | | -j | boolean | Output in JSON | | --no-code-check | boolean | Ignore checking if notifyAppReady() is called in source code and index present in root folder | | --ignore-notify-app-ready | boolean | Skip notifyAppReady() check (not recommended — updates may roll back) | | --key-v2 | string | Use encryption v2. With --for-upload: custom path for private signing key (v2 system), defaults to .capgo_key_v2 | | --key-data-v2 | string | Private signing key (v2 system), used with --for-upload | | --key-vault | boolean | [Beta] With --for-upload: sign with the OTA private key stored in the Capgo key vault (needs an API key with app.upload_bundle and CAPGO_KEY_VAULT_SECRET or --vault-secret-file) | | --vault-secret-file | string | File holding the OTA key vault secret (default: CAPGO_KEY_VAULT_SECRET) | | -a | string | API key to link to your account | | --api-host | string | Custom Capgo API URL for self-hosting or testing, e.g. https://api.example.com or http://127.0.0.1:8787 (env: CAPGO_API_HOST) | | --no-key | boolean | Ignore signing key and produce a clear bundle (with --for-upload) | | --for-upload | boolean | Produce the exact artifact and metadata 'bundle upload' would send (encryption, checksum, native packages) | | --delta-pack | string | Also write a delta pack zip (manifest + per-file upload bytes) for delta uploads. Implies --for-upload | | --encrypt-delta | boolean | Encrypt delta update files (auto-enabled for updater >= 6.14.4) | | --encrypt-partial | boolean | [DEPRECATED] Use --encrypt-delta instead. Encrypt delta update files | | --disable-brotli | boolean | Completely disable brotli compression even if updater version supports it | | --force-crc32-checksum | boolean | Force CRC32 checksum for upload (override auto-detection) | | --package-json | string | Paths to package.json files for monorepos (comma-separated) | | --node-modules | string | Paths to node_modules directories for monorepos (comma-separated) |

📱 App

📱 Manage your Capgo app settings and configurations in Capgo Cloud.

➕ Add

Alias: a

npx @capgo/cli@latest app add

➕ Add a new app to Capgo Cloud with a unique app ID in the format com.test.app. All options can be guessed from config if not provided. When the app ID matches a public App Store or Google Play listing, the store link is saved; interactive terminals ask you to confirm each detected listing first.

Example:

npx @capgo/cli@latest app add com.example.app --name "My App" --icon ./icon.png

Options:

| Param | Type | Description | | -------------- | ------------- | -------------------- | | -n | string | App name for display in Capgo Cloud | | -i | string | App icon path for display in Capgo Cloud | | -a | string | API key to link to your account | | --api-host | string | Custom Capgo API URL for self-hosting or testing, e.g. https://api.example.com or http://127.0.0.1:8787 (env: CAPGO_API_HOST) | | --files-host | string | Custom Capgo files API URL when it differs from --api-host (env: CAPGO_FILES_HOST) |

🗑️ Delete

npx @capgo/cli@latest app delete

🗑️ Delete an app from Capgo Cloud, optionally specifying a version to delete only that bundle.

Example:

npx @capgo/cli@latest app delete com.example.app

Options:

| Param | Type | Description | | -------------- | ------------- | -------------------- | | -a | string | API key to link to your account | | --api-host | string | Custom Capgo API URL for self-hosting or testing, e.g. https://api.example.com or http://127.0.0.1:8787 (env: CAPGO_API_HOST) | | --files-host | string | Custom Capgo files API URL when it differs from --api-host (env: CAPGO_FILES_HOST) |

📋 List

Alias: l

npx @capgo/cli@latest app list

📋 List all apps registered under your account in Capgo Cloud.

Example:

npx @capgo/cli@latest app list

Options:

| Param | Type | Description | | -------------- | ------------- | -------------------- | | -a | string | API key to link to your account | | --filter-by-org-id | string | Only list apps from this organization ID | | --show-org | boolean | Show the organization name for each app | | --show-org-id | boolean | Show the organization ID for each app | | --output-text | boolean | Print plain text with a CSV app table and no interactive formatting | | --api-host | string | Custom Capgo API URL for self-hosting or testing, e.g. https://api.example.com or http://127.0.0.1:8787 (env: CAPGO_API_HOST) | | --files-host | string | Custom Capgo files API URL when it differs from --api-host (env: CAPGO_FILES_HOST) |

🔹 Todo

Alias: todoList

npx @capgo/cli@latest app todo

📋 Show your app's onboarding todo list with done, skipped, and pending tasks. Uses the same live progress checks as the Capgo dashboard. The app ID can be inferred from your Capacitor project. Apps with both Builder and OTA checklists show interactive tabs. For scripts and AI agents, choose --list builder or --list ota to print one list and exit.

Example:

npx @capgo/cli@latest app todo com.example.app

Options:

| Param | Type | Description | | -------------- | ------------- | -------------------- | | --list | string | Show one todo list and exit; required for dual checklists in non-interactive mode | | -a | string | API key to link to your account | | --api-host | string | Custom Capgo API URL for self-hosting or testing, e.g. https://api.example.com or http://127.0.0.1:8787 (env: CAPGO_API_HOST) | | --files-host | string | Custom Capgo files API URL when it differs from --api-host (env: CAPGO_FILES_HOST) |

🐞 Debug

npx @capgo/cli@latest app debug

🐞 Listen for live update events in Capgo Cloud to debug your app. Optionally target a specific device for detailed diagnostics.

Example:

npx @capgo/cli@latest app debug com.example.app --device DEVICE_ID

Options:

| Param | Type | Description | | -------------- | ------------- | -------------------- | | -a | string | API key to link to your account | | -d | string | The specific device ID to debug | | --api-host | string | Custom Capgo API URL for self-hosting or testing, e.g. https://api.example.com or http://127.0.0.1:8787 (env: CAPGO_API_HOST) | | --files-host | string | Custom Capgo files API URL when it differs from --api-host (env: CAPGO_FILES_HOST) |

🔹 Prewarm

Alias: warm

npx @capgo/cli@latest app prewarm

🔥 Load your app's live update state into every Capgo plugin region now. Each region keeps a cache of your app's channels and bundles; until it fills, the first device requests after a change are slower. Uploads and channel changes already prewarm automatically; use this to warm regions on demand, for example right before a release reaches users. Pass the app id to run it outside a Capacitor project, for example from CI. Requires the app.upload_bundle permission for the app.

Example:

npx @capgo/cli@latest app prewarm com.example.app

Options:

| Param | Type | Description | | -------------- | ------------- | -------------------- | | -a | string | API key to link to your account | | --api-host | string | Custom Capgo API URL for self-hosting or testing, e.g. https://api.example.com or http://127.0.0.1:8787 (env: CAPGO_API_HOST) |

⚙️ Setting

npx @capgo/cli@latest app setting

⚙️ Modify Capacitor configuration programmatically. Specify setting path (e.g., plugins.CapacitorUpdater.defaultChannel) with --string or --bool.

Example:

npx @capgo/cli@latest app setting plugins.CapacitorUpdater.defaultChannel --string "Production"

Options:

| Param | Type | Description | | -------------- | ------------- | -------------------- | | --bool | string | A value for the setting to modify as a boolean, ex: --bool true | | --string | string | A value for the setting to modify as a string, ex: --string "Production" | | --capacitor-config | string | Capacitor config source to update (useful with dynamic monorepo configs) |

⚙️ Set

Alias: s

npx @capgo/cli@latest app set

⚙️ Update settings for an existing app in Capgo Cloud, such as name, icon, or retention period for bundles. Retention of 0 means infinite storage. If a store link is still missing and --ios-store-url / --android-store-url are not passed, the CLI looks up the listing matching the app ID and saves it (asking for confirmation in interactive terminals).

Example:

npx @capgo/cli@latest app set com.example.app --name "Updated App" --retention 30

Options:

| Param | Type | Description | | -------------- | ------------- | -------------------- | | -n | string | App name for display in Capgo Cloud | | -i | string | Local image file path (png, jpg, webp, svg) used as the app icon in Capgo Cloud | | -a | string | API key to link to your account | | -r | string | Days to keep old bundles (0 = infinite, default: 0) | | --expose-metadata | string | Expose bundle metadata (link and comment) to the plugin (true/false, default: false) | | --preview | boolean | Enable bundle and channel preview QR codes for this app | | --no-preview | boolean | Disable bundle and channel preview QR codes for this app | | --allow-device-custom-id | boolean | Allow devices to set a custom device ID for this app | | --no-allow-device-custom-id | boolean | Disallow custom device IDs for this app | | --collect-country | boolean | Store the request country on device records and stats | | --no-collect-country | boolean | Do not store country on device records or stats | | --collect-platform | boolean | Store device platform on device records and stats | | --no-collect-platform | boolean | Do not store device platform on device records or stats | | --collect-os-version | boolean | Store device OS version on device records and stats | | --no-collect-os-version | boolean | Do not store device OS version on device records or stats | | --collect-plugin-version | boolean | Store the updater plugin version on device records and stats | | --no-collect-plugin-version | boolean | Do not store the updater plugin version on device records or stats | | --collect-version-build | boolean | Store the native app version on device records and stats | | --no-collect-version-build | boolean | Do not store the native app version on device records or stats | | --collect-is-emulator | boolean | Store whether the client reported itself as an emulator | | --no-collect-is-emulator | boolean | Do not store the emulator flag | | --collect-is-prod | boolean | Store whether the client reported a production build | | --no-collect-is-prod | boolean | Do not store the production / development flag | | --collect-install-source | boolean | Store App Store, Play Store, TestFlight, or other install source | | --no-collect-install-source | boolean | Do not store install source | | --block-provider-infra-requests | boolean | Block provider infrastructure requests for this app | | --no-block-provider-infra-requests | boolean | Allow provider infrastructure requests for this app | | --build-timeout-minutes | string | Native build timeout in minutes (5-360, default: 15) | | --ios-store-url | string | iOS App Store URL for this app | | --android-store-url | string | Google Play Store URL for this app | | --default-upload-channel | string | Default upload channel name for this app | | --default-download-channel | string | Default download channel name for this app (sets channel public=true) | | --disable-download-channels | boolean | Disable Capgo download channels for this app (sets all channels public=false) | | --api-host | string | Custom Capgo API URL for self-hosting or testing, e.g. https://api.example.com or http://127.0.0.1:8787 (env: CAPGO_API_HOST) | | --files-host | string | Custom Capgo files API URL when it differs from --api-host (env: CAPGO_FILES_HOST) |

📢 Channel

📢 Manage distribution channels for app updates in Capgo Cloud, controlling how updates are delivered to devices.

➕ Add

Alias: a

npx @capgo/cli@latest channel add

➕ Create a new channel for app distribution in Capgo Cloud to manage update delivery.

Example:

npx @capgo/cli@latest channel add production com.example.app --default

Options:

| Param | Type | Description | | -------------- | ------------- | -------------------- | | -d | boolean | Set the channel as default | | --self-assign | boolean | Allow device to self-assign to this channel | | -a | string | API key to link to your account | | --api-host | string | Custom Capgo API URL for self-hosting or testing, e.g. https://api.example.com or http://127.0.0.1:8787 (env: CAPGO_API_HOST) | | --files-host | string | Custom Capgo files API URL when it differs from --api-host (env: CAPGO_FILES_HOST) |

🗑️ Delete

Alias: d

npx @capgo/cli@latest channel delete

🗑️ Delete a channel from Capgo Cloud, optionally removing associated bundles to free up resources.

Example:

npx @capgo/cli@latest channel delete production com.example.app

Options:

| Param | Type | Description | | -------------- | ------------- | -------------------- | | -a | string | API key to link to your account | | --delete-bundle | boolean | Delete the bundle associated with the channel | | --success-if-not-found | boolean | Success if the channel is not found | | --api-host | string | Custom Capgo API URL for self-hosting or testing, e.g. https://api.example.com or http://127.0.0.1:8787 (env: CAPGO_API_HOST) | | --files-host | string | Custom Capgo files API URL when it differs from --api-host (env: CAPGO_FILES_HOST) |

📋 List

Alias: l

npx @capgo/cli@latest channel list

📋 List all channels configured for an app in Capgo Cloud to review distribution settings.

Example:

npx @capgo/cli@latest channel list com.example.app

Options:

| Param | Type | Description | | -------------- | ------------- | -------------------- | | -a | string | API key to link to your account | | --api-host | string | Custom Capgo API URL for self-hosting or testing, e.g. https://api.example.com or http://127.0.0.1:8787 (env: CAPGO_API_HOST) | | --files-host | string | Custom Capgo files API URL when it differs from --api-host (env: CAPGO_FILES_HOST) |

📦 CurrentBundle

npx @capgo/cli@latest channel currentBundle

📦 Get the current bundle linked to a specific channel in Capgo Cloud for update tracking.

Example:

npx @capgo/cli@latest channel currentBundle production com.example.app

Options:

| Param | Type | Description | | -------------- | ------------- | -------------------- | | -c | string | Channel to get the current bundle from | | -a | string | API key to link to your account | | --quiet | boolean | Only print the bundle version | | --api-host | string | Custom Capgo API URL for self-hosting or testing, e.g. https://api.example.com or http://127.0.0.1:8787 (env: CAPGO_API_HOST) | | --files-host | string | Custom Capgo files API URL when it differs from --api-host (env: CAPGO_FILES_HOST) |

🚀 Promote

npx @capgo/cli@latest channel promote

🚀 Promote the bundle currently linked to one channel to another channel, for example from staging to production, without typing the bundle version. Runs the same compatibility and permission checks as channel set --bundle.

Example:

npx @capgo/cli@latest channel promote staging production com.example.app

Options:

| Param | Type | Description | | -------------- | ------------- | -------------------- | | -a | string | API key to link to your account | | --send-update-notification | boolean | Send a native update-check notification to devices after updating the linked channel bundle | | --ignore-metadata-check | boolean | Ignore checking node_modules compatibility if present in the bundle | | --accept-incompatible | boolean | Accept native-package incompatibility as handled (still checks and warns, sets the channel instead of failing). Use this when your app already guards missing plugins at runtime. Cannot be combined with --ignore-metadata-check. | | --api-host | string | Custom Capgo API URL for self-hosting or testing, e.g. https://api.example.com or http://127.0.0.1:8787 (env: CAPGO_API_HOST) | | --files-host | string | Custom Capgo files API URL when it differs from --api-host (env: CAPGO_FILES_HOST) |

⚙️ Set

Alias: s

npx @capgo/cli@latest channel set

⚙️ Configure settings for a channel, such as linking a bundle, setting update strategies (major, minor, metadata, patch, none), or device targeting (iOS, Android, dev, prod, emulator, device). One channel must be default.

Example:

npx @capgo/cli@latest channel set production com.example.app --bundle 1.0.0 --state default

Options:

| Param | Type | Description | | -------------- | ------------- | -------------------- | | -a | string | API key to link to your account | | -b | string | Bundle version number of the file to set | | -s | string | Set the state of the channel, default or normal | | --latest-remote | boolean | Get the latest bundle uploaded in capgo cloud and set it to the channel | | --latest | boolean | Get the latest version key in the package.json to set it to the channel | | --downgrade | boolean | Allow to downgrade to version under native one | | --no-downgrade | boolean | Disable downgrade to version under native one | | --ios | boolean | Allow sending update to iOS devices | | --no-ios | boolean | Disable sending update to iOS devices | | --android | boolean | Allow sending update to Android devices | | --no-android | boolean | Disable sending update to Android devices | | --electron | boolean | Allow sending update to Electron apps | | --no-electron | boolean | Disable sending update to Electron apps | | --pause | boolean | Pause all updates on this channel (devices stay on their current bundle) | | --resume | boolean | Resume updates on a paused channel | | --self-assign | boolean | Allow device to self-assign to this channel | | --no-self-assign | boolean | Disable devices to self-assign to this channel | | --disable-auto-update | string | Block updates by type: major, minor, metadata, patch, or none (allows all) | | --update-package | string | Serve zip, delta, or both: all, zip, delta, zip_from_builtin, or delta_from_builtin | | --rollout-bundle | string | Bundle version to release gradually on this channel | | --rollout-percentage | string | Rollout percentage from 0 to 100 | | --rollout-percentage-bps | string | Rollout percentage in basis points from 0 to 10000 | | --rollout-enable | boolean | Enable the configured rollout | | --rollout-disable | boolean | Disable the configured rollout and unlink the rollout bundle | | --rollout-pause | boolean | Pause rollout exposure without rolling back selected devices | | --rollout-resume | boolean | Resume a paused rollout | | --rollout-rollback | boolean | Clear rollout state and return devices to stable | | --rollout-promote | boolean | Promote rollout target to stable and clear rollout state | | --rollout-cache-ttl-seconds | string | Cloudflare rollout decision cache TTL in seconds | | --auto-pause-enabled | boolean | Enable rollout auto-pause policy | | --auto-pause-disabled | boolean | Disable rollout auto-pause policy | | --auto-pause-window-minutes | string | Stats window for rollout auto-pause | | --auto-pause-failure-rate-bps | string | Failure-rate threshold in basis points | | --auto-pause-confidence | string | Confidence level between 0 and 1 | | --auto-pause-min-attempts | string | Minimum install plus fail attempts before auto-pause can trigger | | --auto-pause-min-failures | string | Minimum failures before auto-pause can trigger | | --auto-pause-action | string | Auto-pause action: pause, rollback, or notify | | --auto-pause-cooldown-minutes | string | Cooldown before auto-pause can trigger again | | --dev | boolean | Allow sending update to development devices | | --no-dev | boolean | Disable sending update to development devices | | --prod | boolean | Allow sending update to production devices | | --no-prod | boolean | Disable sending update to production devices | | --emulator | boolean | Allow sending update to emulator devices | | --no-emulator | boolean | Disable sending update to emulator devices | | --device | boolean | Allow sending update to physical devices | | --no-device | boolean | Disable sending update to physical devices | | --qr-preview | boolean | Print a terminal QR code for this channel preview after updating it | | --send-update-notification | boolean | Send a native update-check notification to devices after updating the linked channel bundle | | --package-json | string | Paths to package.json files for monorepos (comma-separated) | | --ignore-metadata-check | boolean | Ignore checking node_modules compatibility if present in the bundle | | --accept-incompatible | boolean | Accept native-package incompatibility as handled (still checks and warns, sets the channel instead of failing). Use this when your app already guards missing plugins at runtime. Cannot be combined with --ignore-metadata-check. | | --api-host | string | Custom Capgo API URL for self-hosting or testing, e.g. https://api.example.com or http://127.0.0.1:8787 (env: CAPGO_API_HOST) | | --files-host | string | Custom Capgo files API URL when it differs from --api-host (env: CAPGO_FILES_HOST) |

🔐 Key

🔐 Manage encryption keys for secure bundle distribution in Capgo Cloud, supporting end-to-end encryption with RSA and AES combination.

🔹 Save

npx @capgo/cli@latest key save

💾 Save the public key in the Capacitor config, useful for CI environments. Recommended not to commit the key for security.

Example:

npx @capgo/cli@latest key save --key ./path/to/key.pub

Options:

| Param | Type | Description | | -------------- | ------------- | -------------------- | | -f | boolean | Force generate a new one | | --key | string | Key path to save in Capacitor config | | --key-data | string | Key data to save in Capacitor config | | --capacitor-config | string | Capacitor config source to update (useful with dynamic monorepo configs) |

🔨 Create

npx @capgo/cli@latest key create

🔨 Create RSA key pair for end-to-end encryption. Creates .capgo_key_v2 (private) and .capgo_key_v2.pub (public) in project root. Public key is saved to capacitor.config for mobile app decryption. NEVER commit the private key - store it securely!

Example:

npx @capgo/cli@latest key create

Options:

| Param | Type | Description | | -------------- | ------------- | -------------------- | | -f | boolean | Force generate a new one | | --skip-capgo-app-id-prompt | boolean | Skip the optional prompt to create a Capgo app with a random app ID after key creation | | --capacitor-config | string | Capacitor config source to update (useful with dynamic monorepo configs) |

🗑️ Delete_old

npx @capgo/cli@latest key delete_old

🧹 Delete the old encryption key from the Capacitor config to ensure only the current key is used.

Example:

npx @capgo/cli@latest key delete_old

**O