From 9151892bab90489b75f40145fed5ee9fec0a6f4c Mon Sep 17 00:00:00 2001 From: Martin Donadieu Date: Fri, 7 Aug 2026 18:41:05 +0300 Subject: [PATCH] docs(cli): document bundle upload --auto-bump ai Co-authored-by: Cursor --- apps/docs/src/content/docs/docs/cli/commands.mdx | 2 +- apps/docs/src/content/docs/docs/cli/reference/bundle.mdx | 5 ++++- .../content/docs/docs/getting-started/cicd-integration.mdx | 3 +++ apps/docs/src/content/docs/docs/live-updates/channels.mdx | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/apps/docs/src/content/docs/docs/cli/commands.mdx b/apps/docs/src/content/docs/docs/cli/commands.mdx index f0304d386..1fd356296 100644 --- a/apps/docs/src/content/docs/docs/cli/commands.mdx +++ b/apps/docs/src/content/docs/docs/cli/commands.mdx @@ -173,7 +173,7 @@ Optionally, you can give: * `--no-code-check` Ignore checking if notifyAppReady() is called in source code and index present in root folder. * `--display-iv-session` Show in the console the IV and session key used to encrypt the update. * `--bundle ` Bundle version number of the bundle to upload. -* `--auto-bump [level]` Auto-increment from the channel's linked bundle, else the latest remote app version. Level: `major`, `minor` (default), `patch` (alias `fix`), or `metadata`. Bumps until a free name is found (deleted names stay occupied). Cannot be combined with `--bundle`. +* `--auto-bump [level]` Auto-increment from the channel's linked bundle, else the latest remote app version. Level: `major`, `minor` (default), `patch` (alias `fix`), `metadata`, or `ai` (Workers AI compares local files to the previous Capgo/channel delta manifest, infers the level, and logs a short reason; skips AI and bumps `patch` if no previous Capgo version). Bumps until a free name is found (deleted names stay occupied). Cannot be combined with `--bundle`. * `--min-update-version ` 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` Set the min update version based on native packages. * `--ignore-metadata-check` Ignores the metadata (node_modules) check when uploading. diff --git a/apps/docs/src/content/docs/docs/cli/reference/bundle.mdx b/apps/docs/src/content/docs/docs/cli/reference/bundle.mdx index bb6309e90..1978656a9 100644 --- a/apps/docs/src/content/docs/docs/cli/reference/bundle.mdx +++ b/apps/docs/src/content/docs/docs/cli/reference/bundle.mdx @@ -36,8 +36,11 @@ npx @capgo/cli@latest bundle upload --auto-bump major npx @capgo/cli@latest bundle upload --auto-bump minor # default when the flag has no value npx @capgo/cli@latest bundle upload --auto-bump patch # alias: fix npx @capgo/cli@latest bundle upload --auto-bump metadata +npx @capgo/cli@latest bundle upload --channel=production --auto-bump ai ``` +With `--auto-bump ai`, Capgo Cloudflare Workers AI compares local bundle files to the previous Capgo/channel delta manifest, infers `major` | `minor` | `patch` | `metadata`, and prints a short reason in the CLI log. If no previous Capgo version exists, AI is skipped and the bump defaults to **patch**. + **Options:** | Param | Type | Description | @@ -64,7 +67,7 @@ npx @capgo/cli@latest bundle upload --auto-bump metadata | **--no-code-check** | boolean | Ignore checking if notifyAppReady() is called in source code and index present in root folder | | **--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 | -| **--auto-bump** | string | Auto-increment from the channel's linked bundle, else the latest remote app version. Level: major, minor (default), patch (alias fix), or metadata. Bumps until a free name is found (deleted names stay occupied). Cannot be combined with --bundle (-b) | +| **--auto-bump** | string | Auto-increment from the channel's linked bundle, else the latest remote app version. Level: major, minor (default), patch (alias fix), metadata, or ai (Workers AI infers level from local vs previous delta manifest; falls back to patch with no previous Capgo version). Bumps until a free name is found (deleted names stay occupied). Cannot be combined with --bundle (-b) | | **--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 | diff --git a/apps/docs/src/content/docs/docs/getting-started/cicd-integration.mdx b/apps/docs/src/content/docs/docs/getting-started/cicd-integration.mdx index 1b869e599..c4c35b5b5 100644 --- a/apps/docs/src/content/docs/docs/getting-started/cicd-integration.mdx +++ b/apps/docs/src/content/docs/docs/getting-started/cicd-integration.mdx @@ -158,8 +158,11 @@ npx @capgo/cli@latest bundle upload --auto-bump major npx @capgo/cli@latest bundle upload --auto-bump minor # default when the flag has no value npx @capgo/cli@latest bundle upload --auto-bump patch # alias: fix npx @capgo/cli@latest bundle upload --auto-bump metadata +npx @capgo/cli@latest bundle upload --channel=production --auto-bump ai ``` +`--auto-bump ai` uses Capgo Cloudflare Workers AI to compare local bundle files against the previous Capgo/channel delta manifest, pick `major` | `minor` | `patch` | `metadata`, and print a short reason. With no previous Capgo version, AI is skipped and the bump is **patch**. + Do not combine `--auto-bump` with `--bundle` / `-b`. See the [`bundle upload` reference](/docs/cli/reference/bundle/#bundle-upload) for the full option list. ## Troubleshooting diff --git a/apps/docs/src/content/docs/docs/live-updates/channels.mdx b/apps/docs/src/content/docs/docs/live-updates/channels.mdx index fe650ea67..4612d877d 100644 --- a/apps/docs/src/content/docs/docs/live-updates/channels.mdx +++ b/apps/docs/src/content/docs/docs/live-updates/channels.mdx @@ -209,7 +209,7 @@ It's important to note that bundles in Capgo are global to your app, not specifi When versioning your bundles, we recommend using [semantic versioning with Capgo's Semver Tester](/semver_tester/) and pre-release identifiers for channel-specific builds. For example, a beta release might be versioned as `1.2.3-beta.1`. -In CI, if the local version was already uploaded, use `npx @capgo/cli@latest bundle upload --auto-bump` (optionally `major`, `minor`, `patch`/`fix`, or `metadata`) so the CLI bumps from the channel's linked bundle until a free name is found. You cannot combine it with `--bundle`. See [CI/CD Integration](/docs/getting-started/cicd-integration/#auto-bump-when-the-local-version-is-already-on-capgo) and the [CLI reference](/docs/cli/reference/bundle/#bundle-upload). +In CI, if the local version was already uploaded, use `npx @capgo/cli@latest bundle upload --auto-bump` (optionally `major`, `minor`, `patch`/`fix`, `metadata`, or `ai`) so the CLI bumps from the channel's linked bundle until a free name is found. With `ai`, Workers AI infers the level from the local vs previous delta manifest (falls back to `patch` with no previous Capgo version). You cannot combine it with `--bundle`. See [CI/CD Integration](/docs/getting-started/cicd-integration/#auto-bump-when-the-local-version-is-already-on-capgo) and the [CLI reference](/docs/cli/reference/bundle/#bundle-upload). This approach has several benefits: