appwrite-cli 6.2.0 → 6.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -29,7 +29,7 @@ Once the installation is complete, you can verify the install using
29
29
 
30
30
  ```sh
31
31
  $ appwrite -v
32
- 6.2.0
32
+ 6.2.2
33
33
  ```
34
34
 
35
35
  ### Install using prebuilt binaries
@@ -60,7 +60,7 @@ $ scoop install https://raw.githubusercontent.com/appwrite/sdk-for-cli/master/sc
60
60
  Once the installation completes, you can verify your install using
61
61
  ```
62
62
  $ appwrite -v
63
- 6.2.0
63
+ 6.2.2
64
64
  ```
65
65
 
66
66
  ## Getting Started
package/install.ps1 CHANGED
@@ -13,8 +13,8 @@
13
13
  # You can use "View source" of this page to see the full script.
14
14
 
15
15
  # REPO
16
- $GITHUB_x64_URL = "https://github.com/appwrite/sdk-for-cli/releases/download/6.2.0/appwrite-cli-win-x64.exe"
17
- $GITHUB_arm64_URL = "https://github.com/appwrite/sdk-for-cli/releases/download/6.2.0/appwrite-cli-win-arm64.exe"
16
+ $GITHUB_x64_URL = "https://github.com/appwrite/sdk-for-cli/releases/download/6.2.2/appwrite-cli-win-x64.exe"
17
+ $GITHUB_arm64_URL = "https://github.com/appwrite/sdk-for-cli/releases/download/6.2.2/appwrite-cli-win-arm64.exe"
18
18
 
19
19
  $APPWRITE_BINARY_NAME = "appwrite.exe"
20
20
 
package/install.sh CHANGED
@@ -97,7 +97,7 @@ printSuccess() {
97
97
  downloadBinary() {
98
98
  echo "[2/4] Downloading executable for $OS ($ARCH) ..."
99
99
 
100
- GITHUB_LATEST_VERSION="6.2.0"
100
+ GITHUB_LATEST_VERSION="6.2.2"
101
101
  GITHUB_FILE="appwrite-cli-${OS}-${ARCH}"
102
102
  GITHUB_URL="https://github.com/$GITHUB_REPOSITORY_NAME/releases/download/$GITHUB_LATEST_VERSION/$GITHUB_FILE"
103
103
 
package/lib/client.js CHANGED
@@ -16,8 +16,8 @@ class Client {
16
16
  'x-sdk-name': 'Command Line',
17
17
  'x-sdk-platform': 'console',
18
18
  'x-sdk-language': 'cli',
19
- 'x-sdk-version': '6.2.0',
20
- 'user-agent' : `AppwriteCLI/6.2.0 (${os.type()} ${os.version()}; ${os.arch()})`,
19
+ 'x-sdk-version': '6.2.2',
20
+ 'user-agent' : `AppwriteCLI/6.2.2 (${os.type()} ${os.version()}; ${os.arch()})`,
21
21
  'X-Appwrite-Response-Format' : '1.6.0',
22
22
  };
23
23
  }
@@ -208,7 +208,7 @@ class Client {
208
208
  globalConfig.setCurrentSession('');
209
209
  globalConfig.removeSession(current);
210
210
  }
211
- throw new AppwriteException(json.message, json.code, json.type, json);
211
+ throw new AppwriteException(json.message, json.code, json.type, text);
212
212
  }
213
213
 
214
214
  if (responseType === "arraybuffer") {
@@ -1954,7 +1954,7 @@ account
1954
1954
 
1955
1955
  account
1956
1956
  .command(`create-push-target`)
1957
- .description(``)
1957
+ .description(`Use this endpoint to register a device for push notifications. Provide a target ID (custom or generated using ID.unique()), a device identifier (usually a device token), and optionally specify which provider should send notifications to this target. The target is automatically linked to the current session and includes device information like brand and model.`)
1958
1958
  .requiredOption(`--target-id <target-id>`, `Target ID. Choose a custom ID or generate a random ID with 'ID.unique()'. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.`)
1959
1959
  .requiredOption(`--identifier <identifier>`, `The target identifier (token, email, phone etc.)`)
1960
1960
  .option(`--provider-id <provider-id>`, `Provider ID. Message will be sent to this target from the specified provider ID. If no provider ID is set the first setup provider will be used.`)
@@ -1962,14 +1962,14 @@ account
1962
1962
 
1963
1963
  account
1964
1964
  .command(`update-push-target`)
1965
- .description(``)
1965
+ .description(`Update the currently logged in user's push notification target. You can modify the target's identifier (device token) and provider ID (token, email, phone etc.). The target must exist and belong to the current user. If you change the provider ID, notifications will be sent through the new messaging provider instead.`)
1966
1966
  .requiredOption(`--target-id <target-id>`, `Target ID.`)
1967
1967
  .requiredOption(`--identifier <identifier>`, `The target identifier (token, email, phone etc.)`)
1968
1968
  .action(actionRunner(accountUpdatePushTarget))
1969
1969
 
1970
1970
  account
1971
1971
  .command(`delete-push-target`)
1972
- .description(``)
1972
+ .description(`Delete a push notification target for the currently logged in user. After deletion, the device will no longer receive push notifications. The target must exist and belong to the current user.`)
1973
1973
  .requiredOption(`--target-id <target-id>`, `Target ID.`)
1974
1974
  .action(actionRunner(accountDeletePushTarget))
1975
1975
 
@@ -75,7 +75,7 @@ const assistantChat = async ({prompt,parseOutput = true, overrideForCli = false,
75
75
 
76
76
  assistant
77
77
  .command(`chat`)
78
- .description(``)
78
+ .description(`Send a prompt to the AI assistant and receive a response. This endpoint allows you to interact with Appwrite's AI assistant by sending questions or prompts and receiving helpful responses in real-time through a server-sent events stream. `)
79
79
  .requiredOption(`--prompt <prompt>`, `Prompt. A string containing questions asked to the AI assistant.`)
80
80
  .action(actionRunner(assistantChat))
81
81
 
@@ -2126,7 +2126,7 @@ databases
2126
2126
 
2127
2127
  databases
2128
2128
  .command(`get-usage`)
2129
- .description(``)
2129
+ .description(`Get usage metrics and statistics for all databases in the project. You can view the total number of databases, collections, documents, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.`)
2130
2130
  .option(`--range <range>`, `'Date range.`)
2131
2131
  .action(actionRunner(databasesGetUsage))
2132
2132
 
@@ -2558,7 +2558,7 @@ databases
2558
2558
 
2559
2559
  databases
2560
2560
  .command(`get-collection-usage`)
2561
- .description(``)
2561
+ .description(`Get usage metrics and statistics for a collection. Returning the total number of documents. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.`)
2562
2562
  .requiredOption(`--database-id <database-id>`, `Database ID.`)
2563
2563
  .requiredOption(`--collection-id <collection-id>`, `Collection ID.`)
2564
2564
  .option(`--range <range>`, `Date range.`)
@@ -2573,7 +2573,7 @@ databases
2573
2573
 
2574
2574
  databases
2575
2575
  .command(`get-database-usage`)
2576
- .description(``)
2576
+ .description(`Get usage metrics and statistics for a database. You can view the total number of collections, documents, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.`)
2577
2577
  .requiredOption(`--database-id <database-id>`, `Database ID.`)
2578
2578
  .option(`--range <range>`, `'Date range.`)
2579
2579
  .option(`--console`, `Get the resource console url`)
@@ -1420,7 +1420,7 @@ functions
1420
1420
 
1421
1421
  functions
1422
1422
  .command(`get-usage`)
1423
- .description(``)
1423
+ .description(`Get usage metrics and statistics for a for all functions. View statistics including total functions, deployments, builds, executions, storage usage, and compute time. The response includes both current totals and historical data for each metric. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, defaults to 30 days.`)
1424
1424
  .option(`--range <range>`, `Date range.`)
1425
1425
  .action(actionRunner(functionsGetUsage))
1426
1426
 
@@ -1503,7 +1503,7 @@ functions
1503
1503
 
1504
1504
  functions
1505
1505
  .command(`create-build`)
1506
- .description(``)
1506
+ .description(`Create a new build for an existing function deployment. This endpoint allows you to rebuild a deployment with the updated function configuration, including its entrypoint and build commands if they have been modified The build process will be queued and executed asynchronously. The original deployment's code will be preserved and used for the new build.`)
1507
1507
  .requiredOption(`--function-id <function-id>`, `Function ID.`)
1508
1508
  .requiredOption(`--deployment-id <deployment-id>`, `Deployment ID.`)
1509
1509
  .option(`--build-id <build-id>`, `Build unique ID.`)
@@ -1511,7 +1511,7 @@ functions
1511
1511
 
1512
1512
  functions
1513
1513
  .command(`update-deployment-build`)
1514
- .description(``)
1514
+ .description(`Cancel an ongoing function deployment build. If the build is already in progress, it will be stopped and marked as canceled. If the build hasn't started yet, it will be marked as canceled without executing. You cannot cancel builds that have already completed (status 'ready') or failed. The response includes the final build status and details.`)
1515
1515
  .requiredOption(`--function-id <function-id>`, `Function ID.`)
1516
1516
  .requiredOption(`--deployment-id <deployment-id>`, `Deployment ID.`)
1517
1517
  .action(actionRunner(functionsUpdateDeploymentBuild))
@@ -1563,7 +1563,7 @@ functions
1563
1563
 
1564
1564
  functions
1565
1565
  .command(`get-function-usage`)
1566
- .description(``)
1566
+ .description(`Get usage metrics and statistics for a for a specific function. View statistics including total deployments, builds, executions, storage usage, and compute time. The response includes both current totals and historical data for each metric. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, defaults to 30 days.`)
1567
1567
  .requiredOption(`--function-id <function-id>`, `Function ID.`)
1568
1568
  .option(`--range <range>`, `Date range.`)
1569
1569
  .option(`--console`, `Get the resource console url`)
@@ -2459,7 +2459,7 @@ messaging
2459
2459
 
2460
2460
  messaging
2461
2461
  .command(`update-email`)
2462
- .description(`Update an email message by its unique ID. `)
2462
+ .description(`Update an email message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated. `)
2463
2463
  .requiredOption(`--message-id <message-id>`, `Message ID.`)
2464
2464
  .option(`--topics [topics...]`, `List of Topic IDs.`)
2465
2465
  .option(`--users [users...]`, `List of User IDs.`)
@@ -2500,7 +2500,7 @@ messaging
2500
2500
 
2501
2501
  messaging
2502
2502
  .command(`update-push`)
2503
- .description(`Update a push notification by its unique ID. `)
2503
+ .description(`Update a push notification by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated. `)
2504
2504
  .requiredOption(`--message-id <message-id>`, `Message ID.`)
2505
2505
  .option(`--topics [topics...]`, `List of Topic IDs.`)
2506
2506
  .option(`--users [users...]`, `List of User IDs.`)
@@ -2536,7 +2536,7 @@ messaging
2536
2536
 
2537
2537
  messaging
2538
2538
  .command(`update-sms`)
2539
- .description(`Update an email message by its unique ID. `)
2539
+ .description(`Update an SMS message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated. `)
2540
2540
  .requiredOption(`--message-id <message-id>`, `Message ID.`)
2541
2541
  .option(`--topics [topics...]`, `List of Topic IDs.`)
2542
2542
  .option(`--users [users...]`, `List of User IDs.`)
@@ -584,14 +584,14 @@ const migrationsDelete = async ({migrationId,parseOutput = true, overrideForCli
584
584
 
585
585
  migrations
586
586
  .command(`list`)
587
- .description(``)
587
+ .description(`List all migrations in the current project. This endpoint returns a list of all migrations including their status, progress, and any errors that occurred during the migration process.`)
588
588
  .option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: status, stage, source, destination, resources, statusCounters, resourceData, errors`)
589
589
  .option(`--search <search>`, `Search term to filter your list results. Max length: 256 chars.`)
590
590
  .action(actionRunner(migrationsList))
591
591
 
592
592
  migrations
593
593
  .command(`create-appwrite-migration`)
594
- .description(``)
594
+ .description(`Migrate data from another Appwrite project to your current project. This endpoint allows you to migrate resources like databases, collections, documents, users, and files from an existing Appwrite project. `)
595
595
  .requiredOption(`--resources [resources...]`, `List of resources to migrate`)
596
596
  .requiredOption(`--endpoint <endpoint>`, `Source's Appwrite Endpoint`)
597
597
  .requiredOption(`--project-id <project-id>`, `Source's Project ID`)
@@ -600,7 +600,7 @@ migrations
600
600
 
601
601
  migrations
602
602
  .command(`get-appwrite-report`)
603
- .description(``)
603
+ .description(`Generate a report of the data in an Appwrite project before migrating. This endpoint analyzes the source project and returns information about the resources that can be migrated.`)
604
604
  .requiredOption(`--resources [resources...]`, `List of resources to migrate`)
605
605
  .requiredOption(`--endpoint <endpoint>`, `Source's Appwrite Endpoint`)
606
606
  .requiredOption(`--project-id <project-id>`, `Source's Project ID`)
@@ -609,21 +609,21 @@ migrations
609
609
 
610
610
  migrations
611
611
  .command(`create-firebase-migration`)
612
- .description(``)
612
+ .description(`Migrate data from a Firebase project to your Appwrite project. This endpoint allows you to migrate resources like authentication and other supported services from a Firebase project. `)
613
613
  .requiredOption(`--resources [resources...]`, `List of resources to migrate`)
614
614
  .requiredOption(`--service-account <service-account>`, `JSON of the Firebase service account credentials`)
615
615
  .action(actionRunner(migrationsCreateFirebaseMigration))
616
616
 
617
617
  migrations
618
618
  .command(`get-firebase-report`)
619
- .description(``)
619
+ .description(`Generate a report of the data in a Firebase project before migrating. This endpoint analyzes the source project and returns information about the resources that can be migrated.`)
620
620
  .requiredOption(`--resources [resources...]`, `List of resources to migrate`)
621
621
  .requiredOption(`--service-account <service-account>`, `JSON of the Firebase service account credentials`)
622
622
  .action(actionRunner(migrationsGetFirebaseReport))
623
623
 
624
624
  migrations
625
625
  .command(`create-n-host-migration`)
626
- .description(``)
626
+ .description(`Migrate data from an NHost project to your Appwrite project. This endpoint allows you to migrate resources like authentication, databases, and other supported services from an NHost project. `)
627
627
  .requiredOption(`--resources [resources...]`, `List of resources to migrate`)
628
628
  .requiredOption(`--subdomain <subdomain>`, `Source's Subdomain`)
629
629
  .requiredOption(`--region <region>`, `Source's Region`)
@@ -636,7 +636,7 @@ migrations
636
636
 
637
637
  migrations
638
638
  .command(`get-n-host-report`)
639
- .description(``)
639
+ .description(`Generate a detailed report of the data in an NHost project before migrating. This endpoint analyzes the source project and returns information about the resources that can be migrated. `)
640
640
  .requiredOption(`--resources [resources...]`, `List of resources to migrate.`)
641
641
  .requiredOption(`--subdomain <subdomain>`, `Source's Subdomain.`)
642
642
  .requiredOption(`--region <region>`, `Source's Region.`)
@@ -649,7 +649,7 @@ migrations
649
649
 
650
650
  migrations
651
651
  .command(`create-supabase-migration`)
652
- .description(``)
652
+ .description(`Migrate data from a Supabase project to your Appwrite project. This endpoint allows you to migrate resources like authentication, databases, and other supported services from a Supabase project. `)
653
653
  .requiredOption(`--resources [resources...]`, `List of resources to migrate`)
654
654
  .requiredOption(`--endpoint <endpoint>`, `Source's Supabase Endpoint`)
655
655
  .requiredOption(`--api-key <api-key>`, `Source's API Key`)
@@ -661,7 +661,7 @@ migrations
661
661
 
662
662
  migrations
663
663
  .command(`get-supabase-report`)
664
- .description(``)
664
+ .description(`Generate a report of the data in a Supabase project before migrating. This endpoint analyzes the source project and returns information about the resources that can be migrated. `)
665
665
  .requiredOption(`--resources [resources...]`, `List of resources to migrate`)
666
666
  .requiredOption(`--endpoint <endpoint>`, `Source's Supabase Endpoint.`)
667
667
  .requiredOption(`--api-key <api-key>`, `Source's API Key.`)
@@ -673,19 +673,19 @@ migrations
673
673
 
674
674
  migrations
675
675
  .command(`get`)
676
- .description(``)
676
+ .description(`Get a migration by its unique ID. This endpoint returns detailed information about a specific migration including its current status, progress, and any errors that occurred during the migration process. `)
677
677
  .requiredOption(`--migration-id <migration-id>`, `Migration unique ID.`)
678
678
  .action(actionRunner(migrationsGet))
679
679
 
680
680
  migrations
681
681
  .command(`retry`)
682
- .description(``)
682
+ .description(`Retry a failed migration. This endpoint allows you to retry a migration that has previously failed.`)
683
683
  .requiredOption(`--migration-id <migration-id>`, `Migration unique ID.`)
684
684
  .action(actionRunner(migrationsRetry))
685
685
 
686
686
  migrations
687
687
  .command(`delete`)
688
- .description(``)
688
+ .description(`Delete a migration by its unique ID. This endpoint allows you to remove a migration from your project's migration history. `)
689
689
  .requiredOption(`--migration-id <migration-id>`, `Migration ID.`)
690
690
  .action(actionRunner(migrationsDelete))
691
691
 
@@ -0,0 +1,48 @@
1
+ const { sdkForProject } = require('../sdks')
2
+ const { parse } = require('../parser')
3
+ const { showConsoleLink } = require('../utils.js');
4
+
5
+ /**
6
+ * @typedef {Object} OrganizationsListRequestParams
7
+ * @property {string[]} queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, total, billingPlan
8
+ * @property {string} search Search term to filter your list results. Max length: 256 chars.
9
+ * @property {boolean} parseOutput
10
+ * @property {libClient | undefined} sdk
11
+ */
12
+
13
+ /**
14
+ * @param {OrganizationsListRequestParams} params
15
+ */
16
+ const organizationsList = async ({queries, search, parseOutput = true, sdk = undefined, console}) => {
17
+ let client = !sdk ? await sdkForProject() :
18
+ sdk;
19
+ let apiPath = '/organizations';
20
+ let payload = {};
21
+ if (typeof queries !== 'undefined') {
22
+ payload['queries'] = queries;
23
+ }
24
+ if (typeof search !== 'undefined') {
25
+ payload['search'] = search;
26
+ }
27
+
28
+ let response = undefined;
29
+
30
+ response = await client.call('get', apiPath, {
31
+ 'content-type': 'application/json',
32
+ }, payload);
33
+
34
+ if (parseOutput) {
35
+ if(console) {
36
+ showConsoleLink('organizations', 'list');
37
+ } else {
38
+ parse(response)
39
+ }
40
+ }
41
+
42
+ return response;
43
+
44
+ }
45
+
46
+ module.exports = {
47
+ organizationsList
48
+ }
@@ -252,7 +252,7 @@ const projectDeleteVariable = async ({variableId,parseOutput = true, overrideFor
252
252
 
253
253
  project
254
254
  .command(`get-usage`)
255
- .description(``)
255
+ .description(`Get comprehensive usage statistics for your project. View metrics including network requests, bandwidth, storage, function executions, database usage, and user activity. Specify a time range with startDate and endDate, and optionally set the data granularity with period (1h or 1d). The response includes both total counts and detailed breakdowns by resource, along with historical data over the specified period.`)
256
256
  .requiredOption(`--start-date <start-date>`, `Starting date for the usage`)
257
257
  .requiredOption(`--end-date <end-date>`, `End date for the usage`)
258
258
  .option(`--period <period>`, `Period used`)
@@ -1939,7 +1939,7 @@ const projectsUpdateWebhookSignature = async ({projectId,webhookId,parseOutput =
1939
1939
 
1940
1940
  projects
1941
1941
  .command(`list`)
1942
- .description(``)
1942
+ .description(`Get a list of all projects. You can use the query params to filter your results. `)
1943
1943
  .option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, teamId`)
1944
1944
  .option(`--search <search>`, `Search term to filter your list results. Max length: 256 chars.`)
1945
1945
  .option(`--console`, `Get the resource console url`)
@@ -1947,7 +1947,7 @@ projects
1947
1947
 
1948
1948
  projects
1949
1949
  .command(`create`)
1950
- .description(``)
1950
+ .description(`Create a new project. You can create a maximum of 100 projects per account. `)
1951
1951
  .requiredOption(`--project-id <project-id>`, `Unique Id. Choose a custom ID or generate a random ID with 'ID.unique()'. Valid chars are a-z, and hyphen. Can't start with a special char. Max length is 36 chars.`)
1952
1952
  .requiredOption(`--name <name>`, `Project name. Max length: 128 chars.`)
1953
1953
  .requiredOption(`--team-id <team-id>`, `Team unique ID.`)
@@ -1965,14 +1965,14 @@ projects
1965
1965
 
1966
1966
  projects
1967
1967
  .command(`get`)
1968
- .description(``)
1968
+ .description(`Get a project by its unique ID. This endpoint allows you to retrieve the project's details, including its name, description, team, region, and other metadata. `)
1969
1969
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
1970
1970
  .option(`--console`, `Get the resource console url`)
1971
1971
  .action(actionRunner(projectsGet))
1972
1972
 
1973
1973
  projects
1974
1974
  .command(`update`)
1975
- .description(``)
1975
+ .description(`Update a project by its unique ID.`)
1976
1976
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
1977
1977
  .requiredOption(`--name <name>`, `Project name. Max length: 128 chars.`)
1978
1978
  .option(`--description <description>`, `Project description. Max length: 256 chars.`)
@@ -1988,13 +1988,13 @@ projects
1988
1988
 
1989
1989
  projects
1990
1990
  .command(`delete`)
1991
- .description(``)
1991
+ .description(`Delete a project by its unique ID.`)
1992
1992
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
1993
1993
  .action(actionRunner(projectsDelete))
1994
1994
 
1995
1995
  projects
1996
1996
  .command(`update-api-status`)
1997
- .description(``)
1997
+ .description(`Update the status of a specific API type. Use this endpoint to enable or disable API types such as REST, GraphQL and Realtime.`)
1998
1998
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
1999
1999
  .requiredOption(`--api <api>`, `API name.`)
2000
2000
  .requiredOption(`--status <status>`, `API status.`, parseBool)
@@ -2002,35 +2002,35 @@ projects
2002
2002
 
2003
2003
  projects
2004
2004
  .command(`update-api-status-all`)
2005
- .description(``)
2005
+ .description(`Update the status of all API types. Use this endpoint to enable or disable API types such as REST, GraphQL and Realtime all at once.`)
2006
2006
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2007
2007
  .requiredOption(`--status <status>`, `API status.`, parseBool)
2008
2008
  .action(actionRunner(projectsUpdateApiStatusAll))
2009
2009
 
2010
2010
  projects
2011
2011
  .command(`update-auth-duration`)
2012
- .description(``)
2012
+ .description(`Update how long sessions created within a project should stay active for.`)
2013
2013
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2014
2014
  .requiredOption(`--duration <duration>`, `Project session length in seconds. Max length: 31536000 seconds.`, parseInteger)
2015
2015
  .action(actionRunner(projectsUpdateAuthDuration))
2016
2016
 
2017
2017
  projects
2018
2018
  .command(`update-auth-limit`)
2019
- .description(``)
2019
+ .description(`Update the maximum number of users allowed in this project. Set to 0 for unlimited users. `)
2020
2020
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2021
2021
  .requiredOption(`--limit <limit>`, `Set the max number of users allowed in this project. Use 0 for unlimited.`, parseInteger)
2022
2022
  .action(actionRunner(projectsUpdateAuthLimit))
2023
2023
 
2024
2024
  projects
2025
2025
  .command(`update-auth-sessions-limit`)
2026
- .description(``)
2026
+ .description(`Update the maximum number of sessions allowed per user within the project, if the limit is hit the oldest session will be deleted to make room for new sessions.`)
2027
2027
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2028
2028
  .requiredOption(`--limit <limit>`, `Set the max number of users allowed in this project. Value allowed is between 1-100. Default is 10`, parseInteger)
2029
2029
  .action(actionRunner(projectsUpdateAuthSessionsLimit))
2030
2030
 
2031
2031
  projects
2032
2032
  .command(`update-memberships-privacy`)
2033
- .description(``)
2033
+ .description(`Update project membership privacy settings. Use this endpoint to control what user information is visible to other team members, such as user name, email, and MFA status. `)
2034
2034
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2035
2035
  .requiredOption(`--user-name <user-name>`, `Set to true to show userName to members of a team.`, parseBool)
2036
2036
  .requiredOption(`--user-email <user-email>`, `Set to true to show email to members of a team.`, parseBool)
@@ -2039,42 +2039,42 @@ projects
2039
2039
 
2040
2040
  projects
2041
2041
  .command(`update-mock-numbers`)
2042
- .description(``)
2042
+ .description(`Update the list of mock phone numbers for testing. Use these numbers to bypass SMS verification in development. `)
2043
2043
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2044
2044
  .requiredOption(`--numbers [numbers...]`, `An array of mock numbers and their corresponding verification codes (OTPs). Each number should be a valid E.164 formatted phone number. Maximum of 10 numbers are allowed.`)
2045
2045
  .action(actionRunner(projectsUpdateMockNumbers))
2046
2046
 
2047
2047
  projects
2048
2048
  .command(`update-auth-password-dictionary`)
2049
- .description(``)
2049
+ .description(`Enable or disable checking user passwords against common passwords dictionary. This helps ensure users don't use common and insecure passwords. `)
2050
2050
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2051
2051
  .requiredOption(`--enabled <enabled>`, `Set whether or not to enable checking user's password against most commonly used passwords. Default is false.`, parseBool)
2052
2052
  .action(actionRunner(projectsUpdateAuthPasswordDictionary))
2053
2053
 
2054
2054
  projects
2055
2055
  .command(`update-auth-password-history`)
2056
- .description(``)
2056
+ .description(`Update the authentication password history requirement. Use this endpoint to require new passwords to be different than the last X amount of previously used ones.`)
2057
2057
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2058
2058
  .requiredOption(`--limit <limit>`, `Set the max number of passwords to store in user history. User can't choose a new password that is already stored in the password history list. Max number of passwords allowed in history is20. Default value is 0`, parseInteger)
2059
2059
  .action(actionRunner(projectsUpdateAuthPasswordHistory))
2060
2060
 
2061
2061
  projects
2062
2062
  .command(`update-personal-data-check`)
2063
- .description(``)
2063
+ .description(`Enable or disable checking user passwords against their personal data. This helps prevent users from using personal information in their passwords. `)
2064
2064
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2065
2065
  .requiredOption(`--enabled <enabled>`, `Set whether or not to check a password for similarity with personal data. Default is false.`, parseBool)
2066
2066
  .action(actionRunner(projectsUpdatePersonalDataCheck))
2067
2067
 
2068
2068
  projects
2069
2069
  .command(`update-session-alerts`)
2070
- .description(``)
2070
+ .description(`Enable or disable session email alerts. When enabled, users will receive email notifications when new sessions are created.`)
2071
2071
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2072
2072
  .requiredOption(`--alerts <alerts>`, `Set to true to enable session emails.`, parseBool)
2073
2073
  .action(actionRunner(projectsUpdateSessionAlerts))
2074
2074
 
2075
2075
  projects
2076
2076
  .command(`update-auth-status`)
2077
- .description(``)
2077
+ .description(`Update the status of a specific authentication method. Use this endpoint to enable or disable different authentication methods such as email, magic urls or sms in your project. `)
2078
2078
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2079
2079
  .requiredOption(`--method <method>`, `Auth Method. Possible values: email-password,magic-url,email-otp,anonymous,invites,jwt,phone`)
2080
2080
  .requiredOption(`--status <status>`, `Set the status of this auth method.`, parseBool)
@@ -2082,7 +2082,7 @@ projects
2082
2082
 
2083
2083
  projects
2084
2084
  .command(`create-jwt`)
2085
- .description(``)
2085
+ .description(`Create a new JWT token. This token can be used to authenticate users with custom scopes and expiration time. `)
2086
2086
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2087
2087
  .requiredOption(`--scopes [scopes...]`, `List of scopes allowed for JWT key. Maximum of 100 scopes are allowed.`)
2088
2088
  .option(`--duration <duration>`, `Time in seconds before JWT expires. Default duration is 900 seconds, and maximum is 3600 seconds.`, parseInteger)
@@ -2090,14 +2090,14 @@ projects
2090
2090
 
2091
2091
  projects
2092
2092
  .command(`list-keys`)
2093
- .description(``)
2093
+ .description(`Get a list of all API keys from the current project. `)
2094
2094
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2095
2095
  .option(`--console`, `Get the resource console url`)
2096
2096
  .action(actionRunner(projectsListKeys))
2097
2097
 
2098
2098
  projects
2099
2099
  .command(`create-key`)
2100
- .description(``)
2100
+ .description(`Create a new API key. It's recommended to have multiple API keys with strict scopes for separate functions within your project.`)
2101
2101
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2102
2102
  .requiredOption(`--name <name>`, `Key name. Max length: 128 chars.`)
2103
2103
  .requiredOption(`--scopes [scopes...]`, `Key scopes list. Maximum of 100 scopes are allowed.`)
@@ -2106,7 +2106,7 @@ projects
2106
2106
 
2107
2107
  projects
2108
2108
  .command(`get-key`)
2109
- .description(``)
2109
+ .description(`Get a key by its unique ID. This endpoint returns details about a specific API key in your project including it's scopes.`)
2110
2110
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2111
2111
  .requiredOption(`--key-id <key-id>`, `Key unique ID.`)
2112
2112
  .option(`--console`, `Get the resource console url`)
@@ -2114,7 +2114,7 @@ projects
2114
2114
 
2115
2115
  projects
2116
2116
  .command(`update-key`)
2117
- .description(``)
2117
+ .description(`Update a key by its unique ID. Use this endpoint to update the name, scopes, or expiration time of an API key. `)
2118
2118
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2119
2119
  .requiredOption(`--key-id <key-id>`, `Key unique ID.`)
2120
2120
  .requiredOption(`--name <name>`, `Key name. Max length: 128 chars.`)
@@ -2124,14 +2124,14 @@ projects
2124
2124
 
2125
2125
  projects
2126
2126
  .command(`delete-key`)
2127
- .description(``)
2127
+ .description(`Delete a key by its unique ID. Once deleted, the key can no longer be used to authenticate API calls. `)
2128
2128
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2129
2129
  .requiredOption(`--key-id <key-id>`, `Key unique ID.`)
2130
2130
  .action(actionRunner(projectsDeleteKey))
2131
2131
 
2132
2132
  projects
2133
2133
  .command(`update-o-auth-2`)
2134
- .description(``)
2134
+ .description(`Update the OAuth2 provider configurations. Use this endpoint to set up or update the OAuth2 provider credentials or enable/disable providers. `)
2135
2135
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2136
2136
  .requiredOption(`--provider <provider>`, `Provider Name`)
2137
2137
  .option(`--app-id <app-id>`, `Provider app ID. Max length: 256 chars.`)
@@ -2141,14 +2141,14 @@ projects
2141
2141
 
2142
2142
  projects
2143
2143
  .command(`list-platforms`)
2144
- .description(``)
2144
+ .description(`Get a list of all platforms in the project. This endpoint returns an array of all platforms and their configurations. `)
2145
2145
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2146
2146
  .option(`--console`, `Get the resource console url`)
2147
2147
  .action(actionRunner(projectsListPlatforms))
2148
2148
 
2149
2149
  projects
2150
2150
  .command(`create-platform`)
2151
- .description(``)
2151
+ .description(`Create a new platform for your project. Use this endpoint to register a new platform where your users will run your application which will interact with the Appwrite API.`)
2152
2152
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2153
2153
  .requiredOption(`--type <type>`, `Platform type.`)
2154
2154
  .requiredOption(`--name <name>`, `Platform name. Max length: 128 chars.`)
@@ -2159,7 +2159,7 @@ projects
2159
2159
 
2160
2160
  projects
2161
2161
  .command(`get-platform`)
2162
- .description(``)
2162
+ .description(`Get a platform by its unique ID. This endpoint returns the platform's details, including its name, type, and key configurations. `)
2163
2163
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2164
2164
  .requiredOption(`--platform-id <platform-id>`, `Platform unique ID.`)
2165
2165
  .option(`--console`, `Get the resource console url`)
@@ -2167,7 +2167,7 @@ projects
2167
2167
 
2168
2168
  projects
2169
2169
  .command(`update-platform`)
2170
- .description(``)
2170
+ .description(`Update a platform by its unique ID. Use this endpoint to update the platform's name, key, platform store ID, or hostname. `)
2171
2171
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2172
2172
  .requiredOption(`--platform-id <platform-id>`, `Platform unique ID.`)
2173
2173
  .requiredOption(`--name <name>`, `Platform name. Max length: 128 chars.`)
@@ -2178,14 +2178,14 @@ projects
2178
2178
 
2179
2179
  projects
2180
2180
  .command(`delete-platform`)
2181
- .description(``)
2181
+ .description(`Delete a platform by its unique ID. This endpoint removes the platform and all its configurations from the project. `)
2182
2182
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2183
2183
  .requiredOption(`--platform-id <platform-id>`, `Platform unique ID.`)
2184
2184
  .action(actionRunner(projectsDeletePlatform))
2185
2185
 
2186
2186
  projects
2187
2187
  .command(`update-service-status`)
2188
- .description(``)
2188
+ .description(`Update the status of a specific service. Use this endpoint to enable or disable a service in your project. `)
2189
2189
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2190
2190
  .requiredOption(`--service <service>`, `Service name.`)
2191
2191
  .requiredOption(`--status <status>`, `Service status.`, parseBool)
@@ -2193,14 +2193,14 @@ projects
2193
2193
 
2194
2194
  projects
2195
2195
  .command(`update-service-status-all`)
2196
- .description(``)
2196
+ .description(`Update the status of all services. Use this endpoint to enable or disable all optional services at once. `)
2197
2197
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2198
2198
  .requiredOption(`--status <status>`, `Service status.`, parseBool)
2199
2199
  .action(actionRunner(projectsUpdateServiceStatusAll))
2200
2200
 
2201
2201
  projects
2202
2202
  .command(`update-smtp`)
2203
- .description(``)
2203
+ .description(`Update the SMTP configuration for your project. Use this endpoint to configure your project's SMTP provider with your custom settings for sending transactional emails. `)
2204
2204
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2205
2205
  .requiredOption(`--enabled <enabled>`, `Enable custom SMTP service`, parseBool)
2206
2206
  .option(`--sender-name <sender-name>`, `Name of the email sender`)
@@ -2215,7 +2215,7 @@ projects
2215
2215
 
2216
2216
  projects
2217
2217
  .command(`create-smtp-test`)
2218
- .description(``)
2218
+ .description(`Send a test email to verify SMTP configuration. `)
2219
2219
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2220
2220
  .requiredOption(`--emails [emails...]`, `Array of emails to send test email to. Maximum of 10 emails are allowed.`)
2221
2221
  .requiredOption(`--sender-name <sender-name>`, `Name of the email sender`)
@@ -2230,14 +2230,14 @@ projects
2230
2230
 
2231
2231
  projects
2232
2232
  .command(`update-team`)
2233
- .description(``)
2233
+ .description(`Update the team ID of a project allowing for it to be transferred to another team.`)
2234
2234
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2235
2235
  .requiredOption(`--team-id <team-id>`, `Team ID of the team to transfer project to.`)
2236
2236
  .action(actionRunner(projectsUpdateTeam))
2237
2237
 
2238
2238
  projects
2239
2239
  .command(`get-email-template`)
2240
- .description(``)
2240
+ .description(`Get a custom email template for the specified locale and type. This endpoint returns the template content, subject, and other configuration details. `)
2241
2241
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2242
2242
  .requiredOption(`--type <type>`, `Template type`)
2243
2243
  .requiredOption(`--locale <locale>`, `Template locale`)
@@ -2245,7 +2245,7 @@ projects
2245
2245
 
2246
2246
  projects
2247
2247
  .command(`update-email-template`)
2248
- .description(``)
2248
+ .description(`Update a custom email template for the specified locale and type. Use this endpoint to modify the content of your email templates.`)
2249
2249
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2250
2250
  .requiredOption(`--type <type>`, `Template type`)
2251
2251
  .requiredOption(`--locale <locale>`, `Template locale`)
@@ -2258,7 +2258,7 @@ projects
2258
2258
 
2259
2259
  projects
2260
2260
  .command(`delete-email-template`)
2261
- .description(``)
2261
+ .description(`Reset a custom email template to its default value. This endpoint removes any custom content and restores the template to its original state. `)
2262
2262
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2263
2263
  .requiredOption(`--type <type>`, `Template type`)
2264
2264
  .requiredOption(`--locale <locale>`, `Template locale`)
@@ -2266,7 +2266,7 @@ projects
2266
2266
 
2267
2267
  projects
2268
2268
  .command(`get-sms-template`)
2269
- .description(``)
2269
+ .description(`Get a custom SMS template for the specified locale and type returning it's contents.`)
2270
2270
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2271
2271
  .requiredOption(`--type <type>`, `Template type`)
2272
2272
  .requiredOption(`--locale <locale>`, `Template locale`)
@@ -2274,7 +2274,7 @@ projects
2274
2274
 
2275
2275
  projects
2276
2276
  .command(`update-sms-template`)
2277
- .description(``)
2277
+ .description(`Update a custom SMS template for the specified locale and type. Use this endpoint to modify the content of your SMS templates. `)
2278
2278
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2279
2279
  .requiredOption(`--type <type>`, `Template type`)
2280
2280
  .requiredOption(`--locale <locale>`, `Template locale`)
@@ -2283,7 +2283,7 @@ projects
2283
2283
 
2284
2284
  projects
2285
2285
  .command(`delete-sms-template`)
2286
- .description(``)
2286
+ .description(`Reset a custom SMS template to its default value. This endpoint removes any custom message and restores the template to its original state. `)
2287
2287
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2288
2288
  .requiredOption(`--type <type>`, `Template type`)
2289
2289
  .requiredOption(`--locale <locale>`, `Template locale`)
@@ -2291,14 +2291,14 @@ projects
2291
2291
 
2292
2292
  projects
2293
2293
  .command(`list-webhooks`)
2294
- .description(``)
2294
+ .description(`Get a list of all webhooks belonging to the project. You can use the query params to filter your results. `)
2295
2295
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2296
2296
  .option(`--console`, `Get the resource console url`)
2297
2297
  .action(actionRunner(projectsListWebhooks))
2298
2298
 
2299
2299
  projects
2300
2300
  .command(`create-webhook`)
2301
- .description(``)
2301
+ .description(`Create a new webhook. Use this endpoint to configure a URL that will receive events from Appwrite when specific events occur. `)
2302
2302
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2303
2303
  .requiredOption(`--name <name>`, `Webhook name. Max length: 128 chars.`)
2304
2304
  .requiredOption(`--events [events...]`, `Events list. Maximum of 100 events are allowed.`)
@@ -2311,7 +2311,7 @@ projects
2311
2311
 
2312
2312
  projects
2313
2313
  .command(`get-webhook`)
2314
- .description(``)
2314
+ .description(`Get a webhook by its unique ID. This endpoint returns details about a specific webhook configured for a project. `)
2315
2315
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2316
2316
  .requiredOption(`--webhook-id <webhook-id>`, `Webhook unique ID.`)
2317
2317
  .option(`--console`, `Get the resource console url`)
@@ -2319,7 +2319,7 @@ projects
2319
2319
 
2320
2320
  projects
2321
2321
  .command(`update-webhook`)
2322
- .description(``)
2322
+ .description(`Update a webhook by its unique ID. Use this endpoint to update the URL, events, or status of an existing webhook. `)
2323
2323
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2324
2324
  .requiredOption(`--webhook-id <webhook-id>`, `Webhook unique ID.`)
2325
2325
  .requiredOption(`--name <name>`, `Webhook name. Max length: 128 chars.`)
@@ -2333,14 +2333,14 @@ projects
2333
2333
 
2334
2334
  projects
2335
2335
  .command(`delete-webhook`)
2336
- .description(``)
2336
+ .description(`Delete a webhook by its unique ID. Once deleted, the webhook will no longer receive project events. `)
2337
2337
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2338
2338
  .requiredOption(`--webhook-id <webhook-id>`, `Webhook unique ID.`)
2339
2339
  .action(actionRunner(projectsDeleteWebhook))
2340
2340
 
2341
2341
  projects
2342
2342
  .command(`update-webhook-signature`)
2343
- .description(``)
2343
+ .description(`Update the webhook signature key. This endpoint can be used to regenerate the signature key used to sign and validate payload deliveries for a specific webhook. `)
2344
2344
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2345
2345
  .requiredOption(`--webhook-id <webhook-id>`, `Webhook unique ID.`)
2346
2346
  .action(actionRunner(projectsUpdateWebhookSignature))
@@ -241,7 +241,7 @@ proxy
241
241
 
242
242
  proxy
243
243
  .command(`update-rule-verification`)
244
- .description(``)
244
+ .description(`Retry getting verification process of a proxy rule. This endpoint triggers domain verification by checking DNS records (CNAME) against the configured target domain. If verification is successful, a TLS certificate will be automatically provisioned for the domain.`)
245
245
  .requiredOption(`--rule-id <rule-id>`, `Rule ID.`)
246
246
  .action(actionRunner(proxyUpdateRuleVerification))
247
247
 
@@ -450,12 +450,12 @@ const getObjectChanges = (remote, local, index, what) => {
450
450
  return changes;
451
451
  }
452
452
 
453
- const createAttribute = async (databaseId, collectionId, attribute) => {
453
+ const createAttribute = (databaseId, collectionId, attribute) => {
454
454
  switch (attribute.type) {
455
455
  case 'string':
456
456
  switch (attribute.format) {
457
457
  case 'email':
458
- return await databasesCreateEmailAttribute({
458
+ return databasesCreateEmailAttribute({
459
459
  databaseId,
460
460
  collectionId,
461
461
  key: attribute.key,
@@ -465,7 +465,7 @@ const createAttribute = async (databaseId, collectionId, attribute) => {
465
465
  parseOutput: false
466
466
  })
467
467
  case 'url':
468
- return await databasesCreateUrlAttribute({
468
+ return databasesCreateUrlAttribute({
469
469
  databaseId,
470
470
  collectionId,
471
471
  key: attribute.key,
@@ -475,7 +475,7 @@ const createAttribute = async (databaseId, collectionId, attribute) => {
475
475
  parseOutput: false
476
476
  })
477
477
  case 'ip':
478
- return await databasesCreateIpAttribute({
478
+ return databasesCreateIpAttribute({
479
479
  databaseId,
480
480
  collectionId,
481
481
  key: attribute.key,
@@ -485,7 +485,7 @@ const createAttribute = async (databaseId, collectionId, attribute) => {
485
485
  parseOutput: false
486
486
  })
487
487
  case 'enum':
488
- return await databasesCreateEnumAttribute({
488
+ return databasesCreateEnumAttribute({
489
489
  databaseId,
490
490
  collectionId,
491
491
  key: attribute.key,
@@ -496,7 +496,7 @@ const createAttribute = async (databaseId, collectionId, attribute) => {
496
496
  parseOutput: false
497
497
  })
498
498
  default:
499
- return await databasesCreateStringAttribute({
499
+ return databasesCreateStringAttribute({
500
500
  databaseId,
501
501
  collectionId,
502
502
  key: attribute.key,
@@ -509,7 +509,7 @@ const createAttribute = async (databaseId, collectionId, attribute) => {
509
509
 
510
510
  }
511
511
  case 'integer':
512
- return await databasesCreateIntegerAttribute({
512
+ return databasesCreateIntegerAttribute({
513
513
  databaseId,
514
514
  collectionId,
515
515
  key: attribute.key,
@@ -567,12 +567,12 @@ const createAttribute = async (databaseId, collectionId, attribute) => {
567
567
  }
568
568
  }
569
569
 
570
- const updateAttribute = async (databaseId, collectionId, attribute) => {
570
+ const updateAttribute = (databaseId, collectionId, attribute) => {
571
571
  switch (attribute.type) {
572
572
  case 'string':
573
573
  switch (attribute.format) {
574
574
  case 'email':
575
- return await databasesUpdateEmailAttribute({
575
+ return databasesUpdateEmailAttribute({
576
576
  databaseId,
577
577
  collectionId,
578
578
  key: attribute.key,
@@ -582,7 +582,7 @@ const updateAttribute = async (databaseId, collectionId, attribute) => {
582
582
  parseOutput: false
583
583
  })
584
584
  case 'url':
585
- return await databasesUpdateUrlAttribute({
585
+ return databasesUpdateUrlAttribute({
586
586
  databaseId,
587
587
  collectionId,
588
588
  key: attribute.key,
@@ -592,7 +592,7 @@ const updateAttribute = async (databaseId, collectionId, attribute) => {
592
592
  parseOutput: false
593
593
  })
594
594
  case 'ip':
595
- return await databasesUpdateIpAttribute({
595
+ return databasesUpdateIpAttribute({
596
596
  databaseId,
597
597
  collectionId,
598
598
  key: attribute.key,
@@ -602,7 +602,7 @@ const updateAttribute = async (databaseId, collectionId, attribute) => {
602
602
  parseOutput: false
603
603
  })
604
604
  case 'enum':
605
- return await databasesUpdateEnumAttribute({
605
+ return databasesUpdateEnumAttribute({
606
606
  databaseId,
607
607
  collectionId,
608
608
  key: attribute.key,
@@ -613,7 +613,7 @@ const updateAttribute = async (databaseId, collectionId, attribute) => {
613
613
  parseOutput: false
614
614
  })
615
615
  default:
616
- return await databasesUpdateStringAttribute({
616
+ return databasesUpdateStringAttribute({
617
617
  databaseId,
618
618
  collectionId,
619
619
  key: attribute.key,
@@ -626,7 +626,7 @@ const updateAttribute = async (databaseId, collectionId, attribute) => {
626
626
 
627
627
  }
628
628
  case 'integer':
629
- return await databasesUpdateIntegerAttribute({
629
+ return databasesUpdateIntegerAttribute({
630
630
  databaseId,
631
631
  collectionId,
632
632
  key: attribute.key,
@@ -882,7 +882,7 @@ const createAttributes = async (attributes, collection) => {
882
882
  const result = await awaitPools.expectAttributes(
883
883
  collection['databaseId'],
884
884
  collection['$id'],
885
- collection.attributes.map(attribute => attribute.key)
885
+ collection.attributes.filter(attribute => attribute.side !== 'child').map(attribute => attribute.key)
886
886
  );
887
887
 
888
888
  if (!result) {
@@ -952,13 +952,13 @@ storage
952
952
 
953
953
  storage
954
954
  .command(`get-usage`)
955
- .description(``)
955
+ .description(`Get usage metrics and statistics for all buckets in the project. You can view the total number of buckets, files, storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days. `)
956
956
  .option(`--range <range>`, `Date range.`)
957
957
  .action(actionRunner(storageGetUsage))
958
958
 
959
959
  storage
960
960
  .command(`get-bucket-usage`)
961
- .description(``)
961
+ .description(`Get usage metrics and statistics a specific bucket in the project. You can view the total number of files, storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days. `)
962
962
  .requiredOption(`--bucket-id <bucket-id>`, `Bucket ID.`)
963
963
  .option(`--range <range>`, `Date range.`)
964
964
  .option(`--console`, `Get the resource console url`)
@@ -1768,7 +1768,7 @@ users
1768
1768
 
1769
1769
  users
1770
1770
  .command(`get-usage`)
1771
- .description(``)
1771
+ .description(`Get usage metrics and statistics for all users in the project. You can view the total number of users and sessions. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days. `)
1772
1772
  .option(`--range <range>`, `Date range.`)
1773
1773
  .action(actionRunner(usersGetUsage))
1774
1774
 
@@ -387,14 +387,14 @@ const vcsDeleteInstallation = async ({installationId,parseOutput = true, overrid
387
387
 
388
388
  vcs
389
389
  .command(`list-repositories`)
390
- .description(``)
390
+ .description(`Get a list of GitHub repositories available through your installation. This endpoint returns repositories with their basic information, detected runtime environments, and latest push dates. You can optionally filter repositories using a search term. Each repository's runtime is automatically detected based on its contents and language statistics. The GitHub installation must be properly configured for this endpoint to work.`)
391
391
  .requiredOption(`--installation-id <installation-id>`, `Installation Id`)
392
392
  .option(`--search <search>`, `Search term to filter your list results. Max length: 256 chars.`)
393
393
  .action(actionRunner(vcsListRepositories))
394
394
 
395
395
  vcs
396
396
  .command(`create-repository`)
397
- .description(``)
397
+ .description(`Create a new GitHub repository through your installation. This endpoint allows you to create either a public or private repository by specifying a name and visibility setting. The repository will be created under your GitHub user account or organization, depending on your installation type. The GitHub installation must be properly configured and have the necessary permissions for repository creation.`)
398
398
  .requiredOption(`--installation-id <installation-id>`, `Installation Id`)
399
399
  .requiredOption(`--name <name>`, `Repository name (slug)`)
400
400
  .requiredOption(`--xprivate <xprivate>`, `Mark repository public or private`, parseBool)
@@ -402,21 +402,21 @@ vcs
402
402
 
403
403
  vcs
404
404
  .command(`get-repository`)
405
- .description(``)
405
+ .description(`Get detailed information about a specific GitHub repository from your installation. This endpoint returns repository details including its ID, name, visibility status, organization, and latest push date. The GitHub installation must be properly configured and have access to the requested repository for this endpoint to work.`)
406
406
  .requiredOption(`--installation-id <installation-id>`, `Installation Id`)
407
407
  .requiredOption(`--provider-repository-id <provider-repository-id>`, `Repository Id`)
408
408
  .action(actionRunner(vcsGetRepository))
409
409
 
410
410
  vcs
411
411
  .command(`list-repository-branches`)
412
- .description(``)
412
+ .description(`Get a list of all branches from a GitHub repository in your installation. This endpoint returns the names of all branches in the repository and their total count. The GitHub installation must be properly configured and have access to the requested repository for this endpoint to work. `)
413
413
  .requiredOption(`--installation-id <installation-id>`, `Installation Id`)
414
414
  .requiredOption(`--provider-repository-id <provider-repository-id>`, `Repository Id`)
415
415
  .action(actionRunner(vcsListRepositoryBranches))
416
416
 
417
417
  vcs
418
418
  .command(`get-repository-contents`)
419
- .description(``)
419
+ .description(`Get a list of files and directories from a GitHub repository connected to your project. This endpoint returns the contents of a specified repository path, including file names, sizes, and whether each item is a file or directory. The GitHub installation must be properly configured and the repository must be accessible through your installation for this endpoint to work. `)
420
420
  .requiredOption(`--installation-id <installation-id>`, `Installation Id`)
421
421
  .requiredOption(`--provider-repository-id <provider-repository-id>`, `Repository Id`)
422
422
  .option(`--provider-root-directory <provider-root-directory>`, `Path to get contents of nested directory`)
@@ -424,7 +424,7 @@ vcs
424
424
 
425
425
  vcs
426
426
  .command(`create-repository-detection`)
427
- .description(``)
427
+ .description(`Analyze a GitHub repository to automatically detect the programming language and runtime environment. This endpoint scans the repository's files and language statistics to determine the appropriate runtime settings for your function. The GitHub installation must be properly configured and the repository must be accessible through your installation for this endpoint to work.`)
428
428
  .requiredOption(`--installation-id <installation-id>`, `Installation Id`)
429
429
  .requiredOption(`--provider-repository-id <provider-repository-id>`, `Repository Id`)
430
430
  .option(`--provider-root-directory <provider-root-directory>`, `Path to Root Directory`)
@@ -432,7 +432,7 @@ vcs
432
432
 
433
433
  vcs
434
434
  .command(`update-external-deployments`)
435
- .description(``)
435
+ .description(`Authorize and create deployments for a GitHub pull request in your project. This endpoint allows external contributions by creating deployments from pull requests, enabling preview environments for code review. The pull request must be open and not previously authorized. The GitHub installation must be properly configured and have access to both the repository and pull request for this endpoint to work.`)
436
436
  .requiredOption(`--installation-id <installation-id>`, `Installation Id`)
437
437
  .requiredOption(`--repository-id <repository-id>`, `VCS Repository Id`)
438
438
  .requiredOption(`--provider-pull-request-id <provider-pull-request-id>`, `GitHub Pull Request Id`)
@@ -440,20 +440,20 @@ vcs
440
440
 
441
441
  vcs
442
442
  .command(`list-installations`)
443
- .description(``)
443
+ .description(`List all VCS installations configured for the current project. This endpoint returns a list of installations including their provider, organization, and other configuration details. `)
444
444
  .option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: provider, organization`)
445
445
  .option(`--search <search>`, `Search term to filter your list results. Max length: 256 chars.`)
446
446
  .action(actionRunner(vcsListInstallations))
447
447
 
448
448
  vcs
449
449
  .command(`get-installation`)
450
- .description(``)
450
+ .description(`Get a VCS installation by its unique ID. This endpoint returns the installation's details including its provider, organization, and configuration. `)
451
451
  .requiredOption(`--installation-id <installation-id>`, `Installation Id`)
452
452
  .action(actionRunner(vcsGetInstallation))
453
453
 
454
454
  vcs
455
455
  .command(`delete-installation`)
456
- .description(``)
456
+ .description(`Delete a VCS installation by its unique ID. This endpoint removes the installation and all its associated repositories from the project.`)
457
457
  .requiredOption(`--installation-id <installation-id>`, `Installation Id`)
458
458
  .action(actionRunner(vcsDeleteInstallation))
459
459
 
package/lib/parser.js CHANGED
@@ -120,7 +120,7 @@ const parseError = (err) => {
120
120
  } catch {
121
121
  }
122
122
 
123
- const version = '6.2.0';
123
+ const version = '6.2.2';
124
124
  const stepsToReproduce = `Running \`appwrite ${cliConfig.reportData.data.args.join(' ')}\``;
125
125
  const yourEnvironment = `CLI version: ${version}\nOperation System: ${os.type()}\nAppwrite version: ${appwriteVersion}\nIs Cloud: ${isCloud}`;
126
126
 
package/lib/questions.js CHANGED
@@ -2,6 +2,7 @@ const chalk = require("chalk");
2
2
  const Client = require("./client");
3
3
  const { localConfig, globalConfig } = require('./config');
4
4
  const { projectsList } = require('./commands/projects');
5
+ const { organizationsList } = require('./commands/organizations');
5
6
  const { teamsList } = require('./commands/teams');
6
7
  const { functionsListRuntimes, functionsListSpecifications, functionsList } = require('./commands/functions');
7
8
  const { accountListMfaFactors } = require("./commands/account");
@@ -152,7 +153,10 @@ const questionsInitProject = [
152
153
  message: "Choose your organization",
153
154
  choices: async () => {
154
155
  let client = await sdkForConsole(true);
155
- const { teams } = await paginate(teamsList, { parseOutput: false, sdk: client }, 100, 'teams');
156
+ const hostname = new URL(client.endpoint).hostname;
157
+ const { teams } = hostname.endsWith('appwrite.io')
158
+ ? await paginate(organizationsList, { parseOutput: false, sdk: client }, 100, 'teams')
159
+ : await paginate(teamsList, { parseOutput: false, sdk: client }, 100, 'teams');
156
160
 
157
161
  let choices = teams.map((team, idx) => {
158
162
  return {
package/lib/utils.js CHANGED
@@ -89,6 +89,9 @@ function showConsoleLink(serviceName, action, ...ids) {
89
89
  case "teams":
90
90
  url.pathname += getTeamsPath(action, ids);
91
91
  break;
92
+ case "organizations":
93
+ url.pathname += getOrganizationsPath(action, ids);
94
+ break;
92
95
  case "users":
93
96
  url.pathname += getUsersPath(action, ids);
94
97
  break;
@@ -241,6 +244,16 @@ function getTeamsPath(action, ids) {
241
244
  return path;
242
245
  }
243
246
 
247
+ function getOrganizationsPath(action, ids) {
248
+ let path = `/organization-${ids[0]}`;
249
+
250
+ if (action === 'list') {
251
+ path = '/account/organizations';
252
+ }
253
+
254
+ return path;
255
+ }
256
+
244
257
  function getUsersPath(action, ids) {
245
258
  let path = '/auth';
246
259
 
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "appwrite-cli",
3
3
  "homepage": "https://appwrite.io/support",
4
4
  "description": "Appwrite is an open-source self-hosted backend server that abstract and simplify complex and repetitive development tasks behind a very simple REST API",
5
- "version": "6.2.0",
5
+ "version": "6.2.2",
6
6
  "license": "BSD-3-Clause",
7
7
  "main": "index.js",
8
8
  "bin": {
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "$schema": "https://raw.githubusercontent.com/ScoopInstaller/Scoop/master/schema.json",
3
- "version": "6.2.0",
3
+ "version": "6.2.2",
4
4
  "description": "The Appwrite CLI is a command-line application that allows you to interact with Appwrite and perform server-side tasks using your terminal.",
5
5
  "homepage": "https://github.com/appwrite/sdk-for-cli",
6
6
  "license": "BSD-3-Clause",
7
7
  "architecture": {
8
8
  "64bit": {
9
- "url": "https://github.com/appwrite/sdk-for-cli/releases/download/6.2.0/appwrite-cli-win-x64.exe",
9
+ "url": "https://github.com/appwrite/sdk-for-cli/releases/download/6.2.2/appwrite-cli-win-x64.exe",
10
10
  "bin": [
11
11
  [
12
12
  "appwrite-cli-win-x64.exe",
@@ -15,7 +15,7 @@
15
15
  ]
16
16
  },
17
17
  "arm64": {
18
- "url": "https://github.com/appwrite/sdk-for-cli/releases/download/6.2.0/appwrite-cli-win-arm64.exe",
18
+ "url": "https://github.com/appwrite/sdk-for-cli/releases/download/6.2.2/appwrite-cli-win-arm64.exe",
19
19
  "bin": [
20
20
  [
21
21
  "appwrite-cli-win-arm64.exe",