Skip to content

feat: Command Line SDK update for version 21.0.0#310

Closed
ChiragAgg5k wants to merge 1 commit into
masterfrom
dev
Closed

feat: Command Line SDK update for version 21.0.0#310
ChiragAgg5k wants to merge 1 commit into
masterfrom
dev

Conversation

@ChiragAgg5k
Copy link
Copy Markdown
Member

@ChiragAgg5k ChiragAgg5k commented May 11, 2026

This PR contains updates to the SDK for version 21.0.0.

What's Changed

  • Breaking: Renamed project update-canonical-emails, update-disposable-emails, and update-free-emails to update-deny-canonical-email-policy, update-deny-disposable-email-policy, and update-deny-free-email-policy
  • Breaking: Renamed proxy update-rule-verification to proxy update-rule-status
  • Breaking: Renamed --provider to --provider-id on project get-o-auth-2-provider
  • Breaking: Made --variable-id required on functions create-variable and sites create-variable
  • Added: Introduced bigint create/update commands for legacy Databases attributes
  • Added: Introduced bigint create/update commands for TablesDB columns
  • Added: Added --on-duplicate flag on tablesdb upsert-row, create-rows, and upsert-rows
  • Added: Added --limit flag on vcs list-repository-branches
  • Added: Code-signed Windows release binaries (appwrite-cli-win-x64.exe and appwrite-cli-win-arm64.exe) via SignPath
  • Updated: Extended key-list query filters with key, resourceType, resourceId, and secret
  • Updated: Changed default --duration on project create-ephemeral-key from 1 to 600 seconds

@greptile-apps
Copy link
Copy Markdown

greptile-apps Bot commented May 11, 2026

Greptile Summary

This PR updates the Appwrite Command Line SDK to version 21.0.0, bumping the package version, upgrading the @appwrite.io/console dependency to 12.1.0, and synchronising all CLI commands with the new API surface.

  • New commands & options: Adds create-big-int-attribute/update-big-int-attribute (databases), create-big-int-column/update-big-int-column (tables-db), optional --on-duplicate to three migration commands, --variable-id to create-variable in functions/sites, and full pagination to several list-* endpoints.
  • Breaking renames: update-rule-verificationupdate-rule-status in proxy; three update-canonical/disposable/free-emails project commands replaced by update-deny-*-email-policy equivalents; getOAuth2Provider flag renamed from --provider to --provider-id.
  • CI signing: Adds a Windows binary code-signing step via SignPath with signature verification using osslsigncode, keeping the action pinned to a commit hash.

Confidence Score: 4/5

The change is a well-structured SDK version bump; the two noted issues are self-consistent with pre-existing patterns in the repo and do not affect core functionality.

Most of the diff is mechanical SDK-generated code that follows existing patterns. The vcs list-repository-branches command exposes --where, --sort-asc, and --sort-desc flags that the endpoint explicitly does not support, which could mislead users into sending unsupported queries. The update-big-int-attribute/update-big-int-column commands inherit the codebase-wide pattern of making --xdefault required even though it cannot be supplied alongside --required true. Neither issue causes data loss or a security problem, but both create confusing UX for users of the new or changed commands.

lib/commands/services/vcs.ts (unsupported query flags) and lib/commands/services/databases.ts / lib/commands/services/tables-db.ts (required --xdefault conflict) deserve a second look before merging.

Important Files Changed

Filename Overview
lib/commands/services/project.ts Removes three old email-policy commands, renames getOAuth2Provider to use --provider-id, adds pagination to listOAuth2Providers, and adds three new updateDeny*EmailPolicy commands; changes are consistent and well-formed.
lib/commands/services/proxy.ts Removes --search from list-rules, renames update-rule-verification to update-rule-status, adds Rule ID generation notes to create descriptions; all changes match SDK 21.0.0 API updates.
lib/commands/services/vcs.ts Adds search, queries, and pagination options to list-repository-branches, but exposes --where, --sort-asc, and --sort-desc flags that are explicitly unsupported by this endpoint.
lib/commands/services/databases.ts Adds create-big-int-attribute and update-big-int-attribute commands; --xdefault is requiredOption in the update command but its description says it cannot be set when the attribute is required, creating an unsatisfiable combination.
lib/commands/services/tables-db.ts Adds create-big-int-column and update-big-int-column commands, mirroring the databases changes; same --xdefault required/description conflict as in databases.ts.
lib/commands/services/functions.ts Adds --variable-id as a required option to create-variable, adds full pagination support to list-variables, and makes --key optional in update-variable.
lib/commands/services/sites.ts Mirrors the functions.ts variable changes for sites: adds --variable-id to create-variable, pagination to list-variables, and makes --key optional in update-variable.
lib/commands/services/migrations.ts Adds optional --on-duplicate parameter to createAppwriteMigration, createCSVImport, and createJSONImport commands.
.github/workflows/publish.yml Adds Windows binary code signing via SignPath with upload, sign, replace, and osslsigncode verification steps; the signpath action is pinned to a commit hash for security.
lib/constants.ts Bumps SDK_VERSION from 20.1.0 to 21.0.0.
package.json Bumps package version to 21.0.0, upgrades @appwrite.io/console to 12.1.0, and adds --fallback-to-source to the Windows ARM64 pkg build command.

Reviews (1): Last reviewed commit: "chore: update Command Line SDK to 21.0.0" | Re-trigger Greptile

Comment on lines +104 to +111
.option(`--limit <limit>`, `Maximum number of results to return.`, parseInteger)
.option(`--offset <offset>`, `Number of results to skip.`, parseInteger)
.option(`--cursor-after <id>`, `Return results after this cursor ID.`)
.option(`--cursor-before <id>`, `Return results before this cursor ID.`)
.action(
actionRunner(
async ({ installationId, providerRepositoryId }) =>
parse(await (await getVcsClient()).listRepositoryBranches(installationId, providerRepositoryId)),
async ({ installationId, providerRepositoryId, search, queries, where, sortAsc, sortDesc, cursorAfter, cursorBefore, limit, offset }) =>
parse(await (await getVcsClient()).listRepositoryBranches(installationId, providerRepositoryId, search, buildQueries({ queries, where, sortAsc, sortDesc, cursorAfter, cursorBefore, limit, offset }))),
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Unsupported query flags exposed to users

The --where, --sort-asc, and --sort-desc options are added to list-repository-branches, but both the --queries option description and the command description explicitly state only limit, offset, cursorAfter, and cursorBefore are supported by this endpoint. A user who runs appwrite vcs list-repository-branches --where "name=main" will see these flags in --help output and use them expecting them to work, but the generated query strings will be forwarded to an API that rejects them. Consider removing the unsupported options or adding a note in their help text that they are ignored.

Comment on lines +396 to +410
.command(`update-big-int-attribute`)
.description(`Update a bigint attribute. Changing the \`default\` value will not update already existing documents.
`)
.requiredOption(`--database-id <database-id>`, `Database ID.`)
.requiredOption(`--collection-id <collection-id>`, `Collection ID.`)
.requiredOption(`--key <key>`, `Attribute Key.`)
.requiredOption(`--required <required>`, `Is attribute required?`, parseBool)
.requiredOption(`--xdefault <xdefault>`, `Default value. Cannot be set when attribute is required.`, parseInteger)
.option(`--min <min>`, `Minimum value`, parseInteger)
.option(`--max <max>`, `Maximum value`, parseInteger)
.option(`--new-key <new-key>`, `New Attribute Key.`)
.action(
actionRunner(
async ({ databaseId, collectionId, key, required, xdefault, min, max, newKey }) =>
parse(await (await getDatabasesClient()).updateBigIntAttribute(databaseId, collectionId, key, required, xdefault, min, max, newKey)),
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 --xdefault is required but may be invalid when --required true

update-big-int-attribute marks --xdefault as a requiredOption, yet its description says "Cannot be set when attribute is required." A user who passes --required true --xdefault 0 will be forced to supply the value at the CLI layer but the API will then reject the combination. When --required true is the intent, the user has no valid way to satisfy both constraints. This same pattern exists in other pre-existing update attribute commands (updateBoolean, updateDatetime, etc.) and the same issue is present in tablesDBUpdateBigIntColumnCommand in tables-db.ts.

@ChiragAgg5k
Copy link
Copy Markdown
Member Author

Closing — was generated from cloud-local 1.9.x spec which is ahead of the published appwrite/specs:main. Re-pushing against the public spec to keep CI consistent.

@ChiragAgg5k ChiragAgg5k deleted the dev branch May 11, 2026 03:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant