Skip to content

🔹 build

🏗️ Manage native iOS/Android builds through Capgo Cloud.

Native cloud build requests are currently in limited beta and access is restricted. Build credentials are never stored on Capgo servers: they are used only for the build and then deleted. Build outputs can optionally be uploaded with time-limited download links.

Terminal window
npx @capgo/cli build credentials save --appId YOUR_APP_ID --platform ios
npx @capgo/cli build credentials save --appId YOUR_APP_ID --platform android

Pass --output-record to persist the download URL and QR code, then use build last-output to read it:

Terminal window
npx @capgo/cli build request APP_ID --platform android --output-upload --output-record /tmp/build.json
npx @capgo/cli build last-output --path /tmp/build.json --field outputUrl
Terminal window
npx @capgo/cli@latest build needed

🧭 Print “yes” and exit with code 1 if a native build is required; otherwise print “no” and exit with code 0. Command failures exit with code 2.

Example:

Terminal window
npx @capgo/cli@latest build needed com.example.app --channel production --verbose

Options:

ParamTypeDescription
-astringAPI key to link to your account
-cstringChannel to compare against. Defaults to CapacitorUpdater.defaultChannel or the public default channel
—package-jsonstringPaths to package.json files for monorepos (comma-separated)
—node-modulesstringPaths to node_modules directories for monorepos (comma-separated)
—verbosebooleanEnable verbose output with detailed logging
—supa-hoststringCustom Supabase host URL (for self-hosting or Capgo development)
—supa-anonstringCustom Supabase anon key (for self-hosting)

Alias: onboarding

Terminal window
npx @capgo/cli@latest build init

Set up build credentials interactively (iOS: certificates + profiles automated; Android: keystore + Google OAuth provisions GCP service account and Play Console invite)

Options:

ParamTypeDescription
-astringAPI key to link to your account
-pstringPlatform to onboard (ios or android). If omitted, auto-detects when only one native folder exists; prompts otherwise.
—supa-hoststringCustom Supabase host URL (for self-hosting or Capgo development)
—no-analyticsbooleanDisable build onboarding analytics and terminal replay for this run
Terminal window
npx @capgo/cli@latest build request

Request a native build from Capgo Cloud. This command will zip your project directory and upload it to Capgo for building. The build will be processed and sent directly to app stores. Credentials are never stored on Capgo servers; they are deleted after the build. Save them before requesting a build:

Terminal window
npx @capgo/cli build credentials save --appId APP_ID --platform ios

Example:

Terminal window
npx @capgo/cli@latest build request com.example.app --platform ios --path .

Options:

ParamTypeDescription
—pathstringPath to the project directory to build (default: current directory)
—node-modulesstringPaths to node_modules directories for monorepos (comma-separated)
—platformstringTarget platform: ios or android (required)
—build-modestringBuild mode: debug or release (default: release)
—build-certificate-base64stringiOS: Base64-encoded .p12 certificate
—p12-passwordstringiOS: Certificate password (optional if cert has no password)
—apple-idstringiOS: Apple ID email for app-specific password uploads (alternative to App Store Connect API key)
—apple-app-specific-passwordstringiOS: App-specific password (xxxx-xxxx-xxxx-xxxx) for TestFlight uploads
—apple-app-idstringiOS: Numeric App Store Connect app id (required together with —apple-id and —apple-app-specific-password)
—apple-key-idstringiOS: App Store Connect API Key ID
—apple-issuer-idstringiOS: App Store Connect Issuer ID
—apple-key-contentstringiOS: Base64-encoded App Store Connect API key (.p8)
—app-store-connect-team-idstringiOS: App Store Connect Team ID
—ios-schemestringiOS: Xcode scheme to build (default: App)
—ios-targetstringiOS: Xcode target for reading build settings (default: same as scheme)
—ios-distributionstringiOS: Distribution mode
—ios-provisioning-profilestringiOS: Provisioning profile path or bundleId=path mapping (repeatable)
—android-keystore-filestringAndroid: Base64-encoded keystore file
—keystore-key-aliasstringAndroid: Keystore key alias
—keystore-key-passwordstringAndroid: Keystore key password
—keystore-store-passwordstringAndroid: Keystore store password
—play-config-jsonstringAndroid: Base64-encoded Google Play service account JSON
—android-flavorstringAndroid: Product flavor to build (e.g. production). Required if your project has multiple flavors.
—in-app-update-prioritystringAndroid: Google Play in-app update priority for this release (integer 0–5; higher = more urgent). See https://developer.android.com/guide/playcore/in-app-updates. Precedence: CLI > env > saved credentials
—no-playstore-uploadbooleanSkip Play Store upload for this build (nulls out saved play config). Requires —output-upload.
—submit-to-store-reviewbooleanAfter upload, submit the store release for review instead of leaving it as a draft/inactive build. Android marks the Play release completed; iOS submits the processed TestFlight build to App Store review.
—store-release-namestringStore release name/version label. Android sends this as the Google Play version_name; iOS uses it as the App Store version when creating or reusing the editable version.
—store-release-notesstringDefault store release notes. Android uses this as the Play changelog; iOS uses it as the fallback App Store What’s New text.
—store-release-notes-localestringLocalized store release notes (repeatable), for example —store-release-notes-locale en-US=“Bug fixes” —store-release-notes-locale fr-FR=“Corrections”.
—ios-testflight-groupsstringiOS: optional comma-separated TestFlight external group names or IDs for external beta distribution.
—ios-automatic-releasebooleaniOS: automatically release the App Store version after Apple approval. Default is manual release.
—no-ios-automatic-releasebooleaniOS: keep the App Store version waiting for manual release after Apple approval.
—output-uploadbooleanOverride output upload behavior for this build only (enable). Precedence: CLI > env > saved credentials
—no-output-uploadbooleanOverride output upload behavior for this build only (disable). Precedence: CLI > env > saved credentials
—output-retentionstringOverride output link TTL for this build only (1h to 7d). Examples: 1h, 6h, 2d. Precedence: CLI > env > saved credentials
—output-recordstringAfter a successful build, write a JSON record (jobId, status, outputUrl, qrCodeAscii, qrCodePngPath, finishedAt) to a path. A PNG QR code is also written next to that path with the .qr.png suffix. Read fields back with build last-output.
—no-skip-build-number-bumpbooleanOverride saved credentials to re-enable automatic build number incrementing for this build only.
—skip-marketing-version-bumpbooleanSkip automatic marketing version (CFBundleShortVersionString / versionName) bump when the app is already released.
—sync-ios-versionbooleaniOS: sync Xcode MARKETING_VERSION from package.json before uploading the project.
—ai-analyticsbooleanOn build failure, send logs to Capgo AI for diagnosis. In interactive terminals this skips the upfront confirmation; in CI this auto-uploads and prints the analysis to stderr.
—no-prescanbooleanSkip the automatic pre-build scan
—prescan-ignore-fatalbooleanRun the pre-build scan but never block the build (report only)
—fail-on-warningsbooleanTreat prescan warnings as fatal
—send-logs-to-supportbooleanOn a CI/CD build failure, automatically upload the build logs to Capgo support (no email required). Capgo support is notified and will follow up by email. Additive to —ai-analytics.
—send-logsbooleanDeprecated alias for —send-logs-to-support
-astringAPI key to link to your account
—supa-hoststringCustom Supabase host URL (for self-hosting or Capgo development)
—supa-anonstringCustom Supabase anon key (for self-hosting)
—verbosebooleanEnable verbose output with detailed logging
Terminal window
npx @capgo/cli@latest build sync-ios-version

Sync the local iOS Xcode MARKETING_VERSION from package.json.

Example:

Terminal window
npx @capgo/cli@latest build sync-ios-version --path .

Options:

ParamTypeDescription
—pathstringPath to the project directory (default: current directory)
—checkbooleanCheck only; exit non-zero when MARKETING_VERSION is out of sync
Terminal window
npx @capgo/cli@latest build prescan

Scan your project and saved credentials for problems that would fail a cloud build — before uploading anything. Checks credentials (expiry, passwords, profile pairing), project state (cap sync, node_modules layout), and platform config. Runs automatically inside build request; this command runs it standalone (e.g. in CI).

Options:

ParamTypeDescription
—platformstringTarget platform: ios or android (required)
—pathstringPath to the project directory (default: current directory)
-astringAPI key to link to your account
—android-flavorstringAndroid: product flavor the build will use
—ios-diststringiOS: distribution mode to validate against
—jsonbooleanOutput a machine-readable JSON report
—fail-on-warningsbooleanExit non-zero when warnings are found (CI)
—ignore-fatalbooleanDiagnostic mode: report everything but always exit 0
—verbosebooleanEnable verbose output with detailed logging
—supa-hoststringCustom Supabase host URL (for self-hosting or Capgo development)
—supa-anonstringCustom Supabase anon key (for self-hosting)
Terminal window
npx @capgo/cli@latest build last-output

Read the build output record written by a previous build request --output-record. Prints the full JSON by default, a single field with —field, or the ASCII QR code with —qr. Useful in CI to grab the download URL or QR for posting back to a PR or issue. Examples: npx @capgo/cli build last-output —path /tmp/build.json npx @capgo/cli build last-output —path /tmp/build.json —field outputUrl npx @capgo/cli build last-output —path /tmp/build.json —qr

Options:

ParamTypeDescription
—pathstringPath to the JSON record written by —output-record (required)
—fieldstringPrint a single field (one of: jobId, appId, platform, buildMode, status, outputUrl, qrCodeAscii, qrCodePngPath, finishedAt, schemaVersion)
—qrbooleanPrint the rendered ASCII QR code (shortcut for —field qrCodeAscii)

Manage build credentials stored locally on your machine. 🔒 SECURITY:

Alias: asc-key

Terminal window
npx @capgo/cli@latest build credentials apple-key

Create an App Store Connect team API key with a guided macOS helper (macOS only). Opens a native window that walks you through Apple’s App Store Connect UI in an embedded browser, auto-captures the Issuer ID + Key ID, intercepts the one-time .p8, validates it against Apple, and saves it to ~/.appstoreconnect/private_keys. Progress statistics are forwarded to Capgo analytics (disable with CAPGO_DISABLE_TELEMETRY). npx @capgo/cli build credentials apple-key —appId com.example.app

Example:

Terminal window
Example:

Options:

ParamTypeDescription
-astringAPI key to link to your account
—appIdstringSave the captured key into this app iOS build credentials
—localbooleanSave into the per-project .capgo-credentials.json instead of the global file
—jsonbooleanPrint the captured Key ID / Issuer ID / .p8 path as JSON
Terminal window
npx @capgo/cli@latest build credentials save

Save build credentials locally for iOS or Android. Credentials are stored in:

  • ~/.capgo-credentials/credentials.json (default, global)
  • .capgo-credentials.json in project root (with —local flag) ⚠️ REQUIRED BEFORE BUILDING: You must save credentials before requesting a build. 🔒 These credentials are NEVER stored on Capgo servers permanently. They are deleted immediately after the build completes. 📚 Setup guides: iOS: https://capgo.app/docs/cli/cloud-build/ios/ Android: https://capgo.app/docs/cli/cloud-build/android/ npx @capgo/cli build credentials save —platform ios
    —certificate ./cert.p12 —p12-password “password”
    —ios-provisioning-profile ./profile.mobileprovision
    —apple-key ./AuthKey.p8 —apple-key-id “KEY123”
    —apple-issuer-id “issuer-uuid” —apple-team-id “team-id” Multi-target Example (app + widget extension): npx @capgo/cli build credentials save —platform ios
    —ios-provisioning-profile ./App.mobileprovision
    —ios-provisioning-profile com.example.widget=./Widget.mobileprovision
    … npx @capgo/cli build credentials save —platform android
    —keystore ./release.keystore —keystore-alias “my-key”
    —keystore-key-password “key-pass”
    —play-config ./service-account.json Local storage (per-project): npx @capgo/cli build credentials save —local —platform ios …

Example:

Terminal window
iOS Example:

Options:

ParamTypeDescription
—appIdstringApp ID (e.g., com.example.app) (required)
—platformstringPlatform: ios or android (required)
—certificatestringiOS: Path to .p12 certificate file
—ios-provisioning-profilestringiOS: Provisioning profile path or bundleId=path (repeatable)
—p12-passwordstringiOS: Certificate password (optional if cert has no password)
—apple-keystringiOS: Path to .p8 App Store Connect API key
—apple-key-idstringiOS: App Store Connect API Key ID
—apple-issuer-idstringiOS: App Store Connect Issuer ID
—apple-team-idstringiOS: App Store Connect Team ID
—ios-distributionstringiOS: Distribution mode
—apple-idstringiOS: Apple ID email for app-specific password uploads (alternative to App Store Connect API key)
—apple-app-specific-passwordstringiOS: App-specific password (xxxx-xxxx-xxxx-xxxx) for TestFlight uploads
—apple-app-idstringiOS: Numeric App Store Connect app id (required together with —apple-id and —apple-app-specific-password)
—keystorestringAndroid: Path to keystore file (.keystore or .jks)
—keystore-aliasstringAndroid: Keystore key alias
—keystore-key-passwordstringAndroid: Keystore key password
—keystore-store-passwordstringAndroid: Keystore store password
—play-configstringAndroid: Path to Play Store service account JSON
—android-flavorstringAndroid: Product flavor to build (e.g. production). Required if your project has multiple flavors.
—in-app-update-prioritystringAndroid: Google Play in-app update priority for future releases (integer 0–5; higher = more urgent). Omit to leave Play’s existing value untouched.
—localbooleanSave to .capgo-credentials.json in project root instead of global ~/.capgo-credentials/
—output-uploadbooleanUpload build outputs (IPA/APK/AAB) to Capgo storage and print download links
—no-output-uploadbooleanDo not upload build outputs (IPA/APK/AAB) to Capgo storage
—output-retentionstringOutput link TTL: 1h to 7d (default: 1h). Examples: 1h, 6h, 2d
—skip-build-number-bumpbooleanSkip automatic build number/version code incrementing on future builds
—no-skip-build-number-bumpbooleanRe-enable automatic build number incrementing (default behavior)
—skip-marketing-version-bumpbooleanSkip automatic marketing version bump on future builds when the app is already released
—no-skip-marketing-version-bumpbooleanRe-enable automatic marketing version bump (default behavior)
Terminal window
npx @capgo/cli@latest build credentials list

List saved build credentials (passwords masked). Shows what credentials are currently saved (both global and local). Examples: npx @capgo/cli build credentials list # List all apps npx @capgo/cli build credentials list —appId com.example.app # List specific app

Options:

ParamTypeDescription
—appIdstringApp ID to list (optional, lists all if omitted)
—localbooleanList credentials from local .capgo-credentials.json only
Terminal window
npx @capgo/cli@latest build credentials clear

Clear saved build credentials. Remove credentials from storage. Use —appId and —platform to target specific credentials. Examples: npx @capgo/cli build credentials clear # Clear all apps (global) npx @capgo/cli build credentials clear —local # Clear local credentials npx @capgo/cli build credentials clear —appId com.example.app —platform ios

Options:

ParamTypeDescription
—appIdstringApp ID to clear (optional, clears all apps if omitted)
—platformstringPlatform to clear: ios or android (optional, clears all platforms if omitted)
—localbooleanClear from local .capgo-credentials.json instead of global
Terminal window
npx @capgo/cli@latest build credentials update

Update specific credentials without providing all of them again. Update existing credentials by providing only the fields you want to change. Platform is auto-detected from the options you provide. Examples: npx @capgo/cli build credentials update —ios-provisioning-profile ./new-profile.mobileprovision npx @capgo/cli build credentials update —local —keystore ./new-keystore.jks

Options:

ParamTypeDescription
—appIdstringApp ID (auto-detected from capacitor.config if omitted)
—platformstringPlatform: ios or android (auto-detected from options)
—localbooleanUpdate local .capgo-credentials.json instead of global
—certificatestringPath to P12 certificate file
—ios-provisioning-profilestringProvisioning profile path or bundleId=path (repeatable, additive by default)
—overwrite-ios-provisioning-mapbooleanReplace the entire provisioning map instead of merging (default: merge)
—p12-passwordstringP12 certificate password
—apple-keystringPath to App Store Connect API key (.p8 file)
—apple-key-idstringApp Store Connect API Key ID
—apple-issuer-idstringApp Store Connect Issuer ID
—apple-team-idstringApp Store Connect Team ID
—apple-idstringiOS: Apple ID email for app-specific password uploads (alternative to App Store Connect API key)
—apple-app-specific-passwordstringiOS: App-specific password (xxxx-xxxx-xxxx-xxxx) for TestFlight uploads
—apple-app-idstringiOS: Numeric App Store Connect app id (required together with —apple-id and —apple-app-specific-password)
—ios-distributionstringiOS: Distribution mode
—keystorestringPath to keystore file (.keystore or .jks)
—keystore-aliasstringKeystore key alias
—keystore-key-passwordstringKeystore key password
—keystore-store-passwordstringKeystore store password
—play-configstringPath to Google Play service account JSON
—android-flavorstringAndroid: Product flavor to build (e.g. production). Required if your project has multiple flavors.
—in-app-update-prioritystringAndroid: Google Play in-app update priority for future releases (integer 0–5; higher = more urgent).
—output-uploadbooleanUpload build outputs (IPA/APK/AAB) to Capgo storage and print download links
—no-output-uploadbooleanDo not upload build outputs (IPA/APK/AAB) to Capgo storage
—output-retentionstringOutput link TTL: 1h to 7d. Examples: 1h, 6h, 2d
—skip-build-number-bumpbooleanSkip automatic build number/version code incrementing on future builds
—no-skip-build-number-bumpbooleanRe-enable automatic build number incrementing (default behavior)
—skip-marketing-version-bumpbooleanSkip automatic marketing version bump on future builds when the app is already released
—no-skip-marketing-version-bumpbooleanRe-enable automatic marketing version bump (default behavior)
Terminal window
npx @capgo/cli@latest build credentials manage

Interactively manage saved build credentials. Browse stored credentials, view what’s configured, export a CI/CD-ready .env file, or delete a platform’s credentials. Reuses the same TUI as capgo init. Examples: npx @capgo/cli build credentials manage npx @capgo/cli build credentials manage —appId com.example.app npx @capgo/cli build credentials manage —appId com.example.app —platform ios npx @capgo/cli build credentials manage —local

Options:

ParamTypeDescription
—appIdstringApp ID to manage (optional, prompts to pick if omitted)
—platformstringPlatform to manage: ios or android (optional, prompts to pick if omitted)
—localbooleanOnly browse local .capgo-credentials.json
Terminal window
npx @capgo/cli@latest build credentials migrate

Migrate legacy provisioning profile to the new multi-target format. Converts BUILD_PROVISION_PROFILE_BASE64 to CAPGO_IOS_PROVISIONING_MAP. Discovers the main bundle ID from your Xcode project automatically. npx @capgo/cli build credentials migrate —platform ios

Example:

Terminal window
Example:

Options:

ParamTypeDescription
—appIdstringApp ID (auto-detected from capacitor.config if omitted)
—platformstringPlatform (only ios is supported)
—localbooleanMigrate from local .capgo-credentials.json instead of global