๐Ÿš€ Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more โ†’
Socket
Book a DemoInstallSign in
Socket

@capgo/cli

Package Overview
Dependencies
Maintainers
1
Versions
670
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@capgo/cli

A CLI to upload to capgo servers

7.9.7
latest
Source
npm
Version published
Maintainers
1
Created
Source

Capgo CLI

Capgo - Instant updates for capacitor

A CLI to upload and download files from the Capgo Cloud.

You can find the most up to date version of this doc in our web doc: https://capgo.app/docs/cli/overview/

Usage

Before use the CLI, you should register here : https://capgo.app/

Then go to your account in apikey section and click in the all key to copy it.

Follow the documentation here : "https://capacitorjs.com/docs/getting-started/

๐Ÿ“‘ 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.

Example:

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

Options

ParamTypeDescription
-n,stringApp name for display in Capgo Cloud
-i,stringApp icon path for display in Capgo Cloud
--supa-hoststringSupabase host URL for custom setups
--supa-anonstringSupabase anon token for custom setups

๐Ÿ‘จโ€โš•๏ธ 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.

Example:

npx @capgo/cli@latest doctor

Options

ParamTypeDescription
--package-jsonstringA list of paths to package.json. Useful for monorepos (comma separated ex: ../../package.json,./package.json)

๐Ÿ”‘ 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

ParamTypeDescription
--localbooleanOnly save in local folder, git ignored for security.
--supa-hoststringSupabase host URL for custom setups
--supa-anonstringSupabase anon token for custom setups

๐Ÿ“ฆ Bundle

๐Ÿ“ฆ Manage app bundles for deployment in Capgo Cloud, including upload, compatibility checks, and encryption.

โฌ†๏ธ Upload

Alias: u

npx @capgo/cli@latest bundle upload

โฌ†๏ธ Upload a new app bundle to Capgo Cloud for distribution, optionally linking to a channel or external URL. External option supports privacy concerns or large apps (>200MB) by storing only the link. Capgo never inspects external content. Encryption adds a trustless security layer. Version must be > 0.0.0 and unique.

โ„น๏ธ External option helps with corporate privacy concerns and apps larger than 200MB by storing only the link.

โ„น๏ธ Capgo Cloud never looks at the content in the link for external options or in the code when stored.

โ„น๏ธ You can add a second layer of security with encryption, making Capgo trustless.

โ„น๏ธ Version should be greater than "0.0.0" and cannot be overridden or reused after deletion for security reasons.

Example:

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

Options:

ParamTypeDescription
-a,stringAPI key to link to your account
-p,stringPath of the folder to upload, if not provided it will use the webDir set in capacitor.config
-c,stringChannel to link to
-e,stringLink to external URL instead of upload to Capgo Cloud
--iv-session-keystringSet the IV and session key for bundle URL external
--s3-regionstringRegion for your S3 bucket
--s3-apikeystringAPI key for your S3 endpoint
--s3-apisecretstringAPI secret for your S3 endpoint
--s3-endointstringURL of S3 endpoint
--s3-bucket-namestringName for your AWS S3 bucket
--s3-portstringPort for your S3 endpoint
--no-s3-sslbooleanDisable SSL for S3 upload
--key-v2stringCustom path for private signing key (v2 system)
--key-data-v2stringPrivate signing key (v2 system)
--bundle-urlbooleanPrints bundle URL into stdout
--no-keybooleanIgnore signing key and send clear update
--no-code-checkbooleanIgnore checking if notifyAppReady() is called in source code and index present in root folder
--display-iv-sessionbooleanShow in the console the IV and session key used to encrypt the update
-b,stringBundle version number of the bundle to upload
--linkstringLink to external resource (e.g. GitHub release)
--commentstringComment about this version, could be a release note, a commit hash, a commit message, etc.
--min-update-versionstringMinimal version required to update to this version. Used only if the disable auto update is set to metadata in channel
--auto-min-update-versionbooleanSet the min update version based on native packages
--ignore-metadata-checkbooleanIgnores the metadata (node_modules) check when uploading
--ignore-checksum-checkbooleanIgnores the checksum check when uploading
--timeoutstringTimeout for the upload process in seconds
--multipartbooleanUses multipart protocol to upload data to S3, Deprecated, use tus instead
--zipbooleanUpload the bundle using zip to Capgo cloud (legacy)
--tusbooleanUpload the bundle using TUS to Capgo cloud
--tus-chunk-sizestringChunk size for the TUS upload
--partialbooleanUpload partial files to Capgo cloud (deprecated, use --delta instead)
--partial-onlybooleanUpload only partial files to Capgo cloud, skip the zipped file, useful for big bundle (deprecated, use --delta-only instead)
--deltabooleanUpload delta update to Capgo cloud (old name: --partial)
--delta-onlybooleanUpload only delta update to Capgo cloud, skip the zipped file, useful for big bundle (old name: --partial-only)
--encrypted-checksumstringAn encrypted checksum (signature). Used only when uploading an external bundle.
--auto-set-bundlebooleanSet the bundle in capacitor.config.json
--dry-uploadbooleanDry upload the bundle process, mean it will not upload the files but add the row in database (Used by Capgo for internal testing)
--package-jsonstringA list of paths to package.json. Useful for monorepos (comma separated ex: ../../package.json,./package.json)
--node-modulesstringA list of paths to node_modules. Useful for monorepos (comma separated ex: ../../node_modules,./node_modules)
--encrypt-partialbooleanEncrypt the partial update files (automatically applied for updater > 6.14.4)
--delete-linked-bundle-on-uploadbooleanLocates the currently linked bundle in the channel you are trying to upload to, and deletes it
--no-brotli-patternsstringGlob patterns for files to exclude from brotli compression (comma-separated)
--disable-brotlibooleanCompletely disable brotli compression even if updater version supports it
--version-exists-okbooleanExit successfully if bundle version already exists, useful for CI/CD workflows with monorepos
--self-assignbooleanAllow device to self-assign to this channel, this will update the channel, if not provided it will leave the channel as is
--supa-hoststringSupabase host URL, for self-hosted Capgo or testing
--supa-anonstringSupabase anon token, for self-hosted Capgo or testing

๐Ÿงช 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:

ParamTypeDescription
-a,stringAPI key to link to your account
-c,stringChannel to check the compatibility with
--textbooleanOutput text instead of emojis
--package-jsonstringA list of paths to package.json. Useful for monorepos (comma separated ex: ../../package.json,./package.json)
--node-modulesstringA list of paths to node_modules. Useful for monorepos (comma separated ex: ../../node_modules,./node_modules)
--supa-hoststringSupabase host URL for custom setups
--supa-anonstringSupabase anon token for custom setups

๐Ÿ—‘๏ธ 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:

ParamTypeDescription
-a,stringAPI key to link to your account
--supa-hoststringSupabase host URL for custom setups
--supa-anonstringSupabase anon token for custom setups

๐Ÿ“‹ 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:

ParamTypeDescription
-a,stringAPI key to link to your account
--supa-hoststringSupabase host URL for custom setups
--supa-anonstringSupabase anon token for custom setups

๐Ÿงน Cleanup

Alias: c

npx @capgo/cli@latest bundle cleanup

๐Ÿงน Cleanup old bundles in Capgo Cloud, keeping a specified number of recent versions or those linked to channels. Ignores bundles in use.

Example:

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

Options:

ParamTypeDescription
-b,stringBundle version number of the app to delete
-a,stringAPI key to link to your account
-k,stringNumber of versions to keep
-f,stringForce removal
--ignore-channelbooleanDelete all versions even if linked to a channel, this will delete channel as well
--supa-hoststringSupabase host URL for custom setups
--supa-anonstringSupabase anon token for custom setups

๐Ÿ”’ Encrypt

npx @capgo/cli@latest bundle encrypt

๐Ÿ”’ Encrypt a zip bundle using the new encryption method for secure external storage or testing. Used with external sources or for testing, prints ivSessionKey for upload or decryption. The command will return the ivSessionKey for upload or decryption. The checksum is the checksum of the zip file, you can get it with the --json option of the zip command.

Example:

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

Options:

ParamTypeDescription
--keystringCustom path for private signing key
--key-datastringPrivate signing key
-j,stringOutput in JSON

๐Ÿ”“ Decrypt

npx @capgo/cli@latest bundle decrypt

๐Ÿ”“ Decrypt a zip bundle using the new encryption method, mainly for testing purposes. Prints the base64 decrypted session key for verification.

Example:

npx @capgo/cli@latest bundle decrypt ./myapp_encrypted.zip CHECKSUM

Options:

ParamTypeDescription
--keystringCustom path for private signing key
--key-datastringPrivate signing key
--checksumstringChecksum of the bundle, to verify the integrity of the bundle

๐Ÿ”น Zip

npx @capgo/cli@latest bundle zip

๐Ÿ—œ๏ธ Create a zip file of your app bundle for upload or local storage. Useful for preparing bundles before encryption or upload. The command will return the checksum of the zip file, you can use it to encrypt the zip file with the --key-v2 option.

Example:

npx @capgo/cli@latest bundle zip com.example.app --path ./dist

Options:

ParamTypeDescription
-p,stringPath of the folder to upload, if not provided it will use the webDir set in capacitor.config
-b,stringBundle version number to name the zip file
-n,stringName of the zip file
-j,stringOutput in JSON
--no-code-checkbooleanIgnore checking if notifyAppReady() is called in source code and index present in root folder
--key-v2booleanUse encryption v2
--package-jsonstringA list of paths to package.json. Useful for monorepos (comma separated ex: ../../package.json,./package.json)

๐Ÿ“ฑ 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.

Example:

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

Options:

ParamTypeDescription
-n,stringApp name for display in Capgo Cloud
-i,stringApp icon path for display in Capgo Cloud
-a,stringAPI key to link to your account
--supa-hoststringSupabase host URL for custom setups
--supa-anonstringSupabase anon token for custom setups

๐Ÿ—‘๏ธ 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:

ParamTypeDescription
-a,stringAPI key to link to your account
--supa-hoststringSupabase host URL for custom setups
--supa-anonstringSupabase anon token for custom setups

๐Ÿ“‹ 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:

ParamTypeDescription
-a,stringAPI key to link to your account
--supa-hoststringSupabase host URL for custom setups
--supa-anonstringSupabase anon token for custom setups

๐Ÿž 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:

ParamTypeDescription
-a,stringAPI key to link to your account
-d,stringThe specific device ID to debug
--supa-hoststringSupabase host URL for custom setups
--supa-anonstringSupabase anon token for custom setups

โš™๏ธ Setting

npx @capgo/cli@latest app setting

โš™๏ธ Modify Capacitor configuration programmatically by specifying the path to the setting. (e.g., plugins.CapacitorUpdater.defaultChannel). You MUST provide either --string or --bool.

Example:

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

Options:

ParamTypeDescription
--boolstringA value for the setting to modify as a boolean, ex: --bool true
--stringstringA value for the setting to modify as a string, ex: --string "Production"

โš™๏ธ 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.

Example:

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

Options:

ParamTypeDescription
-n,stringApp name for display in Capgo Cloud
-i,stringApp icon path for display in Capgo Cloud
-a,stringAPI key to link to your account
-r,stringRetention period of app bundle in days, 0 by default = infinite
--supa-hoststringSupabase host URL for custom setups
--supa-anonstringSupabase anon token for custom setups

๐Ÿ“ข 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:

ParamTypeDescription
-d,stringSet the channel as default
--self-assignbooleanAllow device to self-assign to this channel
-a,stringAPI key to link to your account
--supa-hoststringSupabase host URL, for self-hosted Capgo or testing
--supa-anonstringSupabase anon token, for self-hosted Capgo or testing

๐Ÿ—‘๏ธ 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:

ParamTypeDescription
-a,stringAPI key to link to your account
--delete-bundlebooleanDelete the bundle associated with the channel
--success-if-not-foundbooleanSuccess if the channel is not found
--supa-hoststringSupabase host URL, for self-hosted Capgo or testing
--supa-anonstringSupabase anon token, for self-hosted Capgo or testing

๐Ÿ“‹ 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:

ParamTypeDescription
-a,stringAPI key to link to your account
--supa-hoststringSupabase host URL, for self-hosted Capgo or testing
--supa-anonstringSupabase anon token, for self-hosted Capgo or testing

๐Ÿ“ฆ 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:

ParamTypeDescription
-c,stringChannel to get the current bundle from
-a,stringAPI key to link to your account
--quietbooleanOnly print the bundle version
--supa-hoststringSupabase host URL, for self-hosted Capgo or testing
--supa-anonstringSupabase anon token, for self-hosted Capgo or testing

โš™๏ธ 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, emulator). One channel must be default.

Example:

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

Options:

ParamTypeDescription
-a,stringAPI key to link to your account
-b,stringBundle version number of the file to set
-s,stringSet the state of the channel, default or normal
--latest-remotebooleanGet the latest bundle uploaded in capgo cloud and set it to the channel
--latestbooleanGet the latest version key in the package.json to set it to the channel
--downgradebooleanAllow to downgrade to version under native one
--no-downgradebooleanDisable downgrade to version under native one
--iosbooleanAllow sending update to iOS devices
--no-iosbooleanDisable sending update to iOS devices
--androidbooleanAllow sending update to Android devices
--no-androidbooleanDisable sending update to Android devices
--self-assignbooleanAllow device to self-assign to this channel
--no-self-assignbooleanDisable devices to self-assign to this channel
--disable-auto-updatestringDisable auto update strategy for this channel. The possible options are: major, minor, metadata, patch, none
--devbooleanAllow sending update to development devices
--no-devbooleanDisable sending update to development devices
--emulatorbooleanAllow sending update to emulator devices
--no-emulatorbooleanDisable sending update to emulator devices
--package-jsonstringA list of paths to package.json. Useful for monorepos (comma separated ex: ../../package.json,./package.json)
--ignore-metadata-checkbooleanIgnore checking node_modules compatibility if present in the bundle
--supa-hoststringSupabase host URL, for self-hosted Capgo or testing
--supa-anonstringSupabase anon token, for self-hosted Capgo or testing

๐Ÿ” 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:

ParamTypeDescription
-f,stringForce generate a new one
--keystringKey path to save in Capacitor config
--key-datastringKey data to save in Capacitor config

๐Ÿ”จ Create

npx @capgo/cli@latest key create

๐Ÿ”จ Create a new encryption key pair for end-to-end encryption in Capgo Cloud. Do not commit or share the private key; save it securely. This command will create a new key pair with the name .capgo_key_v2 and .capgo_key_v2.pub in the root of the project. The public key is used to decrypt the zip file in the mobile app. The public key will also be stored in the capacitor config. This is the one used in the mobile app. The file is just a backup. The private key is used to encrypt the zip file in the CLI.

Example:

npx @capgo/cli@latest key create

Options:

ParamTypeDescription
-f,stringForce generate a new one

๐Ÿ—‘๏ธ 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

๐Ÿ‘ค Account

๐Ÿ‘ค Manage your Capgo account details and retrieve information for support or collaboration.

๐Ÿ”น Id

npx @capgo/cli@latest account id

๐Ÿชช Retrieve your account ID, safe to share for collaboration or support purposes in Discord or other platforms.

Example:

npx @capgo/cli@latest account id

Options:

ParamTypeDescription
-a,stringAPI key to link to your account

Keywords

appflow alternative

FAQs

Package last updated on 17 Jun 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts