From 581e850e281a064e1b2b51c016ceb07e6f255939 Mon Sep 17 00:00:00 2001 From: choir27 Date: Mon, 24 Jun 2024 10:29:43 -0400 Subject: [PATCH 01/66] docs: document all appwrite command-line commands and params --- .../command-line/commands/+page.markdoc | 47 +++++++++++++++++-- 1 file changed, 43 insertions(+), 4 deletions(-) diff --git a/src/routes/docs/tooling/command-line/commands/+page.markdoc b/src/routes/docs/tooling/command-line/commands/+page.markdoc index 2e19a00c64..8075c35a6b 100644 --- a/src/routes/docs/tooling/command-line/commands/+page.markdoc +++ b/src/routes/docs/tooling/command-line/commands/+page.markdoc @@ -20,16 +20,16 @@ Below is a list of the available commands in the Appwrite CLI. You can get more * Command * Description --- -* `login` +* `login [options]` * The login command allows you to authenticate into the CLI. This command expects the console account that you use to log into the Appwrite Console. --- -* `client` +* `client [options]` * The client command allows you to configure your CLI. --- -* `init` +* `init [options]` * The init command helps you initialize your Appwrite project, databases, collections, functions, teams, and buckets. --- -* `deploy` +* `deploy | push` * The deploy command provides a convenient wrapper for deploying your databases, collections, functions, teams, and buckets. --- * `logout` @@ -62,6 +62,45 @@ Below is a list of the available commands in the Appwrite CLI. You can get more * `locale` * The locale command allows you to customize your app based on your users' location. --- +* `assistant` +* The assistant command allows you to interact with the Appwrite Assistant AI. +--- +* `console` +* The console command gives you access to the APIs used by the Appwrite console. +--- +* `graphql` +* The graphql command allows you to query and mutate any resource type on your Appwrite server. +--- +* `health` +* The health command allows you to both validate and monitor your Appwrite server's health. +--- +* `messaging` +* The messaging command allows you to send messages. +--- +* `migrations` +* The migrations command allows you to migrate data between services. +--- +* `project` +* The project command is for overall project administration. +--- +* `proxy` +* The proxy command allows you to configure behavior for your attached domains. +--- +* `pull` +* The pull command helps you pull your Appwrite project, functions, collections, buckets, teams, and messaging +--- +* `register` +* Prints link to register an Appwrite account. +--- +* `run | dev` +* The run command allows you to run projects locally to allow easy development and quick debugging +--- +* `vcs` +* The vcs command allows you to interact with VCS providers and manage your code repositories. +--- +* `whoami` +* The whomai command gives information about the currently logged in user. +--- {% /table %} From 1f7002f1dac73d199972d3ad588b709f57f83bd2 Mon Sep 17 00:00:00 2001 From: choir27 Date: Mon, 24 Jun 2024 11:43:31 -0400 Subject: [PATCH 02/66] docs: add reminder for correct CLI version and link --- .../docs/tooling/command-line/installation/+page.markdoc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/routes/docs/tooling/command-line/installation/+page.markdoc b/src/routes/docs/tooling/command-line/installation/+page.markdoc index c467c83153..92232c1029 100644 --- a/src/routes/docs/tooling/command-line/installation/+page.markdoc +++ b/src/routes/docs/tooling/command-line/installation/+page.markdoc @@ -84,6 +84,9 @@ appwrite client --selfSigned true ``` {% /info %} +{% info title="Correct CLI Version Required" %} +All commands only work with **version 2.0** of the CLI. Install [here](https://www.npmjs.com/package/appwrite-cli-beta). +{% /info %} ## Next steps {% #next-steps %} From f2fbc789e226f953d93992ec9e12a5a5bcd1edfa Mon Sep 17 00:00:00 2001 From: choir27 Date: Mon, 24 Jun 2024 15:34:44 -0400 Subject: [PATCH 03/66] docs: add deploy collections with overview, init, pull, push and commands to CLI commands category --- appwrite.json | 3 + .../docs/tooling/command-line/+layout.svelte | 9 + .../command-line/collections/+page.markdoc | 246 +++++++++++++++ .../command-line/databases/+page.markdoc | 281 ++++++++++++++++++ .../non-interactive/+page.markdoc | 4 + 5 files changed, 543 insertions(+) create mode 100644 appwrite.json create mode 100644 src/routes/docs/tooling/command-line/collections/+page.markdoc create mode 100644 src/routes/docs/tooling/command-line/databases/+page.markdoc diff --git a/appwrite.json b/appwrite.json new file mode 100644 index 0000000000..05679c97de --- /dev/null +++ b/appwrite.json @@ -0,0 +1,3 @@ +{ + "projectId": "6679b067d22e72b9731a" +} \ No newline at end of file diff --git a/src/routes/docs/tooling/command-line/+layout.svelte b/src/routes/docs/tooling/command-line/+layout.svelte index 08bfe1e3c3..f5af786051 100644 --- a/src/routes/docs/tooling/command-line/+layout.svelte +++ b/src/routes/docs/tooling/command-line/+layout.svelte @@ -28,6 +28,15 @@ href: '/docs/tooling/command-line/non-interactive' } ] + }, + { + label: 'Deployments', + items: [ + { + label: 'Collections', + href: '/docs/tooling/command-line/collections' + } + ] } ]; diff --git a/src/routes/docs/tooling/command-line/collections/+page.markdoc b/src/routes/docs/tooling/command-line/collections/+page.markdoc new file mode 100644 index 0000000000..47b7fa322d --- /dev/null +++ b/src/routes/docs/tooling/command-line/collections/+page.markdoc @@ -0,0 +1,246 @@ +--- +layout: article +title: Deploy collections +description: Efficiently deploy your Appwrite collection using the Command-Line Tool (CLI). +--- + +# Login {% #login %} + +Use the CLI command to login to your Appwrite account. + +``` +appwrite login +``` + +# Create project {% #create-project %} + +Create a project and follow the given prompts. + +``` +appwrite init +? How would you like to start? Create a new Appwrite project +? Choose the project organization 25912221200392927 +? What would you like to name your project? My Awesome Project +? What ID would you like to have for your project? unique() +✓ Success +``` + +# Create database {% #create-database %} + +Create an Appwrite database by running this command in the folder holding your `appwrite.json` file. + +``` +appwrite databases create --databaseId "unique()" --name "genre" +``` + +# Create collection {% #create-collection %} + +Using this command in the folder holding your `appwrite.json` file, you can create an Appwrite collection inside your database. + +``` +appwrite databases createCollection --databaseId "25912221200392927" --collectionId "unique()" --name "genre" +``` + +# Pull collection {% #pull-collection %} + +You can pull your Appwrite collection's and database's customizable settings into your local folder in the folder holding your `appwrite.json` file. + +``` +? From which database would you like to pull collections? songs (64ascaq2edswwc0) +ℹ Info Found 1 collections +ℹ Info Fetching songs ... +✓ Success +``` + +# Push collection {% #pull-collection %} + +To push your collection changes in your `appwrite.json` file, use the `push` command in the folder holding your `appwrite.json` file. + +``` +appwrite push +? Which resources would you like to push? Collections +? Which collections would you like to push? music (25912239163242502 - 25912239163242502) +ℹ Info Checking for databases and collection changes +✓ Success Updated music ( 259122391632425028 ) name +ℹ Info No changes has been detected. Skipping music ( 259122391632425028 ) +``` + +# Appwrite.json {% #Appwritejson %} + +An example of what your `appwrite.json` file should look like. + +```server-nodejs +{ + "projectId": "25912221200392927, + "databases": [ + { + "$id": "5e5ea5c16897e", + "name": "songs", + "$createdAt": "2023-07-01T18:35:27.802+00:00", + "$updatedAt": "2023-08-01T21:41:41.663+00:00", + "enabled": true + } + ], + "collections": [ + { + "$id": "25912239163242502", + "$permissions": [ + "create(\"any\")", + "read(\"any\")", + "update(\"any\")", + "delete(\"any\")" + ], + "databaseId": "2591258431319902", + "name": "songs", + "enabled": true, + "documentSecurity": true, + "attributes": [ + { + "key": "name", + "type": "string", + "status": "available", + "error": "", + "required": false, + "array": false, + "size": 100, + "default": null + }, + { + "key": "audio", + "type": "string", + "status": "available", + "error": "", + "required": false, + "array": false, + "size": 200, + "default": null + }, + { + "key": "artist", + "type": "string", + "status": "available", + "error": "", + "required": false, + "array": false, + "size": 500, + "default": null + } + ], + "indexes": [] + } + ] +} +``` + +```sh +appwrite databases [COMMAND] [OPTIONS] +``` + +# List {% #list %} + +The databases command allows you to create structured collections of documents, query and filter lists of documents. + +{% table %} +* Command +* Description +--- +* `listCollections [options]` +* Get a list of all collections that belong to the provided databaseId. You can use the search parameter to filter your results. +--- +* `createCollection [options]` +* Create a new Collection. Before using this route, you should create a new database resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection) API or directly from your database console. +--- +* `getCollection [options]` +* Get a collection by its unique ID. This endpoint response returns a JSON object with the collection metadata. +--- +* `updateCollection [options]` +* Update a collection by its unique ID. +--- +* `deleteCollection [options]` +* Delete a collection by its unique ID. Only users with write permissions have access to delete this resource. +--- +* `listAttributes [options]` +* List attributes in the collection. +--- +* `createBooleanAttribute [options]` +* Create a boolean attribute. +--- +* `updateBooleanAttribute [options]` +* Update a boolean attribute. Changing the 'default' value will not update already existing documents. +--- +* `createDatetimeAttribute [options]` +* Create a date time attribute according to the ISO 8601 standard. +--- +* `updateDatetimeAttribute [options]` +* Update a date time attribute. Changing the 'default' value will not update already existing documents. +--- +* `createEmailAttribute [options]` +* Create an email attribute. +--- +* `updateEmailAttribute [options]` +* Update an email attribute. Changing the 'default' value will not update already existing documents. +--- +* `createEnumAttribute [options]` +* Create an enumeration attribute. The 'elements' param acts as a white-list of accepted values for this attribute. +--- +* `updateEnumAttribute [options]` +* Update an enum attribute. Changing the 'default' value will not update already existing documents. +--- +* `createFloatAttribute [options]` +* Create a float attribute. Optionally, minimum and maximum values can be provided. +--- +* `updateFloatAttribute [options]` +* Update a float attribute. Changing the 'default' value will not update already existing documents. +--- +* `createIntegerAttribute [options]` +* Create an integer attribute. Optionally, minimum and maximum values can be provided. +--- +* `updateIntegerAttribute [options]` +* Update an integer attribute. Changing the 'default' value will not update already existing documents. +--- +* `createIpAttribute [options]` +* Create IP address attribute. +--- +* `updateIpAttribute [options]` +* Update an ip attribute. Changing the 'default' value will not update already existing documents. +--- +* `createRelationshipAttribute [options]` +* Create relationship attribute. [Learn more about relationship attributes](https://appwrite.io/docs/databases-relationships#relationship-attributes). +--- +* `createStringAttribute [options]` +* Create a string attribute. +--- +* `updateStringAttribute [options]` +* Update a string attribute. Changing the 'default' value will not update already existing documents. +--- +* `createUrlAttribute [options]` +* Create a URL attribute. +--- +* `updateUrlAttribute [options]` +* Update an url attribute. Changing the 'default' value will not update already existing documents. +--- +* `getAttribute [options]` +* Get attribute by ID. +--- +* `deleteAttribute [options]` +* Deletes an attribute. +--- +* `updateRelationshipAttribute [options]` +* Update relationship attribute. [Learn more about relationship attributes](https://appwrite.io/docs/databases-relationships#relationship-attributes). +--- +* `listIndexes [options]` +* List indexes in the collection. +--- +* `createIndex [options]` +* Creates an index on the attributes listed. Your index should include all the attributes you will query in a single request. Attributes can be 'key', 'fulltext', and 'unique'. +--- +* `getIndex [options]` +* Get index by ID. +--- +* `deleteIndex [options]` +* Delete an index. +--- +* `listCollectionLogs [options]` +* Get the collection activity logs list by its unique ID. +--- + {% /table %} diff --git a/src/routes/docs/tooling/command-line/databases/+page.markdoc b/src/routes/docs/tooling/command-line/databases/+page.markdoc new file mode 100644 index 0000000000..decced9770 --- /dev/null +++ b/src/routes/docs/tooling/command-line/databases/+page.markdoc @@ -0,0 +1,281 @@ +--- +layout: article +title: Deploy Databases +description: +--- + +// Create project + +``` +appwrite init +? How would you like to start? (Use arrow keys) +> Create a new Appwrite project + Link this directory to an existing Appwrite project +``` + +``` +appwrite init +? How would you like to start? Create a new Appwrite project +? Choose the project organization 25912221200392927 +? What would you like to name your project? My Awesome Project +? What ID would you like to have for your project? unique() +✓ Success +``` + +// Create database + +``` +appwrite databases create --databaseId "unique()" --name "genre" +``` + +// pull database +``` +appwrite pull collection +? From which database would you like to pull collections? (Press to select, +to toggle all, to invert selection, and to proceed) +>( ) songs (6sadfvasdva2323bc0) + ( ) playlists (12escvqw2120ffd1) +``` + +``` +? From which database would you like to pull collections? songs (64ascaq2edswwc0) +ℹ Info Found 1 collections +ℹ Info Fetching songs ... +✓ Success +``` + +// appwrite.json +```server-nodejs +{ + "projectId": "25912221200392927, + "databases": [ + { + "$id": "5e5ea5c16897e", + "name": "songs", + "$createdAt": "2023-07-01T18:35:27.802+00:00", + "$updatedAt": "2023-08-01T21:41:41.663+00:00", + "enabled": true + } + ], + "collections": [ + { + "$id": "25912239163242502", + "$permissions": [ + "create(\"any\")", + "read(\"any\")", + "update(\"any\")", + "delete(\"any\")" + ], + "databaseId": "2591258431319902", + "name": "songs", + "enabled": true, + "documentSecurity": true, + "attributes": [ + { + "key": "name", + "type": "string", + "status": "available", + "error": "", + "required": false, + "array": false, + "size": 100, + "default": null + }, + { + "key": "audio", + "type": "string", + "status": "available", + "error": "", + "required": false, + "array": false, + "size": 200, + "default": null + }, + { + "key": "genre", + "type": "string", + "status": "available", + "error": "", + "required": false, + "array": false, + "size": 500, + "default": null + }, + { + "key": "artist", + "type": "string", + "status": "available", + "error": "", + "required": false, + "array": false, + "size": 500, + "default": null + } + ], + "indexes": [] + } + ] +} +``` + +``` +appwrite push +? Which resources would you like to push? Collections +? Which collections would you like to push? music (25912239163242502 - 25912239163242502) +ℹ Info Checking for databases and collection changes +✓ Success Updated music ( 259122391632425028 ) name +ℹ Info No changes has been detected. Skipping music ( 259122391632425028 ) +``` + +appwrite databases +Usage: index databases [options] [command] + +The databases command allows you to create structured collections of documents, query and filter lists of documents. + +# List {% #list %} + +Below is a list of the available commands in the Appwrite CLI. You can get more information on each command by running `appwrite [COMMAND] --help`. + +{% table %} +* Command +* Description +--- +* list [options] +* Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results. +--- +* create [options] +* Create a new Database. +--- +* getUsage [options] | get [options] +* Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata. +--- +* update [options] +* Update a database by its unique ID. +--- +* delete [options] +* Delete a database by its unique ID. Only API keys with databases.write scope can delete a database. +--- +* listCollections [options] +* Get a list of all collections that belong to the provided databaseId. You can use the search parameter to filter your results. +--- +* createCollection [options] +* Create a new Collection. Before using this route, you should create a new database resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection) API or directly from your database console. +--- +* getCollection [options] +* Get a collection by its unique ID. This endpoint response returns a JSON object with the collection metadata. +--- +* updateCollection [options] +* Update a collection by its unique ID. +--- +* deleteCollection [options] +* Delete a collection by its unique ID. Only users with write permissions have access to delete this resource. +--- +* listAttributes [options] +* List attributes in the collection. +--- +* createBooleanAttribute [options] +* Create a boolean attribute. +--- +* updateBooleanAttribute [options] +* Update a boolean attribute. Changing the 'default' value will not update already existing documents. +--- +* createDatetimeAttribute [options] +* Create a date time attribute according to the ISO 8601 standard. +--- +* updateDatetimeAttribute [options] +* Update a date time attribute. Changing the 'default' value will not update already existing documents. +--- +* createEmailAttribute [options] +* Create an email attribute. +--- +* updateEmailAttribute [options] +* Update an email attribute. Changing the 'default' value will not update already existing documents. +--- +* createEnumAttribute [options] +* Create an enumeration attribute. The 'elements' param acts as a white-list of accepted values for this attribute. +--- +* updateEnumAttribute [options] +* Update an enum attribute. Changing the 'default' value will not update already existing documents. +--- +* createFloatAttribute [options] +* Create a float attribute. Optionally, minimum and maximum values can be provided. +--- +* updateFloatAttribute [options] +* Update a float attribute. Changing the 'default' value will not update already existing documents. +--- +* createIntegerAttribute [options] +* Create an integer attribute. Optionally, minimum and maximum values can be provided. +--- +* updateIntegerAttribute [options] +* Update an integer attribute. Changing the 'default' value will not update already existing documents. +--- +* createIpAttribute [options] +* Create IP address attribute. +--- +* updateIpAttribute [options] +* Update an ip attribute. Changing the 'default' value will not update already existing documents. +--- +* createRelationshipAttribute [options] +* Create relationship attribute. [Learn more about relationship attributes](https://appwrite.io/docs/databases-relationships#relationship-attributes). +--- +* createStringAttribute [options] +* Create a string attribute. +--- +* updateStringAttribute [options] +* Update a string attribute. Changing the 'default' value will not update already existing documents. +--- +* createUrlAttribute [options] +* Create a URL attribute. +--- +* updateUrlAttribute [options] +* Update an url attribute. Changing the 'default' value will not update already existing documents. +--- +* getAttribute [options] +* Get attribute by ID. +--- +* deleteAttribute [options] +* Deletes an attribute. +--- +* updateRelationshipAttribute [options] +* Update relationship attribute. [Learn more about relationship attributes](https://appwrite.io/docs/databases-relationships#relationship-attributes). +--- +* listDocuments [options] +* Get a list of all the user's documents in a given collection. You can use the query params to filter your results. +--- +* createDocument [options] +* Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection) API or directly from your database console. +--- +* getDocument [options] +* Get a document by its unique ID. This endpoint response returns a JSON object with the document data. +--- +* updateDocument [options] +* Update a document by its unique ID. Using the patch method you can pass only specific fields that will get updated. +--- +* deleteDocument [options] +* Delete a document by its unique ID. +--- +* listDocumentLogs [options] +* Get the document activity logs list by its unique ID. +--- +* listIndexes [options] +* List indexes in the collection. +--- +* createIndex [options] +* Creates an index on the attributes listed. Your index should include all the attributes you will query in a single request. Attributes can be 'key', 'fulltext', and 'unique'. +--- +* getIndex [options] +* Get index by ID. +--- +* deleteIndex [options] +* Delete an index. +--- +* listCollectionLogs [options] +* Get the collection activity logs list by its unique ID. +--- +* getCollectionUsage [options] | listLogs [options] +* Get the database activity logs list by its unique ID. +--- +* getDatabaseUsage [options] | help [command] +* display help for command +--- + {% /table %} \ No newline at end of file diff --git a/src/routes/docs/tooling/command-line/non-interactive/+page.markdoc b/src/routes/docs/tooling/command-line/non-interactive/+page.markdoc index 93d64d2513..89d9fec794 100644 --- a/src/routes/docs/tooling/command-line/non-interactive/+page.markdoc +++ b/src/routes/docs/tooling/command-line/non-interactive/+page.markdoc @@ -19,6 +19,10 @@ In this mode, the CLI can only interact with one project at a time. # API Keys {% #api-keys %} In non-interactive mode, the CLI uses an API key to authenticate. Your API key must have sufficient permissions to execute the commands you plan to use. [Learn more about API Keys](/docs/advanced/platform/api-keys). +# Github Actions {% #github-actions %} + +gitlab, travis, genkins + # Deployment {% #deployment %} Appwrite's deploy commands can also be executed in a non-interactive mode. This applies to both function and collection deployment. From 4eee25082eadc60cf656a103644ae58b58eca36e Mon Sep 17 00:00:00 2001 From: choir27 Date: Tue, 25 Jun 2024 10:18:22 -0400 Subject: [PATCH 04/66] docs: add overview collection paragraph, update word choice and sentence structure, move database general command syntax structure --- .../command-line/collections/+page.markdoc | 24 ++++++++++--------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/src/routes/docs/tooling/command-line/collections/+page.markdoc b/src/routes/docs/tooling/command-line/collections/+page.markdoc index 47b7fa322d..6bfdb18d99 100644 --- a/src/routes/docs/tooling/command-line/collections/+page.markdoc +++ b/src/routes/docs/tooling/command-line/collections/+page.markdoc @@ -1,12 +1,14 @@ --- layout: article -title: Deploy collections +title: Deploy collections with CLI 2.0 description: Efficiently deploy your Appwrite collection using the Command-Line Tool (CLI). --- +Create and manage your collections using the CLI 2.0 commands. + # Login {% #login %} -Use the CLI command to login to your Appwrite account. +Log in to your Appwrite account using the `login` CLI command. ``` appwrite login @@ -14,7 +16,7 @@ appwrite login # Create project {% #create-project %} -Create a project and follow the given prompts. +Create a project using the `init` command and follow the prompts. ``` appwrite init @@ -27,7 +29,7 @@ appwrite init # Create database {% #create-database %} -Create an Appwrite database by running this command in the folder holding your `appwrite.json` file. +Create an Appwrite database by running the `database` command in the folder holding your `appwrite.json` file. ``` appwrite databases create --databaseId "unique()" --name "genre" @@ -35,7 +37,7 @@ appwrite databases create --databaseId "unique()" --name "genre" # Create collection {% #create-collection %} -Using this command in the folder holding your `appwrite.json` file, you can create an Appwrite collection inside your database. +You can create an Appwrite collection inside your database using the `database createCollection` command in the folder holding your `appwrite.json` file. ``` appwrite databases createCollection --databaseId "25912221200392927" --collectionId "unique()" --name "genre" @@ -43,7 +45,7 @@ appwrite databases createCollection --databaseId "25912221200392927" --collectio # Pull collection {% #pull-collection %} -You can pull your Appwrite collection's and database's customizable settings into your local folder in the folder holding your `appwrite.json` file. +You can pull your Appwrite collection's and database's customizable settings using the `pull` command in the folder holding your `appwrite.json` file. ``` ? From which database would you like to pull collections? songs (64ascaq2edswwc0) @@ -54,7 +56,7 @@ You can pull your Appwrite collection's and database's customizable settings int # Push collection {% #pull-collection %} -To push your collection changes in your `appwrite.json` file, use the `push` command in the folder holding your `appwrite.json` file. +To push the changes you made inside your `appwrite.json` file, use the `push` command in the folder holding your `appwrite.json` file. ``` appwrite push @@ -132,14 +134,14 @@ An example of what your `appwrite.json` file should look like. } ``` +# List {% #list %} + +The databases command allows you to create structured collections of documents, query, and filter lists of documents. Appwrite database CLI commands generally follow the following syntax: + ```sh appwrite databases [COMMAND] [OPTIONS] ``` -# List {% #list %} - -The databases command allows you to create structured collections of documents, query and filter lists of documents. - {% table %} * Command * Description From 5447c058d482d328bd65c9b39aad17121b74c696 Mon Sep 17 00:00:00 2001 From: choir27 Date: Tue, 25 Jun 2024 10:57:09 -0400 Subject: [PATCH 05/66] docs: deploy database using CLI 2.0 with overview, init, login, pull, push and commands --- .../docs/tooling/command-line/+layout.svelte | 4 + .../command-line/collections/+page.markdoc | 11 +- .../command-line/databases/+page.markdoc | 184 ++++-------------- 3 files changed, 47 insertions(+), 152 deletions(-) diff --git a/src/routes/docs/tooling/command-line/+layout.svelte b/src/routes/docs/tooling/command-line/+layout.svelte index f5af786051..9240a63c2b 100644 --- a/src/routes/docs/tooling/command-line/+layout.svelte +++ b/src/routes/docs/tooling/command-line/+layout.svelte @@ -32,6 +32,10 @@ { label: 'Deployments', items: [ + { + label: 'Databases', + href: '/docs/tooling/command-line/databases' + }, { label: 'Collections', href: '/docs/tooling/command-line/collections' diff --git a/src/routes/docs/tooling/command-line/collections/+page.markdoc b/src/routes/docs/tooling/command-line/collections/+page.markdoc index 6bfdb18d99..acc63e1aa9 100644 --- a/src/routes/docs/tooling/command-line/collections/+page.markdoc +++ b/src/routes/docs/tooling/command-line/collections/+page.markdoc @@ -48,10 +48,11 @@ appwrite databases createCollection --databaseId "25912221200392927" --collectio You can pull your Appwrite collection's and database's customizable settings using the `pull` command in the folder holding your `appwrite.json` file. ``` -? From which database would you like to pull collections? songs (64ascaq2edswwc0) -ℹ Info Found 1 collections -ℹ Info Fetching songs ... -✓ Success +appwrite pull collection +? From which database would you like to pull collections? (Press to select, +to toggle all, to invert selection, and to proceed) +>( ) songs (6sadfvasdva2323bc0) + ( ) playlists (12escvqw2120ffd1) ``` # Push collection {% #pull-collection %} @@ -136,7 +137,7 @@ An example of what your `appwrite.json` file should look like. # List {% #list %} -The databases command allows you to create structured collections of documents, query, and filter lists of documents. Appwrite database CLI commands generally follow the following syntax: +The databases command allows you to create structured collections of documents, queries, and filter lists of documents. Appwrite database CLI commands generally follow the following syntax: ```sh appwrite databases [COMMAND] [OPTIONS] diff --git a/src/routes/docs/tooling/command-line/databases/+page.markdoc b/src/routes/docs/tooling/command-line/databases/+page.markdoc index decced9770..da9878af1a 100644 --- a/src/routes/docs/tooling/command-line/databases/+page.markdoc +++ b/src/routes/docs/tooling/command-line/databases/+page.markdoc @@ -1,18 +1,23 @@ --- layout: article -title: Deploy Databases -description: +title: Deploy databases with CLI 2.0 +description: Efficiently deploy your Appwrite database using the Command-Line Tool (CLI). --- -// Create project +Create and manage your databases using the CLI 2.0 commands. + +# Login {% #login %} + +Log in to your Appwrite account using the `login` CLI command. ``` -appwrite init -? How would you like to start? (Use arrow keys) -> Create a new Appwrite project - Link this directory to an existing Appwrite project +appwrite login ``` +# Create project {% #create-project %} + +Create a project using the `init` command and follow the prompts. + ``` appwrite init ? How would you like to start? Create a new Appwrite project @@ -22,29 +27,41 @@ appwrite init ✓ Success ``` -// Create database +# Create database {% #create-database %} + +Create an Appwrite database by running the `database` command in the folder holding your `appwrite.json` file. ``` appwrite databases create --databaseId "unique()" --name "genre" ``` -// pull database +# Pull database {% #pull-database %} + +You can pull your Appwrite database's customizable settings using the `pull` command in the folder holding your `appwrite.json` file. + ``` -appwrite pull collection +appwrite pull collection // currently only way to pull database ? From which database would you like to pull collections? (Press to select, to toggle all, to invert selection, and to proceed) >( ) songs (6sadfvasdva2323bc0) ( ) playlists (12escvqw2120ffd1) ``` +# Push Database {% #pull-database %} + ``` -? From which database would you like to pull collections? songs (64ascaq2edswwc0) -ℹ Info Found 1 collections -ℹ Info Fetching songs ... -✓ Success +appwrite push +? Which resources would you like to push? Collections // currently only way to push database +? Which collections would you like to push? music (25912239163242502 - 25912239163242502) +ℹ Info Checking for databases and collection changes +✓ Success Updated music ( 259122391632425028 ) name +ℹ Info No changes has been detected. Skipping music ( 259122391632425028 ) ``` -// appwrite.json +# Appwrite.json {% #Appwritejson %} + +An example of what your `appwrite.json` file should look like. + ```server-nodejs { "projectId": "25912221200392927, @@ -118,23 +135,13 @@ to toggle all, to invert selection, and to proceed) } ``` -``` -appwrite push -? Which resources would you like to push? Collections -? Which collections would you like to push? music (25912239163242502 - 25912239163242502) -ℹ Info Checking for databases and collection changes -✓ Success Updated music ( 259122391632425028 ) name -ℹ Info No changes has been detected. Skipping music ( 259122391632425028 ) -``` - -appwrite databases -Usage: index databases [options] [command] - -The databases command allows you to create structured collections of documents, query and filter lists of documents. - # List {% #list %} -Below is a list of the available commands in the Appwrite CLI. You can get more information on each command by running `appwrite [COMMAND] --help`. +The databases command allows you to create structured collections of documents, queries, and filter lists of documents. Appwrite database CLI commands generally follow the following syntax: + +```sh +appwrite databases [COMMAND] [OPTIONS] +``` {% table %} * Command @@ -155,123 +162,6 @@ Below is a list of the available commands in the Appwrite CLI. You can get more * delete [options] * Delete a database by its unique ID. Only API keys with databases.write scope can delete a database. --- -* listCollections [options] -* Get a list of all collections that belong to the provided databaseId. You can use the search parameter to filter your results. ---- -* createCollection [options] -* Create a new Collection. Before using this route, you should create a new database resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection) API or directly from your database console. ---- -* getCollection [options] -* Get a collection by its unique ID. This endpoint response returns a JSON object with the collection metadata. ---- -* updateCollection [options] -* Update a collection by its unique ID. ---- -* deleteCollection [options] -* Delete a collection by its unique ID. Only users with write permissions have access to delete this resource. ---- -* listAttributes [options] -* List attributes in the collection. ---- -* createBooleanAttribute [options] -* Create a boolean attribute. ---- -* updateBooleanAttribute [options] -* Update a boolean attribute. Changing the 'default' value will not update already existing documents. ---- -* createDatetimeAttribute [options] -* Create a date time attribute according to the ISO 8601 standard. ---- -* updateDatetimeAttribute [options] -* Update a date time attribute. Changing the 'default' value will not update already existing documents. ---- -* createEmailAttribute [options] -* Create an email attribute. ---- -* updateEmailAttribute [options] -* Update an email attribute. Changing the 'default' value will not update already existing documents. ---- -* createEnumAttribute [options] -* Create an enumeration attribute. The 'elements' param acts as a white-list of accepted values for this attribute. ---- -* updateEnumAttribute [options] -* Update an enum attribute. Changing the 'default' value will not update already existing documents. ---- -* createFloatAttribute [options] -* Create a float attribute. Optionally, minimum and maximum values can be provided. ---- -* updateFloatAttribute [options] -* Update a float attribute. Changing the 'default' value will not update already existing documents. ---- -* createIntegerAttribute [options] -* Create an integer attribute. Optionally, minimum and maximum values can be provided. ---- -* updateIntegerAttribute [options] -* Update an integer attribute. Changing the 'default' value will not update already existing documents. ---- -* createIpAttribute [options] -* Create IP address attribute. ---- -* updateIpAttribute [options] -* Update an ip attribute. Changing the 'default' value will not update already existing documents. ---- -* createRelationshipAttribute [options] -* Create relationship attribute. [Learn more about relationship attributes](https://appwrite.io/docs/databases-relationships#relationship-attributes). ---- -* createStringAttribute [options] -* Create a string attribute. ---- -* updateStringAttribute [options] -* Update a string attribute. Changing the 'default' value will not update already existing documents. ---- -* createUrlAttribute [options] -* Create a URL attribute. ---- -* updateUrlAttribute [options] -* Update an url attribute. Changing the 'default' value will not update already existing documents. ---- -* getAttribute [options] -* Get attribute by ID. ---- -* deleteAttribute [options] -* Deletes an attribute. ---- -* updateRelationshipAttribute [options] -* Update relationship attribute. [Learn more about relationship attributes](https://appwrite.io/docs/databases-relationships#relationship-attributes). ---- -* listDocuments [options] -* Get a list of all the user's documents in a given collection. You can use the query params to filter your results. ---- -* createDocument [options] -* Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection) API or directly from your database console. ---- -* getDocument [options] -* Get a document by its unique ID. This endpoint response returns a JSON object with the document data. ---- -* updateDocument [options] -* Update a document by its unique ID. Using the patch method you can pass only specific fields that will get updated. ---- -* deleteDocument [options] -* Delete a document by its unique ID. ---- -* listDocumentLogs [options] -* Get the document activity logs list by its unique ID. ---- -* listIndexes [options] -* List indexes in the collection. ---- -* createIndex [options] -* Creates an index on the attributes listed. Your index should include all the attributes you will query in a single request. Attributes can be 'key', 'fulltext', and 'unique'. ---- -* getIndex [options] -* Get index by ID. ---- -* deleteIndex [options] -* Delete an index. ---- -* listCollectionLogs [options] -* Get the collection activity logs list by its unique ID. ---- * getCollectionUsage [options] | listLogs [options] * Get the database activity logs list by its unique ID. --- From 62deb6711c2ff984f40ae78a8e7000f065e27d92 Mon Sep 17 00:00:00 2001 From: choir27 Date: Tue, 25 Jun 2024 16:16:44 -0400 Subject: [PATCH 06/66] docs: add commands for authentication CLI 2.0 --- .../docs/tooling/command-line/+layout.svelte | 4 + .../command-line/authentication/+page.markdoc | 187 ++++++++++++++++++ 2 files changed, 191 insertions(+) create mode 100644 src/routes/docs/tooling/command-line/authentication/+page.markdoc diff --git a/src/routes/docs/tooling/command-line/+layout.svelte b/src/routes/docs/tooling/command-line/+layout.svelte index 9240a63c2b..97135904a1 100644 --- a/src/routes/docs/tooling/command-line/+layout.svelte +++ b/src/routes/docs/tooling/command-line/+layout.svelte @@ -32,6 +32,10 @@ { label: 'Deployments', items: [ + { + label: 'Authentication', + href: '/docs/tooling/command-line/authentication' + }, { label: 'Databases', href: '/docs/tooling/command-line/databases' diff --git a/src/routes/docs/tooling/command-line/authentication/+page.markdoc b/src/routes/docs/tooling/command-line/authentication/+page.markdoc new file mode 100644 index 0000000000..843d8fd7f9 --- /dev/null +++ b/src/routes/docs/tooling/command-line/authentication/+page.markdoc @@ -0,0 +1,187 @@ +--- +layout: article +title: Deploy authentication with CLI 2.0 +description: Efficiently deploy your Appwrite authentication using the Command-Line Tool (CLI). +--- + +## Get the current account + +``` + appwrite account get +$id : 64948dca2c2f4bc54901 +$createdAt : 2023-06-22T18:07:06.360+00:00 +$updatedAt : 2024-06-25T13:54:32.332+00:00 +name : Richard +registration : 2023-06-22T18:07:06.358+00:00 +status : true +labels +[] +passwordUpdate : 2024-06-24T16:08:15.617+00:00 +email : richardchoi54@gmail.com +phone : +emailVerification : true +phoneVerification : false +mfa : false +prefs + + organization + ────────────────────── + 64948de4eb138c94b4f4 + +targets +[] +accessedAt : 2024-06-24T18:50:35.306+00:00 +✓ Success +``` + +## Logout + +``` + appwrite account delete +✓ Success +``` + +# List {% #list %} + +The databases command allows you to create structured collections of documents, queries, and filter lists of documents. Appwrite database CLI commands generally follow the following syntax: + +```sh +appwrite account [COMMAND] [OPTIONS] +``` +{% table %} +* Command +* Description +--- +* list [options] +* Get a list of all the project's users. You can use the query params to filter your results. +--- +* create [options] +* Create a new user. +--- +* createArgon2User [options] +* Create a new user. Password provided must be hashed with the [Argon2](https://en.wikipedia.org/wiki/Argon2) algorithm. Use the [POST /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to create users with a plain text password. +--- +* createBcryptUser [options] +* Create a new user. Password provided must be hashed with the [Bcrypt](https://en.wikipedia.org/wiki/Bcrypt) algorithm. Use the [POST /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to create users with a plain text password. +--- +* listIdentities [options] +* Get identities for all users. +--- +* deleteIdentity [options] +* Delete an identity by its unique ID. +--- +* createMD5User [options] +* Create a new user. Password provided must be hashed with the [MD5](https://en.wikipedia.org/wiki/MD5) algorithm. Use the [POST /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to create users with a plain text password. +--- +* createPHPassUser [options] +* Create a new user. Password provided must be hashed with the [PHPass](https://www.openwall.com/phpass/) algorithm. Use the [POST /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to create users with a plain text password. +--- +* createScryptUser [options] +* Create a new user. Password provided must be hashed with the [Scrypt](https://github.com/Tarsnap/scrypt) algorithm. Use the [POST /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to create users with a plain text password. +--- +* createScryptModifiedUser [options] +* Create a new user. Password provided must be hashed with the [Scrypt Modified](https://gist.github.com/Meldiron/eecf84a0225eccb5a378d45bb27462cc) algorithm. Use the [POST /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to create users with a plain text password. +--- +* createSHAUser [options] +* Create a new user. Password provided must be hashed with the [SHA](https://en.wikipedia.org/wiki/Secure_Hash_Algorithm) algorithm. Use the [POST /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to create users with a plain text password. +--- +* getUsage [options] +* Get usage details. +--- +* get [options] +* Get a user by its unique ID. +--- +* delete [options] +* Delete a user by its unique ID, thereby releasing its ID. Since ID is released and can be reused, all user-related resources like documents or storage files should be deleted before user deletion. If you want to keep ID reserved, use the [updateStatus](https://appwrite.io/docs/server/users#usersUpdateStatus) endpoint instead. +--- +* updateEmail [options] +* Update the user email by its unique ID. +--- +* createJWT [options] +* Use this endpoint to create a JSON Web Token for user by its unique ID. You can use the resulting JWT to authenticate on behalf of the user. The JWT secret will become invalid if the session it uses gets deleted. +--- +* updateLabels [options] +* Update the user labels by its unique ID. Labels can be used to grant access to resources. While teams are a way for user's to share access to a resource, labels can be defined by the developer to grant access without an invitation. See the [Permissions docs](https://appwrite.io/docs/permissions) for more info. +--- +* listLogs [options] +* Get the user activity logs list by its unique ID. +--- +* listMemberships [options] +* Get the user membership list by its unique ID. +--- +* updateMfa [options] +* Enable or disable MFA on a user account. +--- +* deleteMfaAuthenticator [options] +* Delete an authenticator app. +--- +* listMfaFactors [options] +* List the factors available on the account to be used as a MFA challenge. +--- +* getMfaRecoveryCodes [options] +* Get recovery codes that can be used as backup for MFA flow by User ID. Before getting codes, they must be generated using [createMfaRecoveryCodes](/docs/references/cloud/client-web/account#createMfaRecoveryCodes) method. +--- +* updateMfaRecoveryCodes [options] +* Regenerate recovery codes that can be used as backup for MFA flow by User ID. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](/docs/references/cloud/client-web/account#createMfaRecoveryCodes) method. +--- +* createMfaRecoveryCodes [options] +* Generate recovery codes used as backup for MFA flow for User ID. Recovery codes can be used as a MFA verification type in [createMfaChallenge](/docs/references/cloud/client-web/account#createMfaChallenge) method by client SDK. +--- +* updateName [options] +* Update the user name by its unique ID. +--- +* updatePassword [options] +* Update the user password by its unique ID. +--- +* updatePhone [options] +* Update the user phone by its unique ID. +--- +* getPrefs [options] +* Get the user preferences by its unique ID. +--- +* updatePrefs [options] +* Update the user preferences by its unique ID. The object you pass is stored as is, and replaces any previous value. The maximum allowed prefs size is 64kB and throws error if exceeded. +--- +* listSessions [options] +* Get the user sessions list by its unique ID. +--- +* createSession [options] +* Creates a session for a user. Returns an immediately usable session object. If you want to generate a token for a custom authentication flow, use the [POST /users/{userId}/tokens](https://appwrite.io/docs/server/users#createToken) endpoint. +--- +* deleteSessions [options] +* Delete all user's sessions by using the user's unique ID. +--- +* deleteSession [options] +* Delete a user sessions by its unique ID. +--- +* updateStatus [options] +* Update the user status by its unique ID. Use this endpoint as an alternative to deleting a user if you want to keep user's ID reserved. +--- +* listTargets [options] +* List the messaging targets that are associated with a user. +--- +* createTarget [options] +* Create a messaging target. +--- +* getTarget [options] +* Get a user's push notification target by ID. +--- +* updateTarget [options] +* Update a messaging target. +--- +* deleteTarget [options] +* Delete a messaging target. +--- +* createToken [options] +* Returns a token with a secret key for creating a session. If the provided user ID has not be registered, a new user will be created. Use the returned user ID and secret and submit a request to the [PUT /account/sessions/custom](https://appwrite.io/docs/references/cloud/client-web/account#updateCustomSession) endpoint to complete the login process. +--- +* updateEmailVerification [options] +* Update the user email verification status by its unique ID. +--- +* updatePhoneVerification [options] +* Update the user phone verification status by its unique ID. +--- +* help [command] +* display help for command +--- +{% /table %} \ No newline at end of file From d9fa43ea923cf451db6122963b43038535b2bba1 Mon Sep 17 00:00:00 2001 From: choir27 Date: Tue, 25 Jun 2024 17:28:51 -0400 Subject: [PATCH 07/66] docs: update commands for auth CLI 2.0 --- .../command-line/authentication/+page.markdoc | 94 ++++++++++--------- .../command-line/collections/+page.markdoc | 31 +----- .../command-line/databases/+page.markdoc | 23 +---- 3 files changed, 55 insertions(+), 93 deletions(-) diff --git a/src/routes/docs/tooling/command-line/authentication/+page.markdoc b/src/routes/docs/tooling/command-line/authentication/+page.markdoc index 843d8fd7f9..d666792340 100644 --- a/src/routes/docs/tooling/command-line/authentication/+page.markdoc +++ b/src/routes/docs/tooling/command-line/authentication/+page.markdoc @@ -4,50 +4,63 @@ title: Deploy authentication with CLI 2.0 description: Efficiently deploy your Appwrite authentication using the Command-Line Tool (CLI). --- -## Get the current account +Create and manage your authentication using the CLI 2.0 commands. Setup your Appwrite application using CLI commands [here](/docs/tooling/command-line/installation). +# Create account + +```sh +appwrite users create --userId "unique()" --name "test" --password "test1234" ``` - appwrite account get -$id : 64948dca2c2f4bc54901 -$createdAt : 2023-06-22T18:07:06.360+00:00 -$updatedAt : 2024-06-25T13:54:32.332+00:00 -name : Richard -registration : 2023-06-22T18:07:06.358+00:00 + + +# Get the current account + +```sh + appwrite users get --userId '1n0d02309je029fjd199jffj' +$id : 1n0d02309je029fjd199jffj +$createdAt : 2023-11-06T18:20:10.905+00:00 +$updatedAt : 2023-11-06T18:20:10.905+00:00 +name : ina +password : 12900d9a-093m21209c9n-q9c-329rmcq-9emvr9qewfmewfj90qi-m32cmpoa;dpa +hash : argon2 +hashOptions + + type │ memoryCost │ timeCost │ threads + ────────┼────────────┼──────────┼───────── + argon2 │ 2048 │ 4 │ 3 + +registration : 2023-11-06T18:20:10.903+00:00 status : true labels [] -passwordUpdate : 2024-06-24T16:08:15.617+00:00 -email : richardchoi54@gmail.com +passwordUpdate : 2023-11-06T18:20:10.903+00:00 +email : test@email.com phone : -emailVerification : true +emailVerification : false phoneVerification : false mfa : false prefs - organization - ────────────────────── - 64948de4eb138c94b4f4 - targets [] -accessedAt : 2024-06-24T18:50:35.306+00:00 -✓ Success +accessedAt : 2023-11-06T18:20:10.903+00:00 +✓ Success ``` ## Logout -``` - appwrite account delete -✓ Success +```sh +appwrite users deleteSessions --userId '03jf0993293jfjf930' ``` # List {% #list %} -The databases command allows you to create structured collections of documents, queries, and filter lists of documents. Appwrite database CLI commands generally follow the following syntax: +The users command allows you to manage your project users. Appwrite database CLI commands generally follow the following syntax: ```sh -appwrite account [COMMAND] [OPTIONS] +appwrite users [COMMAND] [OPTIONS] ``` + {% table %} * Command * Description @@ -85,14 +98,11 @@ appwrite account [COMMAND] [OPTIONS] * createSHAUser [options] * Create a new user. Password provided must be hashed with the [SHA](https://en.wikipedia.org/wiki/Secure_Hash_Algorithm) algorithm. Use the [POST /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to create users with a plain text password. --- -* getUsage [options] -* Get usage details. ---- -* get [options] +* getUsage [options] | get [options] * Get a user by its unique ID. --- * delete [options] -* Delete a user by its unique ID, thereby releasing its ID. Since ID is released and can be reused, all user-related resources like documents or storage files should be deleted before user deletion. If you want to keep ID reserved, use the [updateStatus](https://appwrite.io/docs/server/users#usersUpdateStatus) endpoint instead. +* Delete a user by its unique ID, thereby releasing it's ID. Since ID is released and can be reused, all user-related resources like documents or storage files should be deleted before user deletion. If you want to keep ID reserved, use the [updateStatus](https://appwrite.io/docs/server/users#usersUpdateStatus) endpoint instead. --- * updateEmail [options] * Update the user email by its unique ID. @@ -100,7 +110,7 @@ appwrite account [COMMAND] [OPTIONS] * createJWT [options] * Use this endpoint to create a JSON Web Token for user by its unique ID. You can use the resulting JWT to authenticate on behalf of the user. The JWT secret will become invalid if the session it uses gets deleted. --- -* updateLabels [options] +* updateLabels [options] * Update the user labels by its unique ID. Labels can be used to grant access to resources. While teams are a way for user's to share access to a resource, labels can be defined by the developer to grant access without an invitation. See the [Permissions docs](https://appwrite.io/docs/permissions) for more info. --- * listLogs [options] @@ -109,19 +119,19 @@ appwrite account [COMMAND] [OPTIONS] * listMemberships [options] * Get the user membership list by its unique ID. --- -* updateMfa [options] +* updateMfa [options] * Enable or disable MFA on a user account. --- -* deleteMfaAuthenticator [options] +* deleteMfaAuthenticator [options] * Delete an authenticator app. --- * listMfaFactors [options] -* List the factors available on the account to be used as a MFA challenge. +* List the factors available on the account to be used as a MFA challange. --- -* getMfaRecoveryCodes [options] +* getMfaRecoveryCodes [options] * Get recovery codes that can be used as backup for MFA flow by User ID. Before getting codes, they must be generated using [createMfaRecoveryCodes](/docs/references/cloud/client-web/account#createMfaRecoveryCodes) method. --- -* updateMfaRecoveryCodes [options] +* updateMfaRecoveryCodes [options] * Regenerate recovery codes that can be used as backup for MFA flow by User ID. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](/docs/references/cloud/client-web/account#createMfaRecoveryCodes) method. --- * createMfaRecoveryCodes [options] @@ -131,24 +141,24 @@ appwrite account [COMMAND] [OPTIONS] * Update the user name by its unique ID. --- * updatePassword [options] -* Update the user password by its unique ID. +* Update the user password by its unique ID. --- * updatePhone [options] * Update the user phone by its unique ID. --- * getPrefs [options] -* Get the user preferences by its unique ID. +* Get the user preferences by its unique ID. --- * updatePrefs [options] * Update the user preferences by its unique ID. The object you pass is stored as is, and replaces any previous value. The maximum allowed prefs size is 64kB and throws error if exceeded. --- * listSessions [options] -* Get the user sessions list by its unique ID. +* Get the user sessions list by its unique ID. --- * createSession [options] -* Creates a session for a user. Returns an immediately usable session object. If you want to generate a token for a custom authentication flow, use the [POST /users/{userId}/tokens](https://appwrite.io/docs/server/users#createToken) endpoint. +* Creates a session for a user. Returns an immediately usable session object. If you want to generate a token for a custom authentication flow, use the [POST /users/{userId}/tokens](https://appwrite.io/docs/server/users#createToken) endpoint. --- -* deleteSessions [options] +* deleteSessions [options] * Delete all user's sessions by using the user's unique ID. --- * deleteSession [options] @@ -164,16 +174,13 @@ appwrite account [COMMAND] [OPTIONS] * Create a messaging target. --- * getTarget [options] -* Get a user's push notification target by ID. +* Get a user's push notification target by ID. --- * updateTarget [options] * Update a messaging target. --- * deleteTarget [options] -* Delete a messaging target. ---- -* createToken [options] -* Returns a token with a secret key for creating a session. If the provided user ID has not be registered, a new user will be created. Use the returned user ID and secret and submit a request to the [PUT /account/sessions/custom](https://appwrite.io/docs/references/cloud/client-web/account#updateCustomSession) endpoint to complete the login process. +* Delete a messaging target. request to the [PUT /account/sessions/custom](https://appwrite.io/docs/references/cloud/client-web/account#updateCustomSession) endpoint to complete the login process. --- * updateEmailVerification [options] * Update the user email verification status by its unique ID. @@ -181,7 +188,4 @@ appwrite account [COMMAND] [OPTIONS] * updatePhoneVerification [options] * Update the user phone verification status by its unique ID. --- -* help [command] -* display help for command ---- {% /table %} \ No newline at end of file diff --git a/src/routes/docs/tooling/command-line/collections/+page.markdoc b/src/routes/docs/tooling/command-line/collections/+page.markdoc index acc63e1aa9..e47db4a3ed 100644 --- a/src/routes/docs/tooling/command-line/collections/+page.markdoc +++ b/src/routes/docs/tooling/command-line/collections/+page.markdoc @@ -4,34 +4,13 @@ title: Deploy collections with CLI 2.0 description: Efficiently deploy your Appwrite collection using the Command-Line Tool (CLI). --- -Create and manage your collections using the CLI 2.0 commands. - -# Login {% #login %} - -Log in to your Appwrite account using the `login` CLI command. - -``` -appwrite login -``` - -# Create project {% #create-project %} - -Create a project using the `init` command and follow the prompts. - -``` -appwrite init -? How would you like to start? Create a new Appwrite project -? Choose the project organization 25912221200392927 -? What would you like to name your project? My Awesome Project -? What ID would you like to have for your project? unique() -✓ Success -``` +Create and manage your collections using the CLI 2.0 commands. Setup your Appwrite application using CLI commands [here](/docs/tooling/command-line/installation). # Create database {% #create-database %} Create an Appwrite database by running the `database` command in the folder holding your `appwrite.json` file. -``` +```sh appwrite databases create --databaseId "unique()" --name "genre" ``` @@ -39,7 +18,7 @@ appwrite databases create --databaseId "unique()" --name "genre" You can create an Appwrite collection inside your database using the `database createCollection` command in the folder holding your `appwrite.json` file. -``` +```sh appwrite databases createCollection --databaseId "25912221200392927" --collectionId "unique()" --name "genre" ``` @@ -47,7 +26,7 @@ appwrite databases createCollection --databaseId "25912221200392927" --collectio You can pull your Appwrite collection's and database's customizable settings using the `pull` command in the folder holding your `appwrite.json` file. -``` +```sh appwrite pull collection ? From which database would you like to pull collections? (Press to select, to toggle all, to invert selection, and to proceed) @@ -59,7 +38,7 @@ to toggle all, to invert selection, and to proceed) To push the changes you made inside your `appwrite.json` file, use the `push` command in the folder holding your `appwrite.json` file. -``` +```sh appwrite push ? Which resources would you like to push? Collections ? Which collections would you like to push? music (25912239163242502 - 25912239163242502) diff --git a/src/routes/docs/tooling/command-line/databases/+page.markdoc b/src/routes/docs/tooling/command-line/databases/+page.markdoc index da9878af1a..b932839dda 100644 --- a/src/routes/docs/tooling/command-line/databases/+page.markdoc +++ b/src/routes/docs/tooling/command-line/databases/+page.markdoc @@ -4,28 +4,7 @@ title: Deploy databases with CLI 2.0 description: Efficiently deploy your Appwrite database using the Command-Line Tool (CLI). --- -Create and manage your databases using the CLI 2.0 commands. - -# Login {% #login %} - -Log in to your Appwrite account using the `login` CLI command. - -``` -appwrite login -``` - -# Create project {% #create-project %} - -Create a project using the `init` command and follow the prompts. - -``` -appwrite init -? How would you like to start? Create a new Appwrite project -? Choose the project organization 25912221200392927 -? What would you like to name your project? My Awesome Project -? What ID would you like to have for your project? unique() -✓ Success -``` +Create and manage your databases using the CLI 2.0 commands. Setup your Appwrite application using CLI commands [here](/docs/tooling/command-line/installation). # Create database {% #create-database %} From 17d554f98009f05e4f63060eb00c4f2331ff9307 Mon Sep 17 00:00:00 2001 From: choir27 Date: Wed, 26 Jun 2024 13:54:46 -0400 Subject: [PATCH 08/66] docs: add create, login, get current account, and logout for CLI authentication --- .../command-line/authentication/+page.markdoc | 47 +++++++------------ 1 file changed, 16 insertions(+), 31 deletions(-) diff --git a/src/routes/docs/tooling/command-line/authentication/+page.markdoc b/src/routes/docs/tooling/command-line/authentication/+page.markdoc index d666792340..1e6344ac57 100644 --- a/src/routes/docs/tooling/command-line/authentication/+page.markdoc +++ b/src/routes/docs/tooling/command-line/authentication/+page.markdoc @@ -6,48 +6,33 @@ description: Efficiently deploy your Appwrite authentication using the Command-L Create and manage your authentication using the CLI 2.0 commands. Setup your Appwrite application using CLI commands [here](/docs/tooling/command-line/installation). -# Create account +# Create account {% #create-account %} + +You can create an user account inside your database using the `users create` command in the folder holding your `appwrite.json` file. ```sh appwrite users create --userId "unique()" --name "test" --password "test1234" ``` +# Login to your account {% #login-to-your-account %} -# Get the current account +You can create a session for your user account inside your database using the `users createSession` command in the folder holding your `appwrite.json` file. + +```sh +appwrite users createSession --userId "12u0fu9ue09uf0jfejfefjj3" +``` + +# Get the current account {% #get-the-current-account %} + +You can get the current logged-in user account inside your database using the `users get` command in the folder holding your `appwrite.json` file. ```sh appwrite users get --userId '1n0d02309je029fjd199jffj' -$id : 1n0d02309je029fjd199jffj -$createdAt : 2023-11-06T18:20:10.905+00:00 -$updatedAt : 2023-11-06T18:20:10.905+00:00 -name : ina -password : 12900d9a-093m21209c9n-q9c-329rmcq-9emvr9qewfmewfj90qi-m32cmpoa;dpa -hash : argon2 -hashOptions - - type │ memoryCost │ timeCost │ threads - ────────┼────────────┼──────────┼───────── - argon2 │ 2048 │ 4 │ 3 - -registration : 2023-11-06T18:20:10.903+00:00 -status : true -labels -[] -passwordUpdate : 2023-11-06T18:20:10.903+00:00 -email : test@email.com -phone : -emailVerification : false -phoneVerification : false -mfa : false -prefs - -targets -[] -accessedAt : 2023-11-06T18:20:10.903+00:00 -✓ Success ``` -## Logout +## Logout {% #logout %} + +You can delete a session for your user account inside your database using the `users createSession` command in the folder holding your `appwrite.json` file. ```sh appwrite users deleteSessions --userId '03jf0993293jfjf930' From 6f758e392a1a5dccf767ce7ead26c2c63df799e2 Mon Sep 17 00:00:00 2001 From: choir27 Date: Wed, 26 Jun 2024 14:30:58 -0400 Subject: [PATCH 09/66] add functions page for CLI with push, pull and init, and remove authentication page due to lack of pull, push or init support --- .../docs/tooling/command-line/+layout.svelte | 8 +- .../command-line/authentication/+page.markdoc | 176 ------------------ .../command-line/databases/+page.markdoc | 2 +- .../command-line/functions/+page.markdoc | 108 +++++++++++ 4 files changed, 115 insertions(+), 179 deletions(-) delete mode 100644 src/routes/docs/tooling/command-line/authentication/+page.markdoc create mode 100644 src/routes/docs/tooling/command-line/functions/+page.markdoc diff --git a/src/routes/docs/tooling/command-line/+layout.svelte b/src/routes/docs/tooling/command-line/+layout.svelte index 97135904a1..058b0e0483 100644 --- a/src/routes/docs/tooling/command-line/+layout.svelte +++ b/src/routes/docs/tooling/command-line/+layout.svelte @@ -33,8 +33,8 @@ label: 'Deployments', items: [ { - label: 'Authentication', - href: '/docs/tooling/command-line/authentication' + label: 'Projects', + href: '/docs/tooling/command-line/projects' }, { label: 'Databases', @@ -43,6 +43,10 @@ { label: 'Collections', href: '/docs/tooling/command-line/collections' + }, + { + label: 'Functions', + href: '/docs/tooling/command-line/functions' } ] } diff --git a/src/routes/docs/tooling/command-line/authentication/+page.markdoc b/src/routes/docs/tooling/command-line/authentication/+page.markdoc deleted file mode 100644 index 1e6344ac57..0000000000 --- a/src/routes/docs/tooling/command-line/authentication/+page.markdoc +++ /dev/null @@ -1,176 +0,0 @@ ---- -layout: article -title: Deploy authentication with CLI 2.0 -description: Efficiently deploy your Appwrite authentication using the Command-Line Tool (CLI). ---- - -Create and manage your authentication using the CLI 2.0 commands. Setup your Appwrite application using CLI commands [here](/docs/tooling/command-line/installation). - -# Create account {% #create-account %} - -You can create an user account inside your database using the `users create` command in the folder holding your `appwrite.json` file. - -```sh -appwrite users create --userId "unique()" --name "test" --password "test1234" -``` - -# Login to your account {% #login-to-your-account %} - -You can create a session for your user account inside your database using the `users createSession` command in the folder holding your `appwrite.json` file. - -```sh -appwrite users createSession --userId "12u0fu9ue09uf0jfejfefjj3" -``` - -# Get the current account {% #get-the-current-account %} - -You can get the current logged-in user account inside your database using the `users get` command in the folder holding your `appwrite.json` file. - -```sh - appwrite users get --userId '1n0d02309je029fjd199jffj' -``` - -## Logout {% #logout %} - -You can delete a session for your user account inside your database using the `users createSession` command in the folder holding your `appwrite.json` file. - -```sh -appwrite users deleteSessions --userId '03jf0993293jfjf930' -``` - -# List {% #list %} - -The users command allows you to manage your project users. Appwrite database CLI commands generally follow the following syntax: - -```sh -appwrite users [COMMAND] [OPTIONS] -``` - -{% table %} -* Command -* Description ---- -* list [options] -* Get a list of all the project's users. You can use the query params to filter your results. ---- -* create [options] -* Create a new user. ---- -* createArgon2User [options] -* Create a new user. Password provided must be hashed with the [Argon2](https://en.wikipedia.org/wiki/Argon2) algorithm. Use the [POST /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to create users with a plain text password. ---- -* createBcryptUser [options] -* Create a new user. Password provided must be hashed with the [Bcrypt](https://en.wikipedia.org/wiki/Bcrypt) algorithm. Use the [POST /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to create users with a plain text password. ---- -* listIdentities [options] -* Get identities for all users. ---- -* deleteIdentity [options] -* Delete an identity by its unique ID. ---- -* createMD5User [options] -* Create a new user. Password provided must be hashed with the [MD5](https://en.wikipedia.org/wiki/MD5) algorithm. Use the [POST /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to create users with a plain text password. ---- -* createPHPassUser [options] -* Create a new user. Password provided must be hashed with the [PHPass](https://www.openwall.com/phpass/) algorithm. Use the [POST /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to create users with a plain text password. ---- -* createScryptUser [options] -* Create a new user. Password provided must be hashed with the [Scrypt](https://github.com/Tarsnap/scrypt) algorithm. Use the [POST /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to create users with a plain text password. ---- -* createScryptModifiedUser [options] -* Create a new user. Password provided must be hashed with the [Scrypt Modified](https://gist.github.com/Meldiron/eecf84a0225eccb5a378d45bb27462cc) algorithm. Use the [POST /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to create users with a plain text password. ---- -* createSHAUser [options] -* Create a new user. Password provided must be hashed with the [SHA](https://en.wikipedia.org/wiki/Secure_Hash_Algorithm) algorithm. Use the [POST /users](https://appwrite.io/docs/server/users#usersCreate) endpoint to create users with a plain text password. ---- -* getUsage [options] | get [options] -* Get a user by its unique ID. ---- -* delete [options] -* Delete a user by its unique ID, thereby releasing it's ID. Since ID is released and can be reused, all user-related resources like documents or storage files should be deleted before user deletion. If you want to keep ID reserved, use the [updateStatus](https://appwrite.io/docs/server/users#usersUpdateStatus) endpoint instead. ---- -* updateEmail [options] -* Update the user email by its unique ID. ---- -* createJWT [options] -* Use this endpoint to create a JSON Web Token for user by its unique ID. You can use the resulting JWT to authenticate on behalf of the user. The JWT secret will become invalid if the session it uses gets deleted. ---- -* updateLabels [options] -* Update the user labels by its unique ID. Labels can be used to grant access to resources. While teams are a way for user's to share access to a resource, labels can be defined by the developer to grant access without an invitation. See the [Permissions docs](https://appwrite.io/docs/permissions) for more info. ---- -* listLogs [options] -* Get the user activity logs list by its unique ID. ---- -* listMemberships [options] -* Get the user membership list by its unique ID. ---- -* updateMfa [options] -* Enable or disable MFA on a user account. ---- -* deleteMfaAuthenticator [options] -* Delete an authenticator app. ---- -* listMfaFactors [options] -* List the factors available on the account to be used as a MFA challange. ---- -* getMfaRecoveryCodes [options] -* Get recovery codes that can be used as backup for MFA flow by User ID. Before getting codes, they must be generated using [createMfaRecoveryCodes](/docs/references/cloud/client-web/account#createMfaRecoveryCodes) method. ---- -* updateMfaRecoveryCodes [options] -* Regenerate recovery codes that can be used as backup for MFA flow by User ID. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](/docs/references/cloud/client-web/account#createMfaRecoveryCodes) method. ---- -* createMfaRecoveryCodes [options] -* Generate recovery codes used as backup for MFA flow for User ID. Recovery codes can be used as a MFA verification type in [createMfaChallenge](/docs/references/cloud/client-web/account#createMfaChallenge) method by client SDK. ---- -* updateName [options] -* Update the user name by its unique ID. ---- -* updatePassword [options] -* Update the user password by its unique ID. ---- -* updatePhone [options] -* Update the user phone by its unique ID. ---- -* getPrefs [options] -* Get the user preferences by its unique ID. ---- -* updatePrefs [options] -* Update the user preferences by its unique ID. The object you pass is stored as is, and replaces any previous value. The maximum allowed prefs size is 64kB and throws error if exceeded. ---- -* listSessions [options] -* Get the user sessions list by its unique ID. ---- -* createSession [options] -* Creates a session for a user. Returns an immediately usable session object. If you want to generate a token for a custom authentication flow, use the [POST /users/{userId}/tokens](https://appwrite.io/docs/server/users#createToken) endpoint. ---- -* deleteSessions [options] -* Delete all user's sessions by using the user's unique ID. ---- -* deleteSession [options] -* Delete a user sessions by its unique ID. ---- -* updateStatus [options] -* Update the user status by its unique ID. Use this endpoint as an alternative to deleting a user if you want to keep user's ID reserved. ---- -* listTargets [options] -* List the messaging targets that are associated with a user. ---- -* createTarget [options] -* Create a messaging target. ---- -* getTarget [options] -* Get a user's push notification target by ID. ---- -* updateTarget [options] -* Update a messaging target. ---- -* deleteTarget [options] -* Delete a messaging target. request to the [PUT /account/sessions/custom](https://appwrite.io/docs/references/cloud/client-web/account#updateCustomSession) endpoint to complete the login process. ---- -* updateEmailVerification [options] -* Update the user email verification status by its unique ID. ---- -* updatePhoneVerification [options] -* Update the user phone verification status by its unique ID. ---- -{% /table %} \ No newline at end of file diff --git a/src/routes/docs/tooling/command-line/databases/+page.markdoc b/src/routes/docs/tooling/command-line/databases/+page.markdoc index b932839dda..e12ab8201b 100644 --- a/src/routes/docs/tooling/command-line/databases/+page.markdoc +++ b/src/routes/docs/tooling/command-line/databases/+page.markdoc @@ -147,4 +147,4 @@ appwrite databases [COMMAND] [OPTIONS] * getDatabaseUsage [options] | help [command] * display help for command --- - {% /table %} \ No newline at end of file +{% /table %} \ No newline at end of file diff --git a/src/routes/docs/tooling/command-line/functions/+page.markdoc b/src/routes/docs/tooling/command-line/functions/+page.markdoc new file mode 100644 index 0000000000..ec02214be1 --- /dev/null +++ b/src/routes/docs/tooling/command-line/functions/+page.markdoc @@ -0,0 +1,108 @@ +--- +layout: article +title: Deploy databases with CLI 2.0 +description: Efficiently deploy your Appwrite functions using the Command-Line Tool (CLI). +--- + +# Create function {% #create-function %} + +Create an Appwrite function. See available runtimes for functions [here](https://appwrite.io/docs/products/functions/runtimes#available-runtimes). + +```sh +appwrite functions create --functionId 'unique()' --name 'Test' --runtime 'node-18.0' +``` + +# Update function {% #update-function %} + +Update your Appwrite function. See available runtimes for functions [here](https://appwrite.io/docs/products/functions/runtimes#available-runtimes). + +```sh +appwrite functions update --functionId '628484849201293938d' --name 'Hatsune Miku' --runtime 'node-19.0' +``` + +# Delete function {% #delete-function %} + +```sh +appwrite functions delete --functionId '628484849201293938d' +``` + +# Pull function {% #pull-function %} +```sh +appwrite pull functions +``` + +# Push function {% #push-function %} + +# List {% #list %} + +The functions command allows you view, create and manage your Cloud Functions. Appwrite database CLI commands generally follow the following syntax: + +```sh +appwrite functions [COMMAND] [OPTIONS] +``` + +{% table %} +* Command +* Description +--- +* list [options] +* Get a list of all the project's functions. You can use the query params to filter your results. +--- +* create [options] +* Create a new function. You can pass a list of [permissions](https://appwrite.io/docs/permissions) to allow different project users or team with access to execute the function using the client API. +--- +* listRuntimes +* Get a list of all runtimes that are currently active on your instance. +--- +* getUsage [options] | get [options] +* Get a function by its unique ID. +--- +* update [options] +* Update function by its unique ID. +--- +* delete [options] +* Delete a function by its unique ID. +--- +* listDeployments [options] +* Get a list of all the project's code deployments. You can use the query params to filter your results. +--- +* createDeployment [options] +* Create a new function code deployment. Use this endpoint to upload a new version of your code function. To execute your newly uploaded code, you'll need to update the function's deployment to use your new deployment UID. This endpoint accepts a tar.gz file compressed with your code. Make sure to include any dependencies your code has within the compressed file. You can learn more about code packaging in the [Appwrite Cloud Functions tutorial](https://appwrite.io/docs/functions). Use the "command" param to set the entrypoint used to execute your code. +--- +* getDeployment [options] +* Get a code deployment by its unique ID. +--- +* updateDeployment [options] +* Update the function code deployment ID using the unique function ID. Use this endpoint to switch the code deployment that should be executed by the execution endpoint. +--- +* deleteDeployment [options] +* Delete a code deployment by its unique ID. +--- +* createBuild [options] | updateDeploymentBuild [options]| downloadDeployment [options] +* Get a Deployment's contents by its unique ID. This endpoint supports range requests for partial or streaming file download. +--- +* listExecutions [options] +* Get a list of all the current user function execution logs. You can use the query params to filter your results. +--- +* createExecution [options] +* Trigger a function execution. The returned object will return you the current execution status. You can ping the 'Get Execution' endpoint to get updates on the current execution status. Once this endpoint is called, your function execution process will start asynchronously. +--- +* getExecution [options] +* Get a function execution log by its unique ID. +--- +* getFunctionUsage [options] | listVariables [options] +* Get a list of all variables of a specific function. +--- +* createVariable [options] +* Create a new function environment variable. These variables can be accessed in the function at runtime as environment variables. +--- +* getVariable [options] +* Get a variable by its unique ID. +--- +* updateVariable [options] +* Update variable by its unique ID. +--- +* deleteVariable [options] +* Delete a variable by its unique ID. +--- +{% /table %} \ No newline at end of file From 71b185aa88c937eb8ff58e524477e4470df76015 Mon Sep 17 00:00:00 2001 From: choir27 Date: Wed, 26 Jun 2024 15:53:33 -0400 Subject: [PATCH 10/66] add teams page for CLI with push, pull and init, and remove authentication page due to lack of pull, push or init support --- .../docs/tooling/command-line/+layout.svelte | 8 +- .../command-line/collections/+page.markdoc | 11 +-- .../command-line/databases/+page.markdoc | 15 +--- .../command-line/functions/+page.markdoc | 20 ++++- .../tooling/command-line/teams/+page.markdoc | 73 +++++++++++++++++++ 5 files changed, 100 insertions(+), 27 deletions(-) create mode 100644 src/routes/docs/tooling/command-line/teams/+page.markdoc diff --git a/src/routes/docs/tooling/command-line/+layout.svelte b/src/routes/docs/tooling/command-line/+layout.svelte index 058b0e0483..ccb06aa1fa 100644 --- a/src/routes/docs/tooling/command-line/+layout.svelte +++ b/src/routes/docs/tooling/command-line/+layout.svelte @@ -32,10 +32,6 @@ { label: 'Deployments', items: [ - { - label: 'Projects', - href: '/docs/tooling/command-line/projects' - }, { label: 'Databases', href: '/docs/tooling/command-line/databases' @@ -47,6 +43,10 @@ { label: 'Functions', href: '/docs/tooling/command-line/functions' + }, + { + label: 'Teams', + href: '/docs/tooling/command-line/teams' } ] } diff --git a/src/routes/docs/tooling/command-line/collections/+page.markdoc b/src/routes/docs/tooling/command-line/collections/+page.markdoc index e47db4a3ed..74f1c498e9 100644 --- a/src/routes/docs/tooling/command-line/collections/+page.markdoc +++ b/src/routes/docs/tooling/command-line/collections/+page.markdoc @@ -1,7 +1,7 @@ --- layout: article title: Deploy collections with CLI 2.0 -description: Efficiently deploy your Appwrite collection using the Command-Line Tool (CLI). +description: Efficiently deploy your Appwrite collections using the Command-Line Tool (CLI). --- Create and manage your collections using the CLI 2.0 commands. Setup your Appwrite application using CLI commands [here](/docs/tooling/command-line/installation). @@ -28,10 +28,6 @@ You can pull your Appwrite collection's and database's customizable settings usi ```sh appwrite pull collection -? From which database would you like to pull collections? (Press to select, -to toggle all, to invert selection, and to proceed) ->( ) songs (6sadfvasdva2323bc0) - ( ) playlists (12escvqw2120ffd1) ``` # Push collection {% #pull-collection %} @@ -40,11 +36,6 @@ To push the changes you made inside your `appwrite.json` file, use the `push` co ```sh appwrite push -? Which resources would you like to push? Collections -? Which collections would you like to push? music (25912239163242502 - 25912239163242502) -ℹ Info Checking for databases and collection changes -✓ Success Updated music ( 259122391632425028 ) name -ℹ Info No changes has been detected. Skipping music ( 259122391632425028 ) ``` # Appwrite.json {% #Appwritejson %} diff --git a/src/routes/docs/tooling/command-line/databases/+page.markdoc b/src/routes/docs/tooling/command-line/databases/+page.markdoc index e12ab8201b..6e7accdc3b 100644 --- a/src/routes/docs/tooling/command-line/databases/+page.markdoc +++ b/src/routes/docs/tooling/command-line/databases/+page.markdoc @@ -10,7 +10,7 @@ Create and manage your databases using the CLI 2.0 commands. Setup your Appwrite Create an Appwrite database by running the `database` command in the folder holding your `appwrite.json` file. -``` +```sh appwrite databases create --databaseId "unique()" --name "genre" ``` @@ -18,23 +18,16 @@ appwrite databases create --databaseId "unique()" --name "genre" You can pull your Appwrite database's customizable settings using the `pull` command in the folder holding your `appwrite.json` file. -``` +```sh appwrite pull collection // currently only way to pull database -? From which database would you like to pull collections? (Press to select, -to toggle all, to invert selection, and to proceed) ->( ) songs (6sadfvasdva2323bc0) - ( ) playlists (12escvqw2120ffd1) +? From which database would you like to pull collections? ``` # Push Database {% #pull-database %} -``` +```sh appwrite push ? Which resources would you like to push? Collections // currently only way to push database -? Which collections would you like to push? music (25912239163242502 - 25912239163242502) -ℹ Info Checking for databases and collection changes -✓ Success Updated music ( 259122391632425028 ) name -ℹ Info No changes has been detected. Skipping music ( 259122391632425028 ) ``` # Appwrite.json {% #Appwritejson %} diff --git a/src/routes/docs/tooling/command-line/functions/+page.markdoc b/src/routes/docs/tooling/command-line/functions/+page.markdoc index ec02214be1..03c6270f31 100644 --- a/src/routes/docs/tooling/command-line/functions/+page.markdoc +++ b/src/routes/docs/tooling/command-line/functions/+page.markdoc @@ -4,6 +4,8 @@ title: Deploy databases with CLI 2.0 description: Efficiently deploy your Appwrite functions using the Command-Line Tool (CLI). --- +Create and manage your functions using the CLI 2.0 commands. Setup your Appwrite application using CLI commands [here](/docs/tooling/command-line/installation). + # Create function {% #create-function %} Create an Appwrite function. See available runtimes for functions [here](https://appwrite.io/docs/products/functions/runtimes#available-runtimes). @@ -14,25 +16,39 @@ appwrite functions create --functionId 'unique()' --name 'Test' --runtime 'node- # Update function {% #update-function %} -Update your Appwrite function. See available runtimes for functions [here](https://appwrite.io/docs/products/functions/runtimes#available-runtimes). +Update your Appwrite function by running the `functions update` command in the folder holding your `appwrite.json` file.. See available runtimes for functions [here](https://appwrite.io/docs/products/functions/runtimes#available-runtimes). ```sh -appwrite functions update --functionId '628484849201293938d' --name 'Hatsune Miku' --runtime 'node-19.0' +appwrite functions update --functionId '628484849201293938d' --name 'testFunction' --runtime 'node-19.0' ``` # Delete function {% #delete-function %} +Delete your Appwrite function by running the `functions delete` command in the folder holding your `appwrite.json` file. + ```sh appwrite functions delete --functionId '628484849201293938d' ``` # Pull function {% #pull-function %} + +You can pull your Appwrite functions customizable settings using the `pull` command in the folder holding your `appwrite.json` file. + ```sh appwrite pull functions ``` # Push function {% #push-function %} +```sh +appwrite push functions +``` + +# Appwrite.json {% #Appwritejson %} + +An example of what your `appwrite.json` file should look like. + + # List {% #list %} The functions command allows you view, create and manage your Cloud Functions. Appwrite database CLI commands generally follow the following syntax: diff --git a/src/routes/docs/tooling/command-line/teams/+page.markdoc b/src/routes/docs/tooling/command-line/teams/+page.markdoc new file mode 100644 index 0000000000..0cf9378bd0 --- /dev/null +++ b/src/routes/docs/tooling/command-line/teams/+page.markdoc @@ -0,0 +1,73 @@ +--- +layout: article +title: Deploy projects with CLI 2.0 +description: Efficiently deploy your Appwrite teams using the Command-Line Tool (CLI). +--- + +# Pull teams {% #pull-teams %} + +```sh +appwrite pull teams +``` + +# Push teams + +```sh +appwrite push teams +``` + +# List {% #push-teams %} + +The teams command allows you to group users of your project and to enable them to share read and write access to your project resources. Appwrite database CLI commands generally follow the following syntax: + +```sh +appwrite teams [COMMAND] [OPTIONS] +``` + +{% table %} +* Command +* Description +--- +* list [options] +* Get a list of all the teams in which the current user is a member. You can use the parameters to filter your results. +--- +* create [options] +* Create a new team. The user who creates the team will automatically be assigned as the owner of the team. Only the users with the owner role can invite new members, add new owners and delete or update the team. +--- +* get [options] +* Get a team by its ID. All team members have read access for this resource. +--- +* updateName [options] +* Update the team's name by its unique ID. +--- +* delete [options] +* Delete a team using its ID. Only team members with the owner role can delete the team. +--- +* listLogs [options] +* Get the team activity logs list by its unique ID. +--- +* listMemberships [options] +* Use this endpoint to list a team's members using the team's ID. All team members have read access to this endpoint. +--- +* createMembership [options] +* Invite a new member to join your team. Provide an ID for existing users, or invite unregistered users using an email or phone number. If initiated from a Client SDK, Appwrite will send an email or sms with a link to join the team to the invited user, and an account will be created for them if one doesn't exist. If initiated from a Server SDK, the new member will be added automatically to the team. You only need to provide one of a user ID, email, or phone number. Appwrite will prioritize accepting the user ID > email > phone number if you provide more than one of these parameters. Use the 'url' parameter to redirect the user from the invitation email to your app. After the user is redirected, use the [Update Team Membership Status](https://appwrite.io/docs/references/cloud/client-web/teams#updateMembershipStatus) endpoint to allow the user to accept the invitation to the team. Please note that to avoid a [Redirect Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) Appwrite will accept the only redirect URLs under the domains you have added as a platform on the Appwrite Console. +--- +* getMembership [options] +* Get a team member by the membership unique id. All team members have read access for this resource. +--- +* updateMembership [options] +* Modify the roles of a team member. Only team members with the owner role have access to this endpoint. Learn more about [roles and permissions](https://appwrite.io/docs/permissions). +--- +* deleteMembership [options] +* This endpoint allows a user to leave a team or for a team owner to delete the membership of any other team member. You can also use this endpoint to delete a user membership even if it is not accepted. +--- +* updateMembershipStatus [options] +* Use this endpoint to allow a user to accept an invitation to join a team after being redirected back to your app from the invitation email received by the user. If the request is successful, a session for the user is automatically created. +--- +* getPrefs [options] +* Get the team's shared preferences by its unique ID. If a preference doesn't need to be shared by all team members, prefer storing them in [user preferences](https://appwrite.io/docs/references/cloud/client-web/account#getPrefs). +--- +* updatePrefs [options] +* Update the team's preferences by its unique ID. The object you pass is stored as is and replaces any previous value. The maximum allowed prefs size is 64kB and throws an error if exceeded. +--- +{% /table %} \ No newline at end of file From cdd8abf34ccdb81dd0dd731f16318311e62240e6 Mon Sep 17 00:00:00 2001 From: choir27 Date: Wed, 26 Jun 2024 16:49:58 -0400 Subject: [PATCH 11/66] remove commands outside of command table that are not push, pull or init --- .../docs/tooling/command-line/+layout.svelte | 4 - .../command-line/collections/+page.markdoc | 93 ++---------- .../command-line/databases/+page.markdoc | 143 ------------------ .../command-line/functions/+page.markdoc | 35 ++--- .../tooling/command-line/teams/+page.markdoc | 24 ++- 5 files changed, 49 insertions(+), 250 deletions(-) delete mode 100644 src/routes/docs/tooling/command-line/databases/+page.markdoc diff --git a/src/routes/docs/tooling/command-line/+layout.svelte b/src/routes/docs/tooling/command-line/+layout.svelte index ccb06aa1fa..abbe6a177c 100644 --- a/src/routes/docs/tooling/command-line/+layout.svelte +++ b/src/routes/docs/tooling/command-line/+layout.svelte @@ -32,10 +32,6 @@ { label: 'Deployments', items: [ - { - label: 'Databases', - href: '/docs/tooling/command-line/databases' - }, { label: 'Collections', href: '/docs/tooling/command-line/collections' diff --git a/src/routes/docs/tooling/command-line/collections/+page.markdoc b/src/routes/docs/tooling/command-line/collections/+page.markdoc index 74f1c498e9..5e83eb3361 100644 --- a/src/routes/docs/tooling/command-line/collections/+page.markdoc +++ b/src/routes/docs/tooling/command-line/collections/+page.markdoc @@ -6,28 +6,32 @@ description: Efficiently deploy your Appwrite collections using the Command-Line Create and manage your collections using the CLI 2.0 commands. Setup your Appwrite application using CLI commands [here](/docs/tooling/command-line/installation). -# Create database {% #create-database %} +The Appwrite CLI also helps you deploy your project's databases and collections schema from one project to another. -Create an Appwrite database by running the `database` command in the folder holding your `appwrite.json` file. +# Init collections + +You can init your `Appwrite.json` using the `init` command. ```sh -appwrite databases create --databaseId "unique()" --name "genre" +init appwrite collections ``` -# Create collection {% #create-collection %} +# Appwrite.json {% #Appwritejson %} -You can create an Appwrite collection inside your database using the `database createCollection` command in the folder holding your `appwrite.json` file. +What your `appwrite.json` file should look like. -```sh -appwrite databases createCollection --databaseId "25912221200392927" --collectionId "unique()" --name "genre" +```server-nodejs +{ + "projectId": "heivi192901fjj1c20912" +} ``` -# Pull collection {% #pull-collection %} +# Pull collections {% #pull-collection %} You can pull your Appwrite collection's and database's customizable settings using the `pull` command in the folder holding your `appwrite.json` file. ```sh -appwrite pull collection +appwrite pull collections ``` # Push collection {% #pull-collection %} @@ -35,77 +39,10 @@ appwrite pull collection To push the changes you made inside your `appwrite.json` file, use the `push` command in the folder holding your `appwrite.json` file. ```sh -appwrite push -``` - -# Appwrite.json {% #Appwritejson %} - -An example of what your `appwrite.json` file should look like. - -```server-nodejs -{ - "projectId": "25912221200392927, - "databases": [ - { - "$id": "5e5ea5c16897e", - "name": "songs", - "$createdAt": "2023-07-01T18:35:27.802+00:00", - "$updatedAt": "2023-08-01T21:41:41.663+00:00", - "enabled": true - } - ], - "collections": [ - { - "$id": "25912239163242502", - "$permissions": [ - "create(\"any\")", - "read(\"any\")", - "update(\"any\")", - "delete(\"any\")" - ], - "databaseId": "2591258431319902", - "name": "songs", - "enabled": true, - "documentSecurity": true, - "attributes": [ - { - "key": "name", - "type": "string", - "status": "available", - "error": "", - "required": false, - "array": false, - "size": 100, - "default": null - }, - { - "key": "audio", - "type": "string", - "status": "available", - "error": "", - "required": false, - "array": false, - "size": 200, - "default": null - }, - { - "key": "artist", - "type": "string", - "status": "available", - "error": "", - "required": false, - "array": false, - "size": 500, - "default": null - } - ], - "indexes": [] - } - ] -} +appwrite push collections ``` -# List {% #list %} +# Commands {% #commands %} The databases command allows you to create structured collections of documents, queries, and filter lists of documents. Appwrite database CLI commands generally follow the following syntax: diff --git a/src/routes/docs/tooling/command-line/databases/+page.markdoc b/src/routes/docs/tooling/command-line/databases/+page.markdoc deleted file mode 100644 index 6e7accdc3b..0000000000 --- a/src/routes/docs/tooling/command-line/databases/+page.markdoc +++ /dev/null @@ -1,143 +0,0 @@ ---- -layout: article -title: Deploy databases with CLI 2.0 -description: Efficiently deploy your Appwrite database using the Command-Line Tool (CLI). ---- - -Create and manage your databases using the CLI 2.0 commands. Setup your Appwrite application using CLI commands [here](/docs/tooling/command-line/installation). - -# Create database {% #create-database %} - -Create an Appwrite database by running the `database` command in the folder holding your `appwrite.json` file. - -```sh -appwrite databases create --databaseId "unique()" --name "genre" -``` - -# Pull database {% #pull-database %} - -You can pull your Appwrite database's customizable settings using the `pull` command in the folder holding your `appwrite.json` file. - -```sh -appwrite pull collection // currently only way to pull database -? From which database would you like to pull collections? -``` - -# Push Database {% #pull-database %} - -```sh -appwrite push -? Which resources would you like to push? Collections // currently only way to push database -``` - -# Appwrite.json {% #Appwritejson %} - -An example of what your `appwrite.json` file should look like. - -```server-nodejs -{ - "projectId": "25912221200392927, - "databases": [ - { - "$id": "5e5ea5c16897e", - "name": "songs", - "$createdAt": "2023-07-01T18:35:27.802+00:00", - "$updatedAt": "2023-08-01T21:41:41.663+00:00", - "enabled": true - } - ], - "collections": [ - { - "$id": "25912239163242502", - "$permissions": [ - "create(\"any\")", - "read(\"any\")", - "update(\"any\")", - "delete(\"any\")" - ], - "databaseId": "2591258431319902", - "name": "songs", - "enabled": true, - "documentSecurity": true, - "attributes": [ - { - "key": "name", - "type": "string", - "status": "available", - "error": "", - "required": false, - "array": false, - "size": 100, - "default": null - }, - { - "key": "audio", - "type": "string", - "status": "available", - "error": "", - "required": false, - "array": false, - "size": 200, - "default": null - }, - { - "key": "genre", - "type": "string", - "status": "available", - "error": "", - "required": false, - "array": false, - "size": 500, - "default": null - }, - { - "key": "artist", - "type": "string", - "status": "available", - "error": "", - "required": false, - "array": false, - "size": 500, - "default": null - } - ], - "indexes": [] - } - ] -} -``` - -# List {% #list %} - -The databases command allows you to create structured collections of documents, queries, and filter lists of documents. Appwrite database CLI commands generally follow the following syntax: - -```sh -appwrite databases [COMMAND] [OPTIONS] -``` - -{% table %} -* Command -* Description ---- -* list [options] -* Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results. ---- -* create [options] -* Create a new Database. ---- -* getUsage [options] | get [options] -* Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata. ---- -* update [options] -* Update a database by its unique ID. ---- -* delete [options] -* Delete a database by its unique ID. Only API keys with databases.write scope can delete a database. ---- -* getCollectionUsage [options] | listLogs [options] -* Get the database activity logs list by its unique ID. ---- -* getDatabaseUsage [options] | help [command] -* display help for command ---- -{% /table %} \ No newline at end of file diff --git a/src/routes/docs/tooling/command-line/functions/+page.markdoc b/src/routes/docs/tooling/command-line/functions/+page.markdoc index 03c6270f31..5e919657a8 100644 --- a/src/routes/docs/tooling/command-line/functions/+page.markdoc +++ b/src/routes/docs/tooling/command-line/functions/+page.markdoc @@ -1,33 +1,27 @@ --- layout: article -title: Deploy databases with CLI 2.0 +title: Deploy functions with CLI 2.0 description: Efficiently deploy your Appwrite functions using the Command-Line Tool (CLI). --- -Create and manage your functions using the CLI 2.0 commands. Setup your Appwrite application using CLI commands [here](/docs/tooling/command-line/installation). +The CLI handles the creation and deployment of Appwrite Functions. Setup your Appwrite application using CLI commands [here](/docs/tooling/command-line/installation). -# Create function {% #create-function %} +# Init function -Create an Appwrite function. See available runtimes for functions [here](https://appwrite.io/docs/products/functions/runtimes#available-runtimes). +You can init your `Appwrite.json` using the `init` command. ```sh -appwrite functions create --functionId 'unique()' --name 'Test' --runtime 'node-18.0' +init appwrite functions ``` -# Update function {% #update-function %} +# Appwrite.json {% #Appwritejson %} -Update your Appwrite function by running the `functions update` command in the folder holding your `appwrite.json` file.. See available runtimes for functions [here](https://appwrite.io/docs/products/functions/runtimes#available-runtimes). +What your `appwrite.json` file should look like. -```sh -appwrite functions update --functionId '628484849201293938d' --name 'testFunction' --runtime 'node-19.0' -``` - -# Delete function {% #delete-function %} - -Delete your Appwrite function by running the `functions delete` command in the folder holding your `appwrite.json` file. - -```sh -appwrite functions delete --functionId '628484849201293938d' +```server-nodejs +{ + "projectId": "heivi192901fjj1c20912" +} ``` # Pull function {% #pull-function %} @@ -44,12 +38,7 @@ appwrite pull functions appwrite push functions ``` -# Appwrite.json {% #Appwritejson %} - -An example of what your `appwrite.json` file should look like. - - -# List {% #list %} +# Commands {% #commands %} The functions command allows you view, create and manage your Cloud Functions. Appwrite database CLI commands generally follow the following syntax: diff --git a/src/routes/docs/tooling/command-line/teams/+page.markdoc b/src/routes/docs/tooling/command-line/teams/+page.markdoc index 0cf9378bd0..1c0c03bc8e 100644 --- a/src/routes/docs/tooling/command-line/teams/+page.markdoc +++ b/src/routes/docs/tooling/command-line/teams/+page.markdoc @@ -1,9 +1,29 @@ --- layout: article -title: Deploy projects with CLI 2.0 +title: Deploy teams with CLI 2.0 description: Efficiently deploy your Appwrite teams using the Command-Line Tool (CLI). --- +The Appwrite CLI can create teams to organize users. Teams can be used to grant access permissions to a group of users. Learn more about permissions. + +# Init teams + +You can init your `Appwrite.json` using the `init` command. + +```sh +init appwrite teams +``` + +# Appwrite.json {% #Appwritejson %} + +What your `appwrite.json` file should look like. + +```server-nodejs +{ + "projectId": "heivi192901fjj1c20912" +} +``` + # Pull teams {% #pull-teams %} ```sh @@ -16,7 +36,7 @@ appwrite pull teams appwrite push teams ``` -# List {% #push-teams %} +# Commands {% #commands %} The teams command allows you to group users of your project and to enable them to share read and write access to your project resources. Appwrite database CLI commands generally follow the following syntax: From 410486b19382655a10d311a38e3ab2fa4e99f5da Mon Sep 17 00:00:00 2001 From: choir27 Date: Wed, 26 Jun 2024 16:56:08 -0400 Subject: [PATCH 12/66] docs: add command table to buckets page --- .../command-line/buckets/+page.markdoc | 100 ++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 src/routes/docs/tooling/command-line/buckets/+page.markdoc diff --git a/src/routes/docs/tooling/command-line/buckets/+page.markdoc b/src/routes/docs/tooling/command-line/buckets/+page.markdoc new file mode 100644 index 0000000000..d526d9b9f3 --- /dev/null +++ b/src/routes/docs/tooling/command-line/buckets/+page.markdoc @@ -0,0 +1,100 @@ +--- +layout: article +title: Deploy buckets with CLI 2.0 +description: Efficiently deploy your Appwrite buckets using the Command-Line Tool (CLI). +--- + + +# Init teams + +You can init your `Appwrite.json` using the `init` command. + +```sh +init appwrite teams +``` + +# Appwrite.json {% #Appwritejson %} + +What your `appwrite.json` file should look like. + +```server-nodejs +{ + "projectId": "heivi192901fjj1c20912" +} +``` + +# Pull teams {% #pull-teams %} + +```sh +appwrite pull teams +``` + +# Push teams + +```sh +appwrite push teams +``` + +# Commands {% #commands %} + +The storage command allows you to manage your project files. Appwrite database CLI commands generally follow the following syntax: + +```sh +appwrite storage [COMMAND] [OPTIONS] +``` + +{% table %} +listBuckets [options] Get a list of all the storage buckets. You can use the query params to + filter your results. + + createBucket [options] Create a new storage bucket. + + getBucket [options] Get a storage bucket by its unique ID. This endpoint response returns + a JSON object with the storage bucket metadata. + + updateBucket [options] Update a storage bucket by its unique ID. + + deleteBucket [options] Delete a storage bucket by its unique ID. + + listFiles [options] Get a list of all the user files. You can use the query params to + filter your results. + + createFile [options] Create a new file. Before using this route, you should create a new + bucket resource using either a [server + integration](https://appwrite.io/docs/server/storage#storageCreateBucket) + API or directly from your Appwrite console. Larger files should be + uploaded using multiple requests with the + [content-range](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Range) + header to send a partial request with a maximum supported chunk of + '5MB'. The 'content-range' header values should always be in bytes. + When the first request is sent, the server will return the **File** + object, and the subsequent part request must include the file's **id** + in 'x-appwrite-id' header to allow the server to know that the partial + upload is for the existing file and not for a new one. If you're + creating a new file using one of the Appwrite SDKs, all the chunking + logic will be managed by the SDK internally. + + getFile [options] Get a file by its unique ID. This endpoint response returns a JSON + object with the file metadata. + + updateFile [options] Update a file by its unique ID. Only users with write permissions have + access to update this resource. + + deleteFile [options] Delete a file by its unique ID. Only users with write permissions have + access to delete this resource. + + getFileDownload [options] Get a file content by its unique ID. The endpoint response return with + a 'Content-Disposition: attachment' header that tells the browser to + start downloading the file to user downloads directory. + + getFilePreview [options] Get a file preview image. Currently, this method supports preview for + image files (jpg, png, and gif), other supported formats, like pdf, + docs, slides, and spreadsheets, will return the file icon image. You + can also pass query string arguments for cutting and resizing your + preview image. Preview is supported only for image files smaller than + 10MB. + + getFileView [options] Get a file content by its unique ID. This endpoint is similar to the + download method but returns with no 'Content-Disposition: attachment' + header. +{% /table %} \ No newline at end of file From f6c0e503e0e5de5103aca1441ff85b92ba6814f5 Mon Sep 17 00:00:00 2001 From: choir27 Date: Thu, 27 Jun 2024 12:48:09 -0400 Subject: [PATCH 13/66] add topics CLI page and update commands table to use code syntax --- .../docs/tooling/command-line/+layout.svelte | 8 + .../command-line/buckets/+page.markdoc | 112 +++++----- .../command-line/collections/+page.markdoc | 10 +- .../command-line/functions/+page.markdoc | 44 ++-- .../tooling/command-line/teams/+page.markdoc | 40 ++-- .../tooling/command-line/topics/+page.markdoc | 191 ++++++++++++++++++ 6 files changed, 302 insertions(+), 103 deletions(-) create mode 100644 src/routes/docs/tooling/command-line/topics/+page.markdoc diff --git a/src/routes/docs/tooling/command-line/+layout.svelte b/src/routes/docs/tooling/command-line/+layout.svelte index abbe6a177c..c595aec82e 100644 --- a/src/routes/docs/tooling/command-line/+layout.svelte +++ b/src/routes/docs/tooling/command-line/+layout.svelte @@ -43,6 +43,14 @@ { label: 'Teams', href: '/docs/tooling/command-line/teams' + }, + { + label: 'Topics', + href: '/docs/tooling/command-line/topics' + }, + { + label: 'Buckets', + href: '/docs/tooling/command-line/buckets' } ] } diff --git a/src/routes/docs/tooling/command-line/buckets/+page.markdoc b/src/routes/docs/tooling/command-line/buckets/+page.markdoc index d526d9b9f3..347be6fbe8 100644 --- a/src/routes/docs/tooling/command-line/buckets/+page.markdoc +++ b/src/routes/docs/tooling/command-line/buckets/+page.markdoc @@ -4,18 +4,19 @@ title: Deploy buckets with CLI 2.0 description: Efficiently deploy your Appwrite buckets using the Command-Line Tool (CLI). --- +The Appwrite CLI allows you to configure and deploy buckets across projects. Setup your Appwrite application using CLI commands [here](/docs/tooling/command-line/installation). -# Init teams +# Init bucket {% #init-bucket %} You can init your `Appwrite.json` using the `init` command. ```sh -init appwrite teams +init appwrite buckets ``` # Appwrite.json {% #Appwritejson %} -What your `appwrite.json` file should look like. +An example of how your `appwrite.json` file should look. ```server-nodejs { @@ -23,13 +24,17 @@ What your `appwrite.json` file should look like. } ``` -# Pull teams {% #pull-teams %} +# Pull bucket {% #pull-bucket %} + +You can pull your Appwrite buckets customizable settings using the `pull` command in the folder holding your `appwrite.json` file. ```sh -appwrite pull teams +appwrite pull buckets ``` -# Push teams +# Push bucket {% #push-bucket %} + +To push the changes you made inside your `appwrite.json` file, use the `push` command in the folder holding your `appwrite.json` file. ```sh appwrite push teams @@ -44,57 +49,46 @@ appwrite storage [COMMAND] [OPTIONS] ``` {% table %} -listBuckets [options] Get a list of all the storage buckets. You can use the query params to - filter your results. - - createBucket [options] Create a new storage bucket. - - getBucket [options] Get a storage bucket by its unique ID. This endpoint response returns - a JSON object with the storage bucket metadata. - - updateBucket [options] Update a storage bucket by its unique ID. - - deleteBucket [options] Delete a storage bucket by its unique ID. - - listFiles [options] Get a list of all the user files. You can use the query params to - filter your results. - - createFile [options] Create a new file. Before using this route, you should create a new - bucket resource using either a [server - integration](https://appwrite.io/docs/server/storage#storageCreateBucket) - API or directly from your Appwrite console. Larger files should be - uploaded using multiple requests with the - [content-range](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Range) - header to send a partial request with a maximum supported chunk of - '5MB'. The 'content-range' header values should always be in bytes. - When the first request is sent, the server will return the **File** - object, and the subsequent part request must include the file's **id** - in 'x-appwrite-id' header to allow the server to know that the partial - upload is for the existing file and not for a new one. If you're - creating a new file using one of the Appwrite SDKs, all the chunking - logic will be managed by the SDK internally. - - getFile [options] Get a file by its unique ID. This endpoint response returns a JSON - object with the file metadata. - - updateFile [options] Update a file by its unique ID. Only users with write permissions have - access to update this resource. - - deleteFile [options] Delete a file by its unique ID. Only users with write permissions have - access to delete this resource. - - getFileDownload [options] Get a file content by its unique ID. The endpoint response return with - a 'Content-Disposition: attachment' header that tells the browser to - start downloading the file to user downloads directory. - - getFilePreview [options] Get a file preview image. Currently, this method supports preview for - image files (jpg, png, and gif), other supported formats, like pdf, - docs, slides, and spreadsheets, will return the file icon image. You - can also pass query string arguments for cutting and resizing your - preview image. Preview is supported only for image files smaller than - 10MB. - - getFileView [options] Get a file content by its unique ID. This endpoint is similar to the - download method but returns with no 'Content-Disposition: attachment' - header. +* Command +* Description +--- +* `listBuckets [options]` +* Get a list of all the storage buckets. You can use the query params to filter your results. +--- +* `createBucket [options]` +* Create a new storage bucket. +--- +* `getBucket [options]` +* Get a storage bucket by its unique ID. This endpoint response returns a JSON object with the storage bucket metadata. +--- +* `updateBucket [options]` +* Update a storage bucket by its unique ID. +--- +* `deleteBucket [options]` +* Delete a storage bucket by its unique ID. +--- +* `listFiles [options]` +* Get a list of all the user files. You can use the query params to filter your results. +--- +* `createFile [options]` +* Create a new file. Before using this route, you should create a new bucket resource using either a [server integration](https://appwrite.io/docs/server/storage#storageCreateBucket) API or directly from your Appwrite console. Larger files should be uploaded using multiple requests with the [content-range](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Range) header to send a partial request with a maximum supported chunk of '5MB'. The 'content-range' header values should always be in bytes. When the first request is sent, the server will return the **File** object, and the subsequent part request must include the file's **id** in 'x-appwrite-id' header to allow the server to know that the partial upload is for the existing file and not for a new one. If you're creating a new file using one of the Appwrite SDKs, all the chunking logic will be managed by the SDK internally. +--- +* `getFile [options]` +* Get a file by its unique ID. This endpoint response returns a JSON object with the file metadata. +--- +* `updateFile [options]` +* Update a file by its unique ID. Only users with write permissions have access to update this resource. +--- +* `deleteFile [options]` +* Delete a file by its unique ID. Only users with write permissions have access to delete this resource. +--- +* `getFileDownload [options]` +* Get a file content by its unique ID. The endpoint response return with a 'Content-Disposition: attachment' header that tells the browser to start downloading the file to user downloads directory. +--- +* `getFilePreview [options]` +* Get a file preview image. Currently, this method supports preview for image files (jpg, png, and gif), other supported formats, like pdf, docs, slides, and spreadsheets, will return the file icon image. You can also pass query string arguments for cutting and resizing your preview image. Preview is supported only for image files smaller than 10MB. +--- +* `getFileView [options]` +* Get a file content by its unique ID. This endpoint is similar to the download method but returns with no 'Content-Disposition: attachment' header. +--- {% /table %} \ No newline at end of file diff --git a/src/routes/docs/tooling/command-line/collections/+page.markdoc b/src/routes/docs/tooling/command-line/collections/+page.markdoc index 5e83eb3361..c4c9406836 100644 --- a/src/routes/docs/tooling/command-line/collections/+page.markdoc +++ b/src/routes/docs/tooling/command-line/collections/+page.markdoc @@ -8,12 +8,12 @@ Create and manage your collections using the CLI 2.0 commands. Setup your Appwri The Appwrite CLI also helps you deploy your project's databases and collections schema from one project to another. -# Init collections +# Init collection {% #init-collection %} You can init your `Appwrite.json` using the `init` command. ```sh -init appwrite collections +init appwrite collection ``` # Appwrite.json {% #Appwritejson %} @@ -26,7 +26,7 @@ What your `appwrite.json` file should look like. } ``` -# Pull collections {% #pull-collection %} +# Pull collection {% #pull-collection %} You can pull your Appwrite collection's and database's customizable settings using the `pull` command in the folder holding your `appwrite.json` file. @@ -34,7 +34,7 @@ You can pull your Appwrite collection's and database's customizable settings usi appwrite pull collections ``` -# Push collection {% #pull-collection %} +# Push collection {% #push-collection %} To push the changes you made inside your `appwrite.json` file, use the `push` command in the folder holding your `appwrite.json` file. @@ -153,4 +153,4 @@ appwrite databases [COMMAND] [OPTIONS] * `listCollectionLogs [options]` * Get the collection activity logs list by its unique ID. --- - {% /table %} +{% /table %} diff --git a/src/routes/docs/tooling/command-line/functions/+page.markdoc b/src/routes/docs/tooling/command-line/functions/+page.markdoc index 5e919657a8..8c35120464 100644 --- a/src/routes/docs/tooling/command-line/functions/+page.markdoc +++ b/src/routes/docs/tooling/command-line/functions/+page.markdoc @@ -6,7 +6,7 @@ description: Efficiently deploy your Appwrite functions using the Command-Line T The CLI handles the creation and deployment of Appwrite Functions. Setup your Appwrite application using CLI commands [here](/docs/tooling/command-line/installation). -# Init function +# Init function {% #init-function %} You can init your `Appwrite.json` using the `init` command. @@ -34,6 +34,8 @@ appwrite pull functions # Push function {% #push-function %} +To push the changes you made inside your `appwrite.json` file, use the `push` command in the folder holding your `appwrite.json` file. + ```sh appwrite push functions ``` @@ -50,64 +52,64 @@ appwrite functions [COMMAND] [OPTIONS] * Command * Description --- -* list [options] +* `list [options]` * Get a list of all the project's functions. You can use the query params to filter your results. --- -* create [options] +* `create [options]` * Create a new function. You can pass a list of [permissions](https://appwrite.io/docs/permissions) to allow different project users or team with access to execute the function using the client API. --- -* listRuntimes +* `listRuntimes` * Get a list of all runtimes that are currently active on your instance. --- -* getUsage [options] | get [options] +* `getUsage [options] | get [options]` * Get a function by its unique ID. --- -* update [options] +* `update [options]` * Update function by its unique ID. --- -* delete [options] +* `delete [options]` * Delete a function by its unique ID. --- -* listDeployments [options] +* `listDeployments [options]` * Get a list of all the project's code deployments. You can use the query params to filter your results. --- -* createDeployment [options] +* `createDeployment [options]` * Create a new function code deployment. Use this endpoint to upload a new version of your code function. To execute your newly uploaded code, you'll need to update the function's deployment to use your new deployment UID. This endpoint accepts a tar.gz file compressed with your code. Make sure to include any dependencies your code has within the compressed file. You can learn more about code packaging in the [Appwrite Cloud Functions tutorial](https://appwrite.io/docs/functions). Use the "command" param to set the entrypoint used to execute your code. --- -* getDeployment [options] +* `getDeployment [options]` * Get a code deployment by its unique ID. --- -* updateDeployment [options] +* `updateDeployment [options]` * Update the function code deployment ID using the unique function ID. Use this endpoint to switch the code deployment that should be executed by the execution endpoint. --- -* deleteDeployment [options] +* `deleteDeployment [options]` * Delete a code deployment by its unique ID. --- -* createBuild [options] | updateDeploymentBuild [options]| downloadDeployment [options] +* `createBuild [options] | updateDeploymentBuild [options]| downloadDeployment [options]` * Get a Deployment's contents by its unique ID. This endpoint supports range requests for partial or streaming file download. --- -* listExecutions [options] +* `listExecutions [options]` * Get a list of all the current user function execution logs. You can use the query params to filter your results. --- -* createExecution [options] +* `createExecution [options]` * Trigger a function execution. The returned object will return you the current execution status. You can ping the 'Get Execution' endpoint to get updates on the current execution status. Once this endpoint is called, your function execution process will start asynchronously. --- -* getExecution [options] +* `getExecution [options]` * Get a function execution log by its unique ID. --- -* getFunctionUsage [options] | listVariables [options] +* `getFunctionUsage [options] | listVariables [options]` * Get a list of all variables of a specific function. --- -* createVariable [options] +* `createVariable [options]` * Create a new function environment variable. These variables can be accessed in the function at runtime as environment variables. --- -* getVariable [options] +* `getVariable [options]` * Get a variable by its unique ID. --- -* updateVariable [options] +* `updateVariable [options]` * Update variable by its unique ID. --- -* deleteVariable [options] +* `deleteVariable [options]` * Delete a variable by its unique ID. --- {% /table %} \ No newline at end of file diff --git a/src/routes/docs/tooling/command-line/teams/+page.markdoc b/src/routes/docs/tooling/command-line/teams/+page.markdoc index 1c0c03bc8e..ad2f0cde4e 100644 --- a/src/routes/docs/tooling/command-line/teams/+page.markdoc +++ b/src/routes/docs/tooling/command-line/teams/+page.markdoc @@ -4,9 +4,9 @@ title: Deploy teams with CLI 2.0 description: Efficiently deploy your Appwrite teams using the Command-Line Tool (CLI). --- -The Appwrite CLI can create teams to organize users. Teams can be used to grant access permissions to a group of users. Learn more about permissions. +The Appwrite CLI can create teams to organize users. Teams can be used to grant access [permissions](https://appwrite.io/docs/products/auth/teams#permissions) to a group of users. Setup your Appwrite application using CLI commands [here](/docs/tooling/command-line/installation). -# Init teams +# Init team {% #init-teams %} You can init your `Appwrite.json` using the `init` command. @@ -24,13 +24,17 @@ What your `appwrite.json` file should look like. } ``` -# Pull teams {% #pull-teams %} +# Pull team {% #pull-teams %} + +You can pull your Appwrite teams customizable settings using the `pull` command in the folder holding your `appwrite.json` file. ```sh appwrite pull teams ``` -# Push teams +# Push team {% #push-teams %} + +To push the changes you made inside your `appwrite.json` file, use the `push` command in the folder holding your `appwrite.json` file. ```sh appwrite push teams @@ -48,46 +52,46 @@ appwrite teams [COMMAND] [OPTIONS] * Command * Description --- -* list [options] +* `list [options]` * Get a list of all the teams in which the current user is a member. You can use the parameters to filter your results. --- -* create [options] +* `create [options]` * Create a new team. The user who creates the team will automatically be assigned as the owner of the team. Only the users with the owner role can invite new members, add new owners and delete or update the team. --- -* get [options] +* `get [options]` * Get a team by its ID. All team members have read access for this resource. --- -* updateName [options] +* `updateName [options]` * Update the team's name by its unique ID. --- -* delete [options] +* `delete [options]` * Delete a team using its ID. Only team members with the owner role can delete the team. --- -* listLogs [options] +* `listLogs [options]` * Get the team activity logs list by its unique ID. --- -* listMemberships [options] +* `listMemberships [options]` * Use this endpoint to list a team's members using the team's ID. All team members have read access to this endpoint. --- -* createMembership [options] +* `createMembership [options]` * Invite a new member to join your team. Provide an ID for existing users, or invite unregistered users using an email or phone number. If initiated from a Client SDK, Appwrite will send an email or sms with a link to join the team to the invited user, and an account will be created for them if one doesn't exist. If initiated from a Server SDK, the new member will be added automatically to the team. You only need to provide one of a user ID, email, or phone number. Appwrite will prioritize accepting the user ID > email > phone number if you provide more than one of these parameters. Use the 'url' parameter to redirect the user from the invitation email to your app. After the user is redirected, use the [Update Team Membership Status](https://appwrite.io/docs/references/cloud/client-web/teams#updateMembershipStatus) endpoint to allow the user to accept the invitation to the team. Please note that to avoid a [Redirect Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) Appwrite will accept the only redirect URLs under the domains you have added as a platform on the Appwrite Console. --- -* getMembership [options] +* `getMembership [options]` * Get a team member by the membership unique id. All team members have read access for this resource. --- -* updateMembership [options] +* `updateMembership [options]` * Modify the roles of a team member. Only team members with the owner role have access to this endpoint. Learn more about [roles and permissions](https://appwrite.io/docs/permissions). --- -* deleteMembership [options] +* `deleteMembership [options]` * This endpoint allows a user to leave a team or for a team owner to delete the membership of any other team member. You can also use this endpoint to delete a user membership even if it is not accepted. --- -* updateMembershipStatus [options] +* `updateMembershipStatus [options]` * Use this endpoint to allow a user to accept an invitation to join a team after being redirected back to your app from the invitation email received by the user. If the request is successful, a session for the user is automatically created. --- -* getPrefs [options] +* `getPrefs [options]` * Get the team's shared preferences by its unique ID. If a preference doesn't need to be shared by all team members, prefer storing them in [user preferences](https://appwrite.io/docs/references/cloud/client-web/account#getPrefs). --- -* updatePrefs [options] +* `updatePrefs [options]` * Update the team's preferences by its unique ID. The object you pass is stored as is and replaces any previous value. The maximum allowed prefs size is 64kB and throws an error if exceeded. --- {% /table %} \ No newline at end of file diff --git a/src/routes/docs/tooling/command-line/topics/+page.markdoc b/src/routes/docs/tooling/command-line/topics/+page.markdoc new file mode 100644 index 0000000000..c9bb57f806 --- /dev/null +++ b/src/routes/docs/tooling/command-line/topics/+page.markdoc @@ -0,0 +1,191 @@ +--- +layout: article +title: Deploy topics with CLI 2.0 +description: Efficiently deploy your Appwrite topics using the Command-Line Tool (CLI). +--- + +# Init topics {% #init-topics %} + +You can init your `Appwrite.json` using the `init` command. + +```sh +init appwrite topics +``` + +# Appwrite.json {% #Appwritejson %} + +What your `appwrite.json` file should look like. + +```server-nodejs +{ + "projectId": "heivi192901fjj1c20912" +} +``` + +# Pull topics {% #pull-topics %} + +You can pull your Appwrite topics customizable settings using the `pull` command in the folder holding your `appwrite.json` file. + +```sh +appwrite pull topics +``` + +# Push topics {% #push-topics %} + +To push the changes you made inside your `appwrite.json` file, use the `push` command in the folder holding your `appwrite.json` file. + +```sh +appwrite push topics +``` + +# Commands {% #commands %} + +The messaging command allows you to send messages. Appwrite database CLI commands generally follow the following syntax: + +```sh +appwrite messaging [COMMAND] [OPTIONS] +``` + +{% table %} +* Command +* Description +--- +* `listMessages [options]` +* Get a list of all messages from the current Appwrite project. +--- +* `createEmail [options]` +* Create a new email message. +--- +* `updateEmail [options]` +* Update an email message by its unique ID. +--- +* `createPush [options]` +* Create a new push notification. +--- +* `updatePush [options]` +* Update a push notification by its unique ID. +--- +* `createSms [options]` +* Create a new SMS message. +--- +* `updateSms [options]` +* Update an email message by its unique ID. +--- +* `getMessage [options]` +* Get a message by its unique ID. +--- +* `delete [options]` +* Delete a message. If the message is not a draft or scheduled, but has been sent, this will not recall the message. +--- +* `listMessageLogs [options]` +* Get the message activity logs listed by its unique ID. +--- +* `listTargets [options]` +* Get a list of the targets associated with a message. +--- +* `listProviders [options]` +* Get a list of all providers from the current Appwrite project. +--- +* `createApnsProvider [options]` +* Create a new Apple Push Notification service provider. +--- +* updateApnsProvider [options] +* Update a Apple Push Notification service provider by its unique ID. +--- +* `createFcmProvider [options]` +* Create a new Firebase Cloud Messaging provider. +--- +* `updateFcmProvider [options]` +* Update a Firebase Cloud Messaging provider by its unique ID. +--- +* `createMailgunProvider [options]` +* Create a new Mailgun provider. +--- +* `updateMailgunProvider [options]` +* Update a Mailgun provider by its unique ID. +--- +* `createMsg91Provider [options]` +* Create a new MSG91 provider. +--- +* `updateMsg91Provider [options]` +* Update a MSG91 provider by its unique ID. +--- +* `createSendgridProvider [options]` +* Create a new Sendgrid provider. +--- +* `updateSendgridProvider [options]` +* Update a Sendgrid provider by its unique ID. +--- +* `createSmtpProvider [options]` +* Create a new SMTP provider. +--- +* `updateSmtpProvider [options]` +* Update a SMTP provider by its unique ID. +--- +* `createTelesignProvider [options]` +* Create a new Telesign provider. +--- +* `updateTelesignProvider [options]` +* Update a Telesign provider by its unique ID. +--- +* `createTextmagicProvider [options]` +* Create a new Textmagic provider. +--- +* `updateTextmagicProvider [options]` +* Update a Textmagic provider by its unique ID. +--- +* `createTwilioProvider [options]` +* Create a new Twilio provider. +--- +* `updateTwilioProvider [options]` +* Update a Twilio provider by its unique ID. +--- +* `createVonageProvider [options]` +* Create a new Vonage provider. +--- +* `updateVonageProvider [options]` +* Update a Vonage provider by its unique ID. +--- +* `getProvider [options]` +* Get a provider by its unique ID. +--- +* `deleteProvider [options]` +* Delete a provider by its unique ID. +--- +* `listProviderLogs [options]` +* Get the provider activity logs listed by its unique ID. +--- +* `listSubscriberLogs [options]` +* Get the subscriber activity logs listed by its unique ID. +--- +* `listTopics [options]` +* Get a list of all topics from the current Appwrite project. +--- +* `createTopic [options]` +* Create a new topic. +--- +* `getTopic [options]` +* Get a topic by its unique ID. +--- +* `updateTopic [options]` +* Update a topic by its unique ID. +--- +* `deleteTopic [options]` +* Delete a topic by its unique ID. +--- +* `listTopicLogs [options]` +* Get the topic activity logs listed by its unique ID. +--- +* `listSubscribers [options]` +* Get a list of all subscribers from the current Appwrite project. +--- +* `createSubscriber [options]` +* Create a new subscriber. +--- +* `getSubscriber [options]` +* Get a subscriber by its unique ID. +--- +* `deleteSubscriber [options]` +* Delete a subscriber by its unique ID. +--- +{% /table %} \ No newline at end of file From f5412307887caf93e9d8ee6bd9d1148a2c732ba2 Mon Sep 17 00:00:00 2001 From: choir27 Date: Thu, 27 Jun 2024 13:03:55 -0400 Subject: [PATCH 14/66] docs: add project docs and update side bar navigation --- .../command-line/projects/+page.markdoc | 60 +++++++++++++++++++ .../tooling/command-line/teams/+page.markdoc | 4 +- 2 files changed, 62 insertions(+), 2 deletions(-) create mode 100644 src/routes/docs/tooling/command-line/projects/+page.markdoc diff --git a/src/routes/docs/tooling/command-line/projects/+page.markdoc b/src/routes/docs/tooling/command-line/projects/+page.markdoc new file mode 100644 index 0000000000..92687a0151 --- /dev/null +++ b/src/routes/docs/tooling/command-line/projects/+page.markdoc @@ -0,0 +1,60 @@ +--- +layout: article +title: Deploy project with CLI 2.0 +description: Efficiently deploy your Appwrite project using the Command-Line Tool (CLI). +--- + +After you're logged in, the CLI needs to be initialized with your Appwrite project. + +# Init project {% #init-project %} + +You can init your `Appwrite.json` using the `init` command. + +```sh +init appwrite project +``` + +# Appwrite.json {% #Appwritejson %} + +What your `appwrite.json` file should look like. + +```server-nodejs +{ + "projectId": "heivi192901fjj1c20912" +} +``` + +# Pull project {% #pull-project %} + +You can pull your Appwrite projects customizable settings using the `pull` command in the folder holding your `appwrite.json` file. + +```sh +appwrite pull project +``` + +# Push project {% #push-project %} + +To push the changes you made inside your `appwrite.json` file, use the `push` command in the folder holding your `appwrite.json` file. + +```sh +appwrite push project +``` + +# Commands {% #commands %} + +The project command is for overall project administration. Appwrite database CLI commands generally follow the following syntax: + +```sh +appwrite project [COMMAND] [OPTIONS] +``` + + getUsage [options] + listVariables Get a list of all project variables. These variables will be accessible + in all Appwrite Functions at runtime. + createVariable [options] Create a new project variable. This variable will be accessible in all + Appwrite Functions at runtime. + getVariable [options] Get a project variable by its unique ID. + updateVariable [options] Update project variable by its unique ID. This variable will be + accessible in all Appwrite Functions at runtime. + deleteVariable [options] Delete a project variable by its unique ID. + help [command] display help for command \ No newline at end of file diff --git a/src/routes/docs/tooling/command-line/teams/+page.markdoc b/src/routes/docs/tooling/command-line/teams/+page.markdoc index ad2f0cde4e..3c4062953b 100644 --- a/src/routes/docs/tooling/command-line/teams/+page.markdoc +++ b/src/routes/docs/tooling/command-line/teams/+page.markdoc @@ -6,7 +6,7 @@ description: Efficiently deploy your Appwrite teams using the Command-Line Tool The Appwrite CLI can create teams to organize users. Teams can be used to grant access [permissions](https://appwrite.io/docs/products/auth/teams#permissions) to a group of users. Setup your Appwrite application using CLI commands [here](/docs/tooling/command-line/installation). -# Init team {% #init-teams %} +# Init team {% #init-team %} You can init your `Appwrite.json` using the `init` command. @@ -24,7 +24,7 @@ What your `appwrite.json` file should look like. } ``` -# Pull team {% #pull-teams %} +# Pull team {% #pull-team %} You can pull your Appwrite teams customizable settings using the `pull` command in the folder holding your `appwrite.json` file. From f34a68d00cb4c0a67ed1f1fe2f5fbaf57b1ff4cb Mon Sep 17 00:00:00 2001 From: choir27 Date: Fri, 28 Jun 2024 11:34:00 -0400 Subject: [PATCH 15/66] docs: delete deployment page to remove redundancy from deployment docs: functions, buckets, collections, projects, teams and topics. rename list to commands in commands docs. --- .../docs/tooling/command-line/+layout.svelte | 4 - .../command-line/commands/+page.markdoc | 4 +- .../command-line/deployment/+page.markdoc | 163 ------------------ 3 files changed, 2 insertions(+), 169 deletions(-) delete mode 100644 src/routes/docs/tooling/command-line/deployment/+page.markdoc diff --git a/src/routes/docs/tooling/command-line/+layout.svelte b/src/routes/docs/tooling/command-line/+layout.svelte index c595aec82e..c9cb16817a 100644 --- a/src/routes/docs/tooling/command-line/+layout.svelte +++ b/src/routes/docs/tooling/command-line/+layout.svelte @@ -19,10 +19,6 @@ label: 'Commands', href: '/docs/tooling/command-line/commands' }, - { - label: 'Deployment', - href: '/docs/tooling/command-line/deployment' - }, { label: 'Non interactive', href: '/docs/tooling/command-line/non-interactive' diff --git a/src/routes/docs/tooling/command-line/commands/+page.markdoc b/src/routes/docs/tooling/command-line/commands/+page.markdoc index 8075c35a6b..ee7861c128 100644 --- a/src/routes/docs/tooling/command-line/commands/+page.markdoc +++ b/src/routes/docs/tooling/command-line/commands/+page.markdoc @@ -12,7 +12,7 @@ Commands follows the following general syntax: appwrite [COMMAND] [OPTIONS] ``` -# List {% #list %} +# Commands {% #commands %} Below is a list of the available commands in the Appwrite CLI. You can get more information on each command by running `appwrite [COMMAND] --help`. @@ -140,7 +140,7 @@ appwrite users list ## List collections {% #list-collections %} -To get a list of all your collections, you can use the listCollections command. +To get a list of all your [collections](/docs/tooling/command-line/collections), you can use the listCollections command. ```sh appwrite databases listCollections --databaseId [DATABASE_ID] diff --git a/src/routes/docs/tooling/command-line/deployment/+page.markdoc b/src/routes/docs/tooling/command-line/deployment/+page.markdoc deleted file mode 100644 index 912e028408..0000000000 --- a/src/routes/docs/tooling/command-line/deployment/+page.markdoc +++ /dev/null @@ -1,163 +0,0 @@ ---- -layout: article -title: Deployment -description: Efficiently deploy your Appwrite projects using the Command-Line Tool (CLI). Explore deployment options, strategies, and best practices for a smooth deployment process. ---- - -The Apprite CLI allows you to create and deploy databases, collections, buckets, teams and functions to your Appwrite project from a configuration file. This is especially helpful if you're trying to track project setup using version control. - -# Initialization {% #initialization %} - -After you're logged in, the CLI needs to be initialized with your Appwrite project. You can initialize the CLI using: - -```sh -appwrite init project -``` - -The following prompts will guide you through the setup process. The init command also creates an [appwrite.json](/docs/tooling/command-line/deployment#appwrite-json) file representing your Appwrite project. - -You can fetch all the existing databases and collections in your current project using: - -```sh -appwrite init collection -``` - -You can fetch all the existing teams in your current project using: - -```sh -appwrite init team -``` - -# Deploying Functions {% #deploying-function %} - -The CLI also handles the creation and deployment of Appwrite Functions. Run this command in the folder holding your `appwrite.json` file. - -```sh -appwrite init function -? What would you like to name your function? My Awesome Function -? What runtime would you like to use? Node.js (node-15.5) -✓ Success -``` - -This command creates a new function **My Awesome Function** in your current Appwrite project and also creates a template function for you to get started. - -You can now deploy this function by running this command in the folder holding your `appwrite.json` file. - -```sh -appwrite deploy function -? Which functions would you like to deploy? Awesome Function (621229798628cf5bf712) -ℹ Info Deploying function Awesome Function ( 621229798628cf5bf712 ) -✓ Success Deployed Awesome Function ( 621229798628cf5bf712 ) -``` - -# Deploying Collections {% #deploying-collections %} - -The Appwrite CLI also helps you deploy your project's databases and collections schema from one project to another. - -You can deploy all the databases and collections in your [appwrite.json](/docs/tooling/command-line/deployment#appwrite-json) file by running this command in the folder holding your `appwrite.json` file. - -The deploy command will overwrite existing collections causing existing data to be lost. If you already have data in your project, you will need to write your own migration script using a Server SDK instead of using the CLI. - -```sh -appwrite deploy collection -``` - -# Deploying Teams {% #deploying-teams %} - -The Appwrite CLI can create teams to organize users. Teams can be used to grant access permissions to a group of users. Learn more about permissions. - -Deploy teams by running this command in the folder holding your `appwrite.json` file. - -```sh -appwrite deploy team -``` - -# Deploying Storage {% #deploying-storage %} - -The Appwrite CLI allows you to configure and deploy buckets across projects. All the bucket's settings are available through the [appwrite.json](/docs/tooling/command-line/deployment#appwrite-json) file. - -Deploy storage buckets by running this command in the folder holding your `appwrite.json` file. - -```sh -appwrite deploy bucket -``` - -# Conflicts {% #conflicts %} - -When using `appwrite.json`, changes made in the Appwrite Console can cause conflicts with the local config. To avoid conflicts, prefer updating configuration locally and deploying instead of using the Console. - -# The appwrite.json file {% #appwrite-json %} - -An `appwrite.json` file is created by the CLI when you initialize your project. It stores all the configuration for the CLI to be able to interact with your Appwrite project in JSON format. When using the `appwrite deploy` command, the CLI uses information from `appwrite.json` to deploy your functions and collections. - -## Configuration {% #configuration %} - -Here's a complete list of all configurable options in `appwrite.json`: - -| Option | Type | Description | -| --- | --- | --- | -| `projectId` | string | ID of your Appwrite Project. | -| `projectName` | string | Name of your Appwrite Project. | -| `functions` | array of functions | Configuration of functions in your project. | -| `databases` | array of databases | Configuration of databases in your project. | -| `collections` | array of collections | Configuration of collections in your project. | -| `teams` | array of teams | Configuration of teams in your project. | -| `buckets` | array of buckets | Configuration of teams in your project. | - -### Function options {% #function-options %} - -| Option | Type | Description | -| --- | --- | --- | -| `$id` | string | Function ID. | -| `name` | string | Function Name. | -| `runtime` | string | Function runtime, must be enabled. [Learn more about runtimes](/docs/products/functions/runtimes#available-runtimes). | -| `path` | string | Path to folder containing the function's source code. | -| `entrypoint` | string | Entry point of the function relative to the folder specified in path. | -| `ignore` | array of strings | Files from your source code that should be ignored when creating a deployment. | -| `execute` | array of strings | Grants execute permissions to users. [Learn more about role strings](/docs/apis/rest#permissions). | -| `events` | array of strings | Events that trigger the function to execute. [Learn more about events](/docs/advanced/platform/events). | -| `schedule` | string | Execute schedule for the function. [Learn more about scheduled executions](/docs/products/functions/execute#schedule). | -| `timeout` | int | Execution timeout of the function in seconds, with a maximum configurable limit of 900 seconds. | -| `variables` | JSON object | Variables provided to the function on execution stored as a key-value JSON object. | - -### Databases options {% #database-options %} - -| Option | Type | Description | -| --- | --- | --- | -| `$id` | string | Database ID. | -| `name` | string | Database Name. | - -### Collection options {% #collection-options %} - -| Option | Type | Description | -| --- | --- | --- | -| `$id` | string | Collection ID. | -| `name` | string | Collection Name. | -| `databaseId` | string | ID of the database to which this collection belongs. | -| `enabled` | bool | If the collection is enabled. | -| `documentSecurity` | bool | If access permissions can be defined at the document level. | -| `$permissions` | array of strings | Grants access permissions to users at the collection level. [Learn more about permissions](/docs/apis/rest#permissions). | -| `attributes` | array of objects | Defines a list of attributes in the collection. [Learn more about the Attributes List Object](/docs/references/cloud/models/attributeList). | -| `indexes` | array of objects | Defines a list of indexes in the collection. [Learn more about the Indexes List Object](/docs/references/cloud/models/indexList). | - -### Buckets options {% #bucket-options %} - -| Option | Type | Description | -| --- | --- | --- | -| `$id` | string | Bucket ID. | -| `name` | string | Bucket Name. | -| `$permissions` | array of strings | Grants access permissions to users at the bucket level. [Learn more about permissions](/docs/apis/rest#permissions). | -| `fileSecurity` | boolean | Whether file-level security is enabled. [Learn more about permissions](/docs/apis/rest#permissions). | -| `enabled` | boolean | Whether the bucket is enabled or disabled. | -| `maximumFileSize` | integer | Maximum file size supported. | -| `allowedFileExtensions` | string\[\] | List of allowed file extensions. | -| `compression` | string | Preferred algorithm for compression. Will be one of `none`, `gzip`, or `zstd`. | -| `encryption` | boolean | Whether the bucket's content is encrypted. | -| `antivirus` | boolean | Whether virus scanning is enabled for the bucket's content. | - -### Teams options {% #team-options %} - -| Option | Type | Description | -| --- | --- | --- | -| `$id` | string | Team ID. | -| `name` | string | Team Name. | From 5cf3f9fb6c7de5d2e8e614d381c11b7c8ed2784d Mon Sep 17 00:00:00 2001 From: choir27 Date: Fri, 28 Jun 2024 11:45:43 -0400 Subject: [PATCH 16/66] docs: update non-interactive page with github actions --- .../command-line/non-interactive/+page.markdoc | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/routes/docs/tooling/command-line/non-interactive/+page.markdoc b/src/routes/docs/tooling/command-line/non-interactive/+page.markdoc index 89d9fec794..6a04beb2e7 100644 --- a/src/routes/docs/tooling/command-line/non-interactive/+page.markdoc +++ b/src/routes/docs/tooling/command-line/non-interactive/+page.markdoc @@ -19,9 +19,16 @@ In this mode, the CLI can only interact with one project at a time. # API Keys {% #api-keys %} In non-interactive mode, the CLI uses an API key to authenticate. Your API key must have sufficient permissions to execute the commands you plan to use. [Learn more about API Keys](/docs/advanced/platform/api-keys). -# Github Actions {% #github-actions %} +# Providers {% #providers %} -gitlab, travis, genkins +{% table %} +* Name +* Description +--- +* Github actions {% #github-actions %} +* You can add your CLI to [Github actions](https://github.com/appwrite/setup-for-actions/tree/feat-cli-g2?tab=readme-ov-file#introduction) to automate your Appwrite CLI commands instead of manually using them. + +{% /table %} # Deployment {% #deployment %} Appwrite's deploy commands can also be executed in a non-interactive mode. This applies to both function and collection deployment. From fb292204b034e22533a2bb056a225fac4db95df9 Mon Sep 17 00:00:00 2001 From: choir27 Date: Fri, 28 Jun 2024 11:51:55 -0400 Subject: [PATCH 17/66] docs: add table of CLI option commands to commands page --- .../command-line/commands/+page.markdoc | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/src/routes/docs/tooling/command-line/commands/+page.markdoc b/src/routes/docs/tooling/command-line/commands/+page.markdoc index ee7861c128..2ba995e0c3 100644 --- a/src/routes/docs/tooling/command-line/commands/+page.markdoc +++ b/src/routes/docs/tooling/command-line/commands/+page.markdoc @@ -104,6 +104,39 @@ Below is a list of the available commands in the Appwrite CLI. You can get more {% /table %} +{% table %} +# Options {% #options %} + +* Command +* Description +--- +* `-v, --version` +* output the version number +--- +* `-V, --verbose` +* Show complete error log +--- +* `-j, --json` +* Output in JSON format +--- +* `-f,--force` +* Flag to confirm all warnings +--- +* `-a,--all` +* Flag to push all resources +--- +* `--id [id...]` +* Flag to pass list of ids for a giving action +--- +* `--report` +* Enable reporting in case of CLI errors +--- +* `-h, --help` +* display help for command +--- +{% /table %} + + # Verbose {% #verbose %} In case of errors with any command, you can get more information about what went wrong using the `--verbose` flag From 4c8d3ee077e16030a72e8ac629e67216b63dc5af Mon Sep 17 00:00:00 2001 From: choir27 Date: Fri, 28 Jun 2024 13:08:16 -0400 Subject: [PATCH 18/66] docs: add CLI links to collections, functions, topics, buckets, and teams pages --- src/routes/docs/products/auth/teams/+page.markdoc | 4 ++++ src/routes/docs/products/databases/collections/+page.markdoc | 4 ++++ src/routes/docs/products/functions/deployments/+page.markdoc | 4 ++++ src/routes/docs/products/messaging/topics/+page.markdoc | 3 +++ src/routes/docs/products/storage/buckets/+page.markdoc | 2 +- 5 files changed, 16 insertions(+), 1 deletion(-) diff --git a/src/routes/docs/products/auth/teams/+page.markdoc b/src/routes/docs/products/auth/teams/+page.markdoc index 004ab97a03..cc599956b3 100644 --- a/src/routes/docs/products/auth/teams/+page.markdoc +++ b/src/routes/docs/products/auth/teams/+page.markdoc @@ -187,6 +187,10 @@ val response = teams.createMembership( {% /multicode %} +# CLI {% #CLI %} + +Invite members and create teams using the [**CLI**](/docs/tooling/command-line/installation), which allows you to perform server-side tasks using the terminal. Using the [CLI commands](/docs/tooling/command-line/teams), you would only need a single text command to invite members to your team or create a team. + # Permissions {% #permissions %} You can grant permissions to all members of a team using the `Role.team()` role or diff --git a/src/routes/docs/products/databases/collections/+page.markdoc b/src/routes/docs/products/databases/collections/+page.markdoc index 8188af32d7..36dd4b2653 100644 --- a/src/routes/docs/products/databases/collections/+page.markdoc +++ b/src/routes/docs/products/databases/collections/+page.markdoc @@ -274,3 +274,7 @@ The following indexes are currently supported: | `fulltext` | For searching within string attributes. Required for the [search query method](/docs/products/databases/queries#query-class). | You can create an index by navigating to your collection's **Indexes** tab or by using your favorite [Server SDK](/docs/sdks#server). + +# CLI {% #cli %} + +Your collections can be created, edited, or deleted from your terminal using the Appwrite [**CLI**](http://localhost:5173/docs/tooling/command-line/installation). Use [CLI commands](http://localhost:5173/docs/tooling/command-line/collections) to manage your collections and deploy its schema from one project to another. \ No newline at end of file diff --git a/src/routes/docs/products/functions/deployments/+page.markdoc b/src/routes/docs/products/functions/deployments/+page.markdoc index f4d56b1053..ea4c4e3074 100644 --- a/src/routes/docs/products/functions/deployments/+page.markdoc +++ b/src/routes/docs/products/functions/deployments/+page.markdoc @@ -46,3 +46,7 @@ After updating the configuration, redeploy your function for changes to take eff 4. Redeploy by clicking the triple-dots beside an execution, and hitting the **Redeploy** button. Redeployment behavior varies depending on how the initial deployment was created. + +# CLI {% #CLI %} + +Use the Appwrite [**CLI**](/docs/tooling/command-line/installation) to deploy your functions. Create your functions with a runtime template with just one [CLI command](/docs/tooling/command-line/functions). \ No newline at end of file diff --git a/src/routes/docs/products/messaging/topics/+page.markdoc b/src/routes/docs/products/messaging/topics/+page.markdoc index b7c6fde24f..669b132aac 100644 --- a/src/routes/docs/products/messaging/topics/+page.markdoc +++ b/src/routes/docs/products/messaging/topics/+page.markdoc @@ -266,6 +266,9 @@ let topic = try await messaging.createTopic( {% /tabsitem %} {% /tabs %} +# CLI {% #CLI %} +You can also create topics with Appwrite **CLI** using the [CLI commands](/docs/tooling/command-line/topics), as well as configure with your messaging. Using the [**CLI**](/docs/tooling/command-line/installation), you can `pull` your topics schema from your project, customize your `appwrite.json` file, and `push` your changes back into your project. + # Permissions {% #permissions %} Before you can subscribe to a topic, a user needs the appropriate permission. You can set permission by navigating to **Messaging** > **Topics** > select a topic to configure > **Subscription access**. diff --git a/src/routes/docs/products/storage/buckets/+page.markdoc b/src/routes/docs/products/storage/buckets/+page.markdoc index 60836757f0..02b4d90e97 100644 --- a/src/routes/docs/products/storage/buckets/+page.markdoc +++ b/src/routes/docs/products/storage/buckets/+page.markdoc @@ -8,7 +8,7 @@ Storage buckets are a group of files, similar to collections in Appwrite Databas Buckets let you limit file size and extensions, whether or not to encrypt the files, and more. # Create Bucket {% #create-bucket %} -You can create your bucket from the Appwrite Console or a [Server SDK](/docs/sdks#server). +You can create your bucket from the Appwrite Console or a [Server SDK](/docs/sdks#server). Buckets can be created using the [CLI](/docs/tooling/command-line/installation) too, only requiring a single [command](/docs/tooling/command-line/buckets) to create buckets and more. {% tabs %} {% tabsitem #console title="Console" %} From 30795585e8e5066110eace89ac7cae443bd38fed Mon Sep 17 00:00:00 2001 From: choir27 Date: Fri, 28 Jun 2024 13:17:40 -0400 Subject: [PATCH 19/66] chore: delete appwrite.json file --- appwrite.json | 3 --- 1 file changed, 3 deletions(-) delete mode 100644 appwrite.json diff --git a/appwrite.json b/appwrite.json deleted file mode 100644 index 05679c97de..0000000000 --- a/appwrite.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "projectId": "6679b067d22e72b9731a" -} \ No newline at end of file From 12af27c7a4cb8c6eb52ebd83cd5c5e3017b4c08e Mon Sep 17 00:00:00 2001 From: choir27 Date: Fri, 28 Jun 2024 13:21:05 -0400 Subject: [PATCH 20/66] docs: add clarification on previous version of CLI compatability, remove extra spaces, and fix usage of the word an --- .../docs/tooling/command-line/installation/+page.markdoc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/routes/docs/tooling/command-line/installation/+page.markdoc b/src/routes/docs/tooling/command-line/installation/+page.markdoc index 92232c1029..bab1b09100 100644 --- a/src/routes/docs/tooling/command-line/installation/+page.markdoc +++ b/src/routes/docs/tooling/command-line/installation/+page.markdoc @@ -8,9 +8,9 @@ The [Appwrite CLI](https://github.com/appwrite/sdk-for-cli) is a command-line ap # Installation {% #Installation %} -The CLI is packaged both as an [npm module](https://www.npmjs.com/package/appwrite-cli) as well as a [standalone binary](https://github.com/appwrite/sdk-for-cli/releases/latest) for your operating system, making it completely dependency free, platform independent and language agnostic. +The CLI is packaged both as a [npm module](https://www.npmjs.com/package/appwrite-cli) as well as a [standalone binary](https://github.com/appwrite/sdk-for-cli/releases/latest) for your operating system, making it completely dependency free, platform independent and language agnostic. -If you plan to use the CLI to initialize new Appwrite Functions, ensure that [Git is installed](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) on your machine. +If you plan to use the CLI to initialize new Appwrite Functions, ensure that [Git is installed](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) on your machine. ## Install with npm {% #install-with-npm %} @@ -85,7 +85,7 @@ appwrite client --selfSigned true {% /info %} {% info title="Correct CLI Version Required" %} -All commands only work with **version 2.0** of the CLI. Install [here](https://www.npmjs.com/package/appwrite-cli-beta). +All commands only work with **version 2.0** of the CLI, and will **not** work on previous versions. Install [here](https://www.npmjs.com/package/appwrite-cli-beta). {% /info %} ## Next steps {% #next-steps %} From f64620b6e04f609a7875d5d33a5d0c28463706a1 Mon Sep 17 00:00:00 2001 From: choir27 Date: Fri, 28 Jun 2024 14:28:56 -0400 Subject: [PATCH 21/66] move appwrite.json after pull, move init project appwrite.json to install, add init project to installation docs --- src/redirects.json | 4 - .../docs/products/auth/teams/+page.markdoc | 2 +- .../functions/deploy-manually/+page.markdoc | 2 +- .../docs/tooling/command-line/+layout.svelte | 4 + .../command-line/buckets/+page.markdoc | 18 ---- .../command-line/collections/+page.markdoc | 18 ---- .../command-line/functions/+page.markdoc | 95 +++++++++++++++---- .../command-line/installation/+page.markdoc | 20 +++- .../command-line/projects/+page.markdoc | 47 ++++----- .../tooling/command-line/teams/+page.markdoc | 18 ---- .../tooling/command-line/topics/+page.markdoc | 20 +--- 11 files changed, 119 insertions(+), 129 deletions(-) diff --git a/src/redirects.json b/src/redirects.json index 93661701ff..ef632e69eb 100644 --- a/src/redirects.json +++ b/src/redirects.json @@ -55,10 +55,6 @@ "link": "/docs/command-line", "redirect": "/docs/tooling/command-line/installation" }, - { - "link": "/docs/command-line-deployment", - "redirect": "/docs/tooling/command-line/deployment" - }, { "link": "/docs/command-line-commands", "redirect": "/docs/tooling/command-line/commands" diff --git a/src/routes/docs/products/auth/teams/+page.markdoc b/src/routes/docs/products/auth/teams/+page.markdoc index cc599956b3..89865c7fc6 100644 --- a/src/routes/docs/products/auth/teams/+page.markdoc +++ b/src/routes/docs/products/auth/teams/+page.markdoc @@ -189,7 +189,7 @@ val response = teams.createMembership( # CLI {% #CLI %} -Invite members and create teams using the [**CLI**](/docs/tooling/command-line/installation), which allows you to perform server-side tasks using the terminal. Using the [CLI commands](/docs/tooling/command-line/teams), you would only need a single text command to invite members to your team or create a team. +Invite members and create teams using the [**CLI**](/docs/tooling/command-line/installation), which allows you to perform server-side tasks using the terminal. You can invite members to your team or create a team with only a single text command using the [CLI commands](/docs/tooling/command-line/teams). # Permissions {% #permissions %} diff --git a/src/routes/docs/products/functions/deploy-manually/+page.markdoc b/src/routes/docs/products/functions/deploy-manually/+page.markdoc index 7ddd230754..f4a31a27c3 100644 --- a/src/routes/docs/products/functions/deploy-manually/+page.markdoc +++ b/src/routes/docs/products/functions/deploy-manually/+page.markdoc @@ -37,7 +37,7 @@ If you made changes in the Appwrite Console that are different from your `appwri If you need to target a different project, API endpoint, change the path or entry point of your function, or update any of the other configuration options, you can do so by editing the `appwrite.json` file. -{% arrow_link href="/docs/tooling/command-line/deployment#function-options" %} +{% arrow_link href="/docs/tooling/command-line/functions" %} Learn more about appwrite.json {% /arrow_link %} diff --git a/src/routes/docs/tooling/command-line/+layout.svelte b/src/routes/docs/tooling/command-line/+layout.svelte index c9cb16817a..c881f8b21e 100644 --- a/src/routes/docs/tooling/command-line/+layout.svelte +++ b/src/routes/docs/tooling/command-line/+layout.svelte @@ -28,6 +28,10 @@ { label: 'Deployments', items: [ + { + label: 'Projects', + href: '/docs/tooling/command-line/projects' + }, { label: 'Collections', href: '/docs/tooling/command-line/collections' diff --git a/src/routes/docs/tooling/command-line/buckets/+page.markdoc b/src/routes/docs/tooling/command-line/buckets/+page.markdoc index 347be6fbe8..25966a6bdc 100644 --- a/src/routes/docs/tooling/command-line/buckets/+page.markdoc +++ b/src/routes/docs/tooling/command-line/buckets/+page.markdoc @@ -6,24 +6,6 @@ description: Efficiently deploy your Appwrite buckets using the Command-Line Too The Appwrite CLI allows you to configure and deploy buckets across projects. Setup your Appwrite application using CLI commands [here](/docs/tooling/command-line/installation). -# Init bucket {% #init-bucket %} - -You can init your `Appwrite.json` using the `init` command. - -```sh -init appwrite buckets -``` - -# Appwrite.json {% #Appwritejson %} - -An example of how your `appwrite.json` file should look. - -```server-nodejs -{ - "projectId": "heivi192901fjj1c20912" -} -``` - # Pull bucket {% #pull-bucket %} You can pull your Appwrite buckets customizable settings using the `pull` command in the folder holding your `appwrite.json` file. diff --git a/src/routes/docs/tooling/command-line/collections/+page.markdoc b/src/routes/docs/tooling/command-line/collections/+page.markdoc index c4c9406836..5ac10c5257 100644 --- a/src/routes/docs/tooling/command-line/collections/+page.markdoc +++ b/src/routes/docs/tooling/command-line/collections/+page.markdoc @@ -8,24 +8,6 @@ Create and manage your collections using the CLI 2.0 commands. Setup your Appwri The Appwrite CLI also helps you deploy your project's databases and collections schema from one project to another. -# Init collection {% #init-collection %} - -You can init your `Appwrite.json` using the `init` command. - -```sh -init appwrite collection -``` - -# Appwrite.json {% #Appwritejson %} - -What your `appwrite.json` file should look like. - -```server-nodejs -{ - "projectId": "heivi192901fjj1c20912" -} -``` - # Pull collection {% #pull-collection %} You can pull your Appwrite collection's and database's customizable settings using the `pull` command in the folder holding your `appwrite.json` file. diff --git a/src/routes/docs/tooling/command-line/functions/+page.markdoc b/src/routes/docs/tooling/command-line/functions/+page.markdoc index 8c35120464..416647d4ad 100644 --- a/src/routes/docs/tooling/command-line/functions/+page.markdoc +++ b/src/routes/docs/tooling/command-line/functions/+page.markdoc @@ -6,32 +6,89 @@ description: Efficiently deploy your Appwrite functions using the Command-Line T The CLI handles the creation and deployment of Appwrite Functions. Setup your Appwrite application using CLI commands [here](/docs/tooling/command-line/installation). -# Init function {% #init-function %} +# Pull function {% #pull-function %} -You can init your `Appwrite.json` using the `init` command. +You can pull your Appwrite functions customizable settings using the `pull` command in the folder holding your `appwrite.json` file. ```sh -init appwrite functions +appwrite pull functions ``` -# Appwrite.json {% #Appwritejson %} - -What your `appwrite.json` file should look like. +# Appwrite.json {% #appwritejson %} -```server-nodejs +After pulling your Appwrite function, your `Appwrite.json` file should look similar to the following: +``` { - "projectId": "heivi192901fjj1c20912" + "projectId": , + "functions": [ + { + "$id": "", + "$createdAt": "2024-04-22T22:29:31.427+00:00", + "$updatedAt": "2024-06-26T19:08:26.582+00:00", + "execute": [ + "any" + ], + "name": "userAuth", + "enabled": true, + "live": true, + "logging": true, + "runtime": "node-18.0", + "deployment": "5df5acd0d48c2", + "vars": [ + { + "$id": "eyJhbGciOiJIUzI1N", + "$createdAt": "2024-04-22T22:51:51.745+00:00", + "$updatedAt": "2024-04-23T00:13:10.886+00:00", + "key": "X_Appwrite_Key", + "value": "", + "resourceType": "function", + "resourceId": "eyJhbGciOiJIUzI1N" + }, + { + "$id": "N1IzUIJiOicGbhJye", + "$createdAt": "2024-04-22T23:32:12.901+00:00", + "$updatedAt": "2024-04-22T23:32:12.901+00:00", + "key": "DATABASE_ID", + "value": "", + "resourceType": "function", + "resourceId": "N1IzUIJiOicGbhJye" + }, + { + "$id": "OicGbhJyeN1IzUIJi", + "$createdAt": "2024-04-22T23:32:12.910+00:00", + "$updatedAt": "2024-04-22T23:32:12.910+00:00", + "key": "PROJECT_ID", + "value": "projectId", + "resourceType": "function", + "resourceId": "OicGbhJyeN1IzUIJi" + }, + { + "$id": "bhJyIJiON1IzUicGe", + "$createdAt": "2024-04-22T23:32:12.912+00:00", + "$updatedAt": "2024-04-22T23:32:12.912+00:00", + "key": "COLLECTION_USERS_ID", + "value": "", + "resourceType": "function", + "resourceId": "bhJyIJiON1IzUicGe" + } + ], + "events": [], + "schedule": "", + "timeout": 15, + "entrypoint": "userAuth.js", + "commands": "npm install", + "version": "v3", + "installationId": "a0e499a8", + "providerRepositoryId": "7389", + "providerBranch": "user-appwrite-funcs", + "providerRootDirectory": "functions", + "providerSilentMode": false, + "path": "functions/49dbf3" + } + ] } ``` -# Pull function {% #pull-function %} - -You can pull your Appwrite functions customizable settings using the `pull` command in the folder holding your `appwrite.json` file. - -```sh -appwrite pull functions -``` - # Push function {% #push-function %} To push the changes you made inside your `appwrite.json` file, use the `push` command in the folder holding your `appwrite.json` file. @@ -61,7 +118,7 @@ appwrite functions [COMMAND] [OPTIONS] * `listRuntimes` * Get a list of all runtimes that are currently active on your instance. --- -* `getUsage [options] | get [options]` +* `getUsage [options]` | `get [options]` * Get a function by its unique ID. --- * `update [options]` @@ -85,7 +142,7 @@ appwrite functions [COMMAND] [OPTIONS] * `deleteDeployment [options]` * Delete a code deployment by its unique ID. --- -* `createBuild [options] | updateDeploymentBuild [options]| downloadDeployment [options]` +* `createBuild [options]` | `updateDeploymentBuild [options]` | `downloadDeployment [options]` * Get a Deployment's contents by its unique ID. This endpoint supports range requests for partial or streaming file download. --- * `listExecutions [options]` @@ -97,7 +154,7 @@ appwrite functions [COMMAND] [OPTIONS] * `getExecution [options]` * Get a function execution log by its unique ID. --- -* `getFunctionUsage [options] | listVariables [options]` +* `getFunctionUsage [options]` | `listVariables [options]` * Get a list of all variables of a specific function. --- * `createVariable [options]` diff --git a/src/routes/docs/tooling/command-line/installation/+page.markdoc b/src/routes/docs/tooling/command-line/installation/+page.markdoc index bab1b09100..fb858413bf 100644 --- a/src/routes/docs/tooling/command-line/installation/+page.markdoc +++ b/src/routes/docs/tooling/command-line/installation/+page.markdoc @@ -70,6 +70,22 @@ Before you can use the CLI, you need to login to your Appwrite account using appwrite login ``` +# Initialization {% #Initialization %} + +After you're logged in, the CLI needs to be initialized with your Appwrite project. You can initialize the CLI using: + +```sh +appwrite init project +``` + +This will create your `appwrite.json` file, where you will configure with your various services. + +```server-nodejs +{ + "projectId": "heivi192901fjj1c20912" +} +``` + You can run your first CLI command after logging in. Try fetching information about your Appwrite project. ```sh @@ -85,14 +101,14 @@ appwrite client --selfSigned true {% /info %} {% info title="Correct CLI Version Required" %} -All commands only work with **version 2.0** of the CLI, and will **not** work on previous versions. Install [here](https://www.npmjs.com/package/appwrite-cli-beta). +All commands only work with **version 2.0** of the CLI and will **not** work on previous versions. Update [here](https://www.npmjs.com/package/appwrite-cli-beta). {% /info %} ## Next steps {% #next-steps %} You can use the CLI to create and deploy functions and collections. Deploy commands allow you to configure your Appwrite project programmatically and replicate functions and collection schemas across Appwrite projects. -[Learn more about deployment](/docs/tooling/command-line/deployment) +[Learn more about deployment](/docs/tooling/command-line/projects) Besides utility commands, the CLI can be used to execute commands like a Server SDK. diff --git a/src/routes/docs/tooling/command-line/projects/+page.markdoc b/src/routes/docs/tooling/command-line/projects/+page.markdoc index 92687a0151..06742def4d 100644 --- a/src/routes/docs/tooling/command-line/projects/+page.markdoc +++ b/src/routes/docs/tooling/command-line/projects/+page.markdoc @@ -6,24 +6,6 @@ description: Efficiently deploy your Appwrite project using the Command-Line Too After you're logged in, the CLI needs to be initialized with your Appwrite project. -# Init project {% #init-project %} - -You can init your `Appwrite.json` using the `init` command. - -```sh -init appwrite project -``` - -# Appwrite.json {% #Appwritejson %} - -What your `appwrite.json` file should look like. - -```server-nodejs -{ - "projectId": "heivi192901fjj1c20912" -} -``` - # Pull project {% #pull-project %} You can pull your Appwrite projects customizable settings using the `pull` command in the folder holding your `appwrite.json` file. @@ -47,14 +29,21 @@ The project command is for overall project administration. Appwrite database CLI ```sh appwrite project [COMMAND] [OPTIONS] ``` - - getUsage [options] - listVariables Get a list of all project variables. These variables will be accessible - in all Appwrite Functions at runtime. - createVariable [options] Create a new project variable. This variable will be accessible in all - Appwrite Functions at runtime. - getVariable [options] Get a project variable by its unique ID. - updateVariable [options] Update project variable by its unique ID. This variable will be - accessible in all Appwrite Functions at runtime. - deleteVariable [options] Delete a project variable by its unique ID. - help [command] display help for command \ No newline at end of file +{% table %} +--- +* `getUsage [options]` | `listVariables` +* Get a list of all project variables. These variables will be accessible in all Appwrite Functions at runtime. +--- +* `createVariable [options]` +* Create a new project variable. This variable will be accessible in all Appwrite Functions at runtime. +--- +* `getVariable [options]` +* Get a project variable by its unique ID. +--- +* `updateVariable [options]` +* Update project variable by its unique ID. This variable will be accessible in all Appwrite Functions at runtime. +--- +* `deleteVariable [options]` +* Delete a project variable by its unique ID. +--- +{% /table %} \ No newline at end of file diff --git a/src/routes/docs/tooling/command-line/teams/+page.markdoc b/src/routes/docs/tooling/command-line/teams/+page.markdoc index 3c4062953b..03708f6ab7 100644 --- a/src/routes/docs/tooling/command-line/teams/+page.markdoc +++ b/src/routes/docs/tooling/command-line/teams/+page.markdoc @@ -6,24 +6,6 @@ description: Efficiently deploy your Appwrite teams using the Command-Line Tool The Appwrite CLI can create teams to organize users. Teams can be used to grant access [permissions](https://appwrite.io/docs/products/auth/teams#permissions) to a group of users. Setup your Appwrite application using CLI commands [here](/docs/tooling/command-line/installation). -# Init team {% #init-team %} - -You can init your `Appwrite.json` using the `init` command. - -```sh -init appwrite teams -``` - -# Appwrite.json {% #Appwritejson %} - -What your `appwrite.json` file should look like. - -```server-nodejs -{ - "projectId": "heivi192901fjj1c20912" -} -``` - # Pull team {% #pull-team %} You can pull your Appwrite teams customizable settings using the `pull` command in the folder holding your `appwrite.json` file. diff --git a/src/routes/docs/tooling/command-line/topics/+page.markdoc b/src/routes/docs/tooling/command-line/topics/+page.markdoc index c9bb57f806..67a0b0372f 100644 --- a/src/routes/docs/tooling/command-line/topics/+page.markdoc +++ b/src/routes/docs/tooling/command-line/topics/+page.markdoc @@ -4,24 +4,6 @@ title: Deploy topics with CLI 2.0 description: Efficiently deploy your Appwrite topics using the Command-Line Tool (CLI). --- -# Init topics {% #init-topics %} - -You can init your `Appwrite.json` using the `init` command. - -```sh -init appwrite topics -``` - -# Appwrite.json {% #Appwritejson %} - -What your `appwrite.json` file should look like. - -```server-nodejs -{ - "projectId": "heivi192901fjj1c20912" -} -``` - # Pull topics {% #pull-topics %} You can pull your Appwrite topics customizable settings using the `pull` command in the folder holding your `appwrite.json` file. @@ -89,7 +71,7 @@ appwrite messaging [COMMAND] [OPTIONS] * `createApnsProvider [options]` * Create a new Apple Push Notification service provider. --- -* updateApnsProvider [options] +* `updateApnsProvider [options]` * Update a Apple Push Notification service provider by its unique ID. --- * `createFcmProvider [options]` From 69fb89530c981ef70f8f3434ae216bfde9407fb7 Mon Sep 17 00:00:00 2001 From: choir27 Date: Mon, 1 Jul 2024 10:44:25 -0400 Subject: [PATCH 22/66] docs: udpate appwrite.json content and placement for buckets, teams and topics CLI docs --- .../command-line/buckets/+page.markdoc | 31 +++++ .../command-line/collections/+page.markdoc | 107 ++++++++++++++++++ .../command-line/functions/+page.markdoc | 6 +- .../command-line/projects/+page.markdoc | 45 ++++++++ .../tooling/command-line/teams/+page.markdoc | 26 +++++ .../tooling/command-line/topics/+page.markdoc | 37 ++++++ 6 files changed, 249 insertions(+), 3 deletions(-) diff --git a/src/routes/docs/tooling/command-line/buckets/+page.markdoc b/src/routes/docs/tooling/command-line/buckets/+page.markdoc index 25966a6bdc..ba3b076851 100644 --- a/src/routes/docs/tooling/command-line/buckets/+page.markdoc +++ b/src/routes/docs/tooling/command-line/buckets/+page.markdoc @@ -14,6 +14,37 @@ You can pull your Appwrite buckets customizable settings using the `pull` comman appwrite pull buckets ``` +# Appwrite.json {% #appwritejson %} + +After pulling your Appwrite function, your `Appwrite.json` file should look similar to the following: + +``` +{ + "projectId": "", + "buckets": [ + { + "$id": "", + "$createdAt": "2024-06-21T16:20:25.516+00:00", + "$updatedAt": "2024-06-21T16:21:16.855+00:00", + "$permissions": [ + "create(\"any\")", + "read(\"any\")", + "update(\"any\")", + "delete(\"any\")" + ], + "fileSecurity": false, + "name": "test", + "enabled": true, + "maximumFileSize": 5368709120, + "allowedFileExtensions": [], + "compression": "none", + "encryption": true, + "antivirus": true + } + ] +} +``` + # Push bucket {% #push-bucket %} To push the changes you made inside your `appwrite.json` file, use the `push` command in the folder holding your `appwrite.json` file. diff --git a/src/routes/docs/tooling/command-line/collections/+page.markdoc b/src/routes/docs/tooling/command-line/collections/+page.markdoc index 5ac10c5257..d6b7c9b3c0 100644 --- a/src/routes/docs/tooling/command-line/collections/+page.markdoc +++ b/src/routes/docs/tooling/command-line/collections/+page.markdoc @@ -16,6 +16,113 @@ You can pull your Appwrite collection's and database's customizable settings usi appwrite pull collections ``` +# Appwrite.json {% #appwritejson %} + +After pulling your Appwrite function, your `Appwrite.json` file should look similar to the following: + +``` +{ + "projectId": "", + "databases": [ + { + "$id": "", + "name": "songs", + "$createdAt": "2023-07-01T18:35:27.802+00:00", + "$updatedAt": "2023-08-01T21:41:41.663+00:00", + "enabled": true + } + ], + "collections": [ + { + "$id": "COLLECTION_ID", + "$permissions": [ + "create(\"any\")", + "read(\"any\")", + "update(\"any\")", + "delete(\"any\")" + ], + "databaseId": "", + "name": "music", + "enabled": true, + "documentSecurity": false, + "attributes": [ + { + "key": "userID", + "type": "string", + "status": "available", + "error": "", + "required": false, + "array": false, + "size": 100, + "default": null + }, + { + "key": "name", + "type": "string", + "status": "available", + "error": "", + "required": false, + "array": false, + "size": 100, + "default": null + }, + { + "key": "cloudinaryId", + "type": "string", + "status": "available", + "error": "", + "required": false, + "array": false, + "size": 100, + "default": null + }, + { + "key": "user", + "type": "string", + "status": "available", + "error": "", + "required": false, + "array": false, + "size": 100, + "default": null + }, + { + "key": "audio", + "type": "string", + "status": "available", + "error": "", + "required": false, + "array": false, + "size": 200, + "default": null + }, + { + "key": "genre", + "type": "string", + "status": "available", + "error": "", + "required": false, + "array": false, + "size": 500, + "default": null + }, + { + "key": "artist", + "type": "string", + "status": "available", + "error": "", + "required": false, + "array": false, + "size": 500, + "default": null + } + ], + "indexes": [] + } + ] +} +``` + # Push collection {% #push-collection %} To push the changes you made inside your `appwrite.json` file, use the `push` command in the folder holding your `appwrite.json` file. diff --git a/src/routes/docs/tooling/command-line/functions/+page.markdoc b/src/routes/docs/tooling/command-line/functions/+page.markdoc index 416647d4ad..b958c74d96 100644 --- a/src/routes/docs/tooling/command-line/functions/+page.markdoc +++ b/src/routes/docs/tooling/command-line/functions/+page.markdoc @@ -19,10 +19,10 @@ appwrite pull functions After pulling your Appwrite function, your `Appwrite.json` file should look similar to the following: ``` { - "projectId": , + "projectId": , "functions": [ { - "$id": "", + "$id": "", "$createdAt": "2024-04-22T22:29:31.427+00:00", "$updatedAt": "2024-06-26T19:08:26.582+00:00", "execute": [ @@ -58,7 +58,7 @@ After pulling your Appwrite function, your `Appwrite.json` file should look simi "$createdAt": "2024-04-22T23:32:12.910+00:00", "$updatedAt": "2024-04-22T23:32:12.910+00:00", "key": "PROJECT_ID", - "value": "projectId", + "value": "", "resourceType": "function", "resourceId": "OicGbhJyeN1IzUIJi" }, diff --git a/src/routes/docs/tooling/command-line/projects/+page.markdoc b/src/routes/docs/tooling/command-line/projects/+page.markdoc index 06742def4d..918f387808 100644 --- a/src/routes/docs/tooling/command-line/projects/+page.markdoc +++ b/src/routes/docs/tooling/command-line/projects/+page.markdoc @@ -14,6 +14,51 @@ You can pull your Appwrite projects customizable settings using the `pull` comma appwrite pull project ``` +# Appwrite.json {% #appwritejson %} + +After pulling your project, your `appwrite.json` project should look similarly to this. + +``` +{ + "projectId": "", + "projectName": "EchoVerse", + "projectSettings": { + "services": { + "account": true, + "avatars": true, + "databases": true, + "locale": true, + "health": true, + "storage": true, + "teams": true, + "users": true, + "functions": true, + "graphql": true, + "messaging": true + }, + "auth": { + "methods": { + "jwt": true, + "phone": true, + "invites": true, + "anonymous": true, + "email-otp": true, + "magic-url": true, + "email-password": true + }, + "security": { + "duration": 7200, + "limit": 100, + "sessionsLimit": 10, + "passwordHistory": 0, + "passwordDictionary": false, + "personalDataCheck": false + } + } + } +} +``` + # Push project {% #push-project %} To push the changes you made inside your `appwrite.json` file, use the `push` command in the folder holding your `appwrite.json` file. diff --git a/src/routes/docs/tooling/command-line/teams/+page.markdoc b/src/routes/docs/tooling/command-line/teams/+page.markdoc index 03708f6ab7..22df149c22 100644 --- a/src/routes/docs/tooling/command-line/teams/+page.markdoc +++ b/src/routes/docs/tooling/command-line/teams/+page.markdoc @@ -14,6 +14,32 @@ You can pull your Appwrite teams customizable settings using the `pull` command appwrite pull teams ``` +# Appwrite.json {% #appwritejson %} +After pulling your Appwrite function, your `Appwrite.json` file should look similar to the following: + +``` +{ + "projectId": "", + "teams": [ + { + "$id": "eyJhbGciOiJIUzI1N", + "name": "hat" + }, + { + "$id": "N1IzUIJiOicGbhJye", + "name": "sun" + }, + { + "$id": "OicGbhJyeN1IzUIJi", + "name": "emit" + },{ + "$id": "bhJyIJiON1IzUicGe", + "name": "kue" + } + ] +} +``` + # Push team {% #push-teams %} To push the changes you made inside your `appwrite.json` file, use the `push` command in the folder holding your `appwrite.json` file. diff --git a/src/routes/docs/tooling/command-line/topics/+page.markdoc b/src/routes/docs/tooling/command-line/topics/+page.markdoc index 67a0b0372f..346353035c 100644 --- a/src/routes/docs/tooling/command-line/topics/+page.markdoc +++ b/src/routes/docs/tooling/command-line/topics/+page.markdoc @@ -12,6 +12,43 @@ You can pull your Appwrite topics customizable settings using the `pull` command appwrite pull topics ``` +# Appwrite.json {% #appwritejson %} + +After pulling your Appwrite function, your `Appwrite.json` file should look similar to the following: + +``` +{ + "projectId": "", + "topics": [ + { + "$id": "N1IzUIJiOicGbhJye", + "$createdAt": "2024-07-01T14:40:43.381+00:00", + "$updatedAt": "2024-07-01T14:40:43.381+00:00", + "name": "Anime", + "emailTotal": 3, + "smsTotal": 0, + "pushTotal": 0, + "subscribe": [ + "users" + ] + }, + { + "$id": "eyJhbGciOiJIUzI1N", + "$createdAt": "2024-07-01T14:41:19.029+00:00", + "$updatedAt": "2024-07-01T14:41:28.751+00:00", + "name": "Music", + "emailTotal": 2, + "smsTotal": 0, + "pushTotal": 0, + "subscribe": [ + "users", + "any" + ] + } + ] +} +``` + # Push topics {% #push-topics %} To push the changes you made inside your `appwrite.json` file, use the `push` command in the folder holding your `appwrite.json` file. From 2059a99ab9c2f5698c02704c49262b226de35482 Mon Sep 17 00:00:00 2001 From: choir27 Date: Mon, 1 Jul 2024 11:07:18 -0400 Subject: [PATCH 23/66] remove CLI link from functions/deployment to reduce redundancy from functions/deploy-manually CLI seciton --- .../docs/products/databases/collections/+page.markdoc | 2 +- .../docs/products/functions/deployments/+page.markdoc | 6 +----- src/routes/docs/products/messaging/topics/+page.markdoc | 2 +- src/routes/docs/tooling/command-line/buckets/+page.markdoc | 4 ++-- .../docs/tooling/command-line/collections/+page.markdoc | 2 +- .../docs/tooling/command-line/functions/+page.markdoc | 2 +- src/routes/docs/tooling/command-line/projects/+page.markdoc | 4 ++-- src/routes/docs/tooling/command-line/teams/+page.markdoc | 4 ++-- 8 files changed, 11 insertions(+), 15 deletions(-) diff --git a/src/routes/docs/products/databases/collections/+page.markdoc b/src/routes/docs/products/databases/collections/+page.markdoc index 36dd4b2653..ddb0e1e66a 100644 --- a/src/routes/docs/products/databases/collections/+page.markdoc +++ b/src/routes/docs/products/databases/collections/+page.markdoc @@ -277,4 +277,4 @@ You can create an index by navigating to your collection's **Indexes** tab or by # CLI {% #cli %} -Your collections can be created, edited, or deleted from your terminal using the Appwrite [**CLI**](http://localhost:5173/docs/tooling/command-line/installation). Use [CLI commands](http://localhost:5173/docs/tooling/command-line/collections) to manage your collections and deploy its schema from one project to another. \ No newline at end of file +Your collections can be created, edited, or deleted from your terminal using the Appwrite [**CLI**](http://localhost:5173/docs/tooling/command-line/installation). Use [CLI commands](http://localhost:5173/docs/tooling/command-line/collections) to manage your collections and deploy their schema from one project to another. \ No newline at end of file diff --git a/src/routes/docs/products/functions/deployments/+page.markdoc b/src/routes/docs/products/functions/deployments/+page.markdoc index ea4c4e3074..899a1a4c8f 100644 --- a/src/routes/docs/products/functions/deployments/+page.markdoc +++ b/src/routes/docs/products/functions/deployments/+page.markdoc @@ -45,8 +45,4 @@ After updating the configuration, redeploy your function for changes to take eff 3. Under the **Deployments** tab, find the status of the current active deployment. 4. Redeploy by clicking the triple-dots beside an execution, and hitting the **Redeploy** button. -Redeployment behavior varies depending on how the initial deployment was created. - -# CLI {% #CLI %} - -Use the Appwrite [**CLI**](/docs/tooling/command-line/installation) to deploy your functions. Create your functions with a runtime template with just one [CLI command](/docs/tooling/command-line/functions). \ No newline at end of file +Redeployment behavior varies depending on how the initial deployment was created. \ No newline at end of file diff --git a/src/routes/docs/products/messaging/topics/+page.markdoc b/src/routes/docs/products/messaging/topics/+page.markdoc index 669b132aac..cfc024f7c3 100644 --- a/src/routes/docs/products/messaging/topics/+page.markdoc +++ b/src/routes/docs/products/messaging/topics/+page.markdoc @@ -267,7 +267,7 @@ let topic = try await messaging.createTopic( {% /tabs %} # CLI {% #CLI %} -You can also create topics with Appwrite **CLI** using the [CLI commands](/docs/tooling/command-line/topics), as well as configure with your messaging. Using the [**CLI**](/docs/tooling/command-line/installation), you can `pull` your topics schema from your project, customize your `appwrite.json` file, and `push` your changes back into your project. +You can also create topics and configure your messaging using the [CLI commands](/docs/tooling/command-line/topics). Using the Appwrite [**CLI**](/docs/tooling/command-line/installation), you can `pull` your topics schema from your project, customize your `appwrite.json` file, and `push` your changes back into your project. # Permissions {% #permissions %} Before you can subscribe to a topic, a user needs the appropriate permission. diff --git a/src/routes/docs/tooling/command-line/buckets/+page.markdoc b/src/routes/docs/tooling/command-line/buckets/+page.markdoc index ba3b076851..77d495e6b8 100644 --- a/src/routes/docs/tooling/command-line/buckets/+page.markdoc +++ b/src/routes/docs/tooling/command-line/buckets/+page.markdoc @@ -4,11 +4,11 @@ title: Deploy buckets with CLI 2.0 description: Efficiently deploy your Appwrite buckets using the Command-Line Tool (CLI). --- -The Appwrite CLI allows you to configure and deploy buckets across projects. Setup your Appwrite application using CLI commands [here](/docs/tooling/command-line/installation). +The Appwrite CLI allows you to configure and deploy buckets across projects. Set up your Appwrite application using CLI commands [here](/docs/tooling/command-line/installation). # Pull bucket {% #pull-bucket %} -You can pull your Appwrite buckets customizable settings using the `pull` command in the folder holding your `appwrite.json` file. +You can pull your Appwrite bucket's customizable settings using the `pull` command in the folder holding your `appwrite.json` file. ```sh appwrite pull buckets diff --git a/src/routes/docs/tooling/command-line/collections/+page.markdoc b/src/routes/docs/tooling/command-line/collections/+page.markdoc index d6b7c9b3c0..cb354ceaa5 100644 --- a/src/routes/docs/tooling/command-line/collections/+page.markdoc +++ b/src/routes/docs/tooling/command-line/collections/+page.markdoc @@ -4,7 +4,7 @@ title: Deploy collections with CLI 2.0 description: Efficiently deploy your Appwrite collections using the Command-Line Tool (CLI). --- -Create and manage your collections using the CLI 2.0 commands. Setup your Appwrite application using CLI commands [here](/docs/tooling/command-line/installation). +Create and manage your collections using the CLI 2.0 commands. Set up your Appwrite application using CLI commands [here](/docs/tooling/command-line/installation). The Appwrite CLI also helps you deploy your project's databases and collections schema from one project to another. diff --git a/src/routes/docs/tooling/command-line/functions/+page.markdoc b/src/routes/docs/tooling/command-line/functions/+page.markdoc index b958c74d96..5aa01385a9 100644 --- a/src/routes/docs/tooling/command-line/functions/+page.markdoc +++ b/src/routes/docs/tooling/command-line/functions/+page.markdoc @@ -4,7 +4,7 @@ title: Deploy functions with CLI 2.0 description: Efficiently deploy your Appwrite functions using the Command-Line Tool (CLI). --- -The CLI handles the creation and deployment of Appwrite Functions. Setup your Appwrite application using CLI commands [here](/docs/tooling/command-line/installation). +The CLI handles the creation and deployment of Appwrite Functions. Set up your Appwrite application using CLI commands [here](/docs/tooling/command-line/installation). # Pull function {% #pull-function %} diff --git a/src/routes/docs/tooling/command-line/projects/+page.markdoc b/src/routes/docs/tooling/command-line/projects/+page.markdoc index 918f387808..3d7764dc3d 100644 --- a/src/routes/docs/tooling/command-line/projects/+page.markdoc +++ b/src/routes/docs/tooling/command-line/projects/+page.markdoc @@ -8,7 +8,7 @@ After you're logged in, the CLI needs to be initialized with your Appwrite proje # Pull project {% #pull-project %} -You can pull your Appwrite projects customizable settings using the `pull` command in the folder holding your `appwrite.json` file. +You can pull your Appwrite project's customizable settings using the `pull` command in the folder holding your `appwrite.json` file. ```sh appwrite pull project @@ -16,7 +16,7 @@ appwrite pull project # Appwrite.json {% #appwritejson %} -After pulling your project, your `appwrite.json` project should look similarly to this. +After pulling your project, your `appwrite.json` project should look similar to this. ``` { diff --git a/src/routes/docs/tooling/command-line/teams/+page.markdoc b/src/routes/docs/tooling/command-line/teams/+page.markdoc index 22df149c22..541ff2f4c9 100644 --- a/src/routes/docs/tooling/command-line/teams/+page.markdoc +++ b/src/routes/docs/tooling/command-line/teams/+page.markdoc @@ -4,11 +4,11 @@ title: Deploy teams with CLI 2.0 description: Efficiently deploy your Appwrite teams using the Command-Line Tool (CLI). --- -The Appwrite CLI can create teams to organize users. Teams can be used to grant access [permissions](https://appwrite.io/docs/products/auth/teams#permissions) to a group of users. Setup your Appwrite application using CLI commands [here](/docs/tooling/command-line/installation). +The Appwrite CLI can create teams to organize users. Teams can be used to grant access [permissions](https://appwrite.io/docs/products/auth/teams#permissions) to a group of users. Set up your Appwrite application using CLI commands [here](/docs/tooling/command-line/installation). # Pull team {% #pull-team %} -You can pull your Appwrite teams customizable settings using the `pull` command in the folder holding your `appwrite.json` file. +You can pull your Appwrite team's customizable settings using the `pull` command in the folder holding your `appwrite.json` file. ```sh appwrite pull teams From 8bf2ab6f0ff4810c0344b7f9ccc482ddbc55c9cd Mon Sep 17 00:00:00 2001 From: choir27 Date: Mon, 1 Jul 2024 12:28:31 -0400 Subject: [PATCH 24/66] docs: expand on detail for CLI links from services --- .../docs/products/auth/teams/+page.markdoc | 27 +++++++++++++++- .../databases/collections/+page.markdoc | 26 ++++++++++++++- .../functions/deploy-manually/+page.markdoc | 5 ++- .../products/messaging/topics/+page.markdoc | 29 ++++++++++++++++- .../products/storage/buckets/+page.markdoc | 32 ++++++++++++++++++- .../tooling/command-line/teams/+page.markdoc | 2 +- 6 files changed, 115 insertions(+), 6 deletions(-) diff --git a/src/routes/docs/products/auth/teams/+page.markdoc b/src/routes/docs/products/auth/teams/+page.markdoc index 89865c7fc6..7aace2d28f 100644 --- a/src/routes/docs/products/auth/teams/+page.markdoc +++ b/src/routes/docs/products/auth/teams/+page.markdoc @@ -189,7 +189,32 @@ val response = teams.createMembership( # CLI {% #CLI %} -Invite members and create teams using the [**CLI**](/docs/tooling/command-line/installation), which allows you to perform server-side tasks using the terminal. You can invite members to your team or create a team with only a single text command using the [CLI commands](/docs/tooling/command-line/teams). +{% info title="CLI setup" %} +Before you can deploy with the Appwrite CLI, make sure you've [installed and initialized](/docs/tooling/command-line/installation) the CLI and [logged-in](/docs/tooling/command-line/installation#get-started) into your Appwrite account. +{% /info %} + +To manually deploy your Appwrite teams, you need to pull in your current Appwrite teams by using the following command: + +```bash +appwrite pull teams +``` + +Push any configurations or changes you made to the generated code by using the following command: + +```bash +appwrite push teams +``` +{% arrow_link href="/docs/tooling/command-line/teams#commands" %} +Learn more about the CLI team commands +{% /arrow_link %} + +## Overwrite warning {% #overwrite-warning %} + +If you made changes in the Appwrite Console that are different from your `appwrite.json`, using the CLI push command will overwrite your console changes. Update your `appwrite.json` manually before pushing. + +{% arrow_link href="/docs/tooling/command-line/teams#appwritejson" %} +Learn more about appwrite.json +{% /arrow_link %} # Permissions {% #permissions %} diff --git a/src/routes/docs/products/databases/collections/+page.markdoc b/src/routes/docs/products/databases/collections/+page.markdoc index ddb0e1e66a..f7a8f7fa21 100644 --- a/src/routes/docs/products/databases/collections/+page.markdoc +++ b/src/routes/docs/products/databases/collections/+page.markdoc @@ -277,4 +277,28 @@ You can create an index by navigating to your collection's **Indexes** tab or by # CLI {% #cli %} -Your collections can be created, edited, or deleted from your terminal using the Appwrite [**CLI**](http://localhost:5173/docs/tooling/command-line/installation). Use [CLI commands](http://localhost:5173/docs/tooling/command-line/collections) to manage your collections and deploy their schema from one project to another. \ No newline at end of file +{% info title="CLI setup" %} +Before you can deploy with the Appwrite CLI, make sure you've [installed and initialized](/docs/tooling/command-line/installation) the CLI and [logged-in](/docs/tooling/command-line/installation#get-started) into your Appwrite account. +{% /info %} + +```bash +appwrite pull collections +``` + +Push any configurations or changes you made to the generated code by using the following command: + +```bash +appwrite push collections +``` + +{% arrow_link href="/docs/tooling/command-line/teams#collections" %} +Learn more about the CLI collections commands +{% /arrow_link %} + +## Overwrite warning {% #overwrite-warning %} + +If you made changes in the Appwrite Console that are different from your `appwrite.json`, using the CLI push command will overwrite your console changes. Update your `appwrite.json` manually before pushing. + +{% arrow_link href="/docs/tooling/command-line/collections#appwritejson" %} +Learn more about appwrite.json +{% /arrow_link %} diff --git a/src/routes/docs/products/functions/deploy-manually/+page.markdoc b/src/routes/docs/products/functions/deploy-manually/+page.markdoc index f4a31a27c3..5f9c405041 100644 --- a/src/routes/docs/products/functions/deploy-manually/+page.markdoc +++ b/src/routes/docs/products/functions/deploy-manually/+page.markdoc @@ -28,6 +28,9 @@ Edit the generated code, add dependencies, and deploy the function using the fol ```bash appwrite deploy function ``` +{% arrow_link href="/docs/tooling/command-line/functions#commands" %} +Learn more about the CLI functions commands +{% /arrow_link %} ## Overwrite warning {% #overwrite-warning %} @@ -37,7 +40,7 @@ If you made changes in the Appwrite Console that are different from your `appwri If you need to target a different project, API endpoint, change the path or entry point of your function, or update any of the other configuration options, you can do so by editing the `appwrite.json` file. -{% arrow_link href="/docs/tooling/command-line/functions" %} +{% arrow_link href="/docs/tooling/command-line/functions#appwritejson" %} Learn more about appwrite.json {% /arrow_link %} diff --git a/src/routes/docs/products/messaging/topics/+page.markdoc b/src/routes/docs/products/messaging/topics/+page.markdoc index cfc024f7c3..d60c38c709 100644 --- a/src/routes/docs/products/messaging/topics/+page.markdoc +++ b/src/routes/docs/products/messaging/topics/+page.markdoc @@ -267,7 +267,34 @@ let topic = try await messaging.createTopic( {% /tabs %} # CLI {% #CLI %} -You can also create topics and configure your messaging using the [CLI commands](/docs/tooling/command-line/topics). Using the Appwrite [**CLI**](/docs/tooling/command-line/installation), you can `pull` your topics schema from your project, customize your `appwrite.json` file, and `push` your changes back into your project. + +{% info title="CLI setup" %} +Before you can deploy with the Appwrite CLI, make sure you've [installed and initialized](/docs/tooling/command-line/installation) the CLI and [logged-in](/docs/tooling/command-line/installation#get-started) into your Appwrite account. +{% /info %} + +To manually deploy your Appwrite topics, you need to pull in your current Appwrite topics by using the following command: + +```bash +appwrite pull topics +``` + +Push any configurations or changes you made to the generated code by using the following command: + +```bash +appwrite push topics +``` +{% arrow_link href="/docs/tooling/command-line/topics#commands" %} +Learn more about the CLI topics commands +{% /arrow_link %} + +## Overwrite warning {% #overwrite-warning %} + +If you made changes in the Appwrite Console that are different from your `appwrite.json`, using the CLI push command will overwrite your console changes. Update your `appwrite.json` manually before pushing. + +{% arrow_link href="/docs/tooling/command-line/teams#appwritejson" %} +Learn more about appwrite.json +{% /arrow_link %} + # Permissions {% #permissions %} Before you can subscribe to a topic, a user needs the appropriate permission. diff --git a/src/routes/docs/products/storage/buckets/+page.markdoc b/src/routes/docs/products/storage/buckets/+page.markdoc index 02b4d90e97..b54f6dfe0d 100644 --- a/src/routes/docs/products/storage/buckets/+page.markdoc +++ b/src/routes/docs/products/storage/buckets/+page.markdoc @@ -8,7 +8,37 @@ Storage buckets are a group of files, similar to collections in Appwrite Databas Buckets let you limit file size and extensions, whether or not to encrypt the files, and more. # Create Bucket {% #create-bucket %} -You can create your bucket from the Appwrite Console or a [Server SDK](/docs/sdks#server). Buckets can be created using the [CLI](/docs/tooling/command-line/installation) too, only requiring a single [command](/docs/tooling/command-line/buckets) to create buckets and more. +You can create your bucket from the Appwrite Console or a [Server SDK](/docs/sdks#server). Buckets can be created using the [CLI](/docs/tooling/command-line/installation) too, only requiring a single [command](/docs/tooling/command-line/buckets) to create buckets and handle server-side tasks with buckets and storage. + +# CLI {% #cli %} + +{% info title="CLI setup" %} +Before you can deploy with the Appwrite CLI, make sure you've [installed and initialized](/docs/tooling/command-line/installation) the CLI and [logged-in](/docs/tooling/command-line/installation#get-started) into your Appwrite account. +{% /info %} + +To manually deploy your Appwrite buckets, you need to pull in your current Appwrite buckets by using the following command: + +```bash +appwrite pull buckets +``` + +Push any configurations or changes you made to the generated code by using the following command: + +```bash +appwrite push teams +``` +{% arrow_link href="/docs/tooling/command-line/buckets#commands" %} +Learn more about the CLI buckets commands +{% /arrow_link %} + +## Overwrite warning {% #overwrite-warning %} + +If you made changes in the Appwrite Console that are different from your `appwrite.json`, using the CLI push command will overwrite your console changes. Update your `appwrite.json` manually before pushing. + +{% arrow_link href="/docs/tooling/command-line/buckets#appwritejson" %} +Learn more about appwrite.json +{% /arrow_link %} + {% tabs %} {% tabsitem #console title="Console" %} diff --git a/src/routes/docs/tooling/command-line/teams/+page.markdoc b/src/routes/docs/tooling/command-line/teams/+page.markdoc index 541ff2f4c9..e0a5abada8 100644 --- a/src/routes/docs/tooling/command-line/teams/+page.markdoc +++ b/src/routes/docs/tooling/command-line/teams/+page.markdoc @@ -50,7 +50,7 @@ appwrite push teams # Commands {% #commands %} -The teams command allows you to group users of your project and to enable them to share read and write access to your project resources. Appwrite database CLI commands generally follow the following syntax: +The team's command allows you to group users of your project and to enable them to share read and write access to your project resources. Appwrite database CLI commands generally follow the following syntax: ```sh appwrite teams [COMMAND] [OPTIONS] From fb41640ca0f08b25cfc0018d2506279b3f4955ef Mon Sep 17 00:00:00 2001 From: choir27 Date: Mon, 1 Jul 2024 12:38:48 -0400 Subject: [PATCH 25/66] docs: update href links --- src/routes/docs/products/databases/collections/+page.markdoc | 2 +- src/routes/docs/products/messaging/topics/+page.markdoc | 2 +- src/routes/docs/products/storage/buckets/+page.markdoc | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/routes/docs/products/databases/collections/+page.markdoc b/src/routes/docs/products/databases/collections/+page.markdoc index f7a8f7fa21..53eaf46b4a 100644 --- a/src/routes/docs/products/databases/collections/+page.markdoc +++ b/src/routes/docs/products/databases/collections/+page.markdoc @@ -291,7 +291,7 @@ Push any configurations or changes you made to the generated code by using the f appwrite push collections ``` -{% arrow_link href="/docs/tooling/command-line/teams#collections" %} +{% arrow_link href="/docs/tooling/command-line/collections#commands" %} Learn more about the CLI collections commands {% /arrow_link %} diff --git a/src/routes/docs/products/messaging/topics/+page.markdoc b/src/routes/docs/products/messaging/topics/+page.markdoc index d60c38c709..9c16e7d079 100644 --- a/src/routes/docs/products/messaging/topics/+page.markdoc +++ b/src/routes/docs/products/messaging/topics/+page.markdoc @@ -291,7 +291,7 @@ Learn more about the CLI topics commands If you made changes in the Appwrite Console that are different from your `appwrite.json`, using the CLI push command will overwrite your console changes. Update your `appwrite.json` manually before pushing. -{% arrow_link href="/docs/tooling/command-line/teams#appwritejson" %} +{% arrow_link href="/docs/tooling/command-line/topics#appwritejson" %} Learn more about appwrite.json {% /arrow_link %} diff --git a/src/routes/docs/products/storage/buckets/+page.markdoc b/src/routes/docs/products/storage/buckets/+page.markdoc index b54f6dfe0d..94aec46a0c 100644 --- a/src/routes/docs/products/storage/buckets/+page.markdoc +++ b/src/routes/docs/products/storage/buckets/+page.markdoc @@ -25,7 +25,7 @@ appwrite pull buckets Push any configurations or changes you made to the generated code by using the following command: ```bash -appwrite push teams +appwrite push buckets ``` {% arrow_link href="/docs/tooling/command-line/buckets#commands" %} Learn more about the CLI buckets commands From 31a2048b5bb6538b687a3e8e429b38fe5ed452cf Mon Sep 17 00:00:00 2001 From: choir27 Date: Mon, 1 Jul 2024 12:56:44 -0400 Subject: [PATCH 26/66] docs: update overview word choice and sentence structure --- src/routes/docs/products/storage/buckets/+page.markdoc | 2 +- src/routes/docs/tooling/command-line/buckets/+page.markdoc | 4 ++-- .../docs/tooling/command-line/collections/+page.markdoc | 2 +- src/routes/docs/tooling/command-line/functions/+page.markdoc | 2 +- src/routes/docs/tooling/command-line/projects/+page.markdoc | 2 +- src/routes/docs/tooling/command-line/teams/+page.markdoc | 2 +- src/routes/docs/tooling/command-line/topics/+page.markdoc | 2 ++ 7 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/routes/docs/products/storage/buckets/+page.markdoc b/src/routes/docs/products/storage/buckets/+page.markdoc index 94aec46a0c..540583d871 100644 --- a/src/routes/docs/products/storage/buckets/+page.markdoc +++ b/src/routes/docs/products/storage/buckets/+page.markdoc @@ -8,7 +8,7 @@ Storage buckets are a group of files, similar to collections in Appwrite Databas Buckets let you limit file size and extensions, whether or not to encrypt the files, and more. # Create Bucket {% #create-bucket %} -You can create your bucket from the Appwrite Console or a [Server SDK](/docs/sdks#server). Buckets can be created using the [CLI](/docs/tooling/command-line/installation) too, only requiring a single [command](/docs/tooling/command-line/buckets) to create buckets and handle server-side tasks with buckets and storage. +You can create your bucket from the Appwrite Console or a [Server SDK](/docs/sdks#server). You can also create buckets using the [CLI](/docs/tooling/command-line/installation), requiring only a single [command](/docs/tooling/command-line/buckets) to create buckets and handle server-side tasks with buckets and storage. # CLI {% #cli %} diff --git a/src/routes/docs/tooling/command-line/buckets/+page.markdoc b/src/routes/docs/tooling/command-line/buckets/+page.markdoc index 77d495e6b8..d28f86bae5 100644 --- a/src/routes/docs/tooling/command-line/buckets/+page.markdoc +++ b/src/routes/docs/tooling/command-line/buckets/+page.markdoc @@ -4,7 +4,7 @@ title: Deploy buckets with CLI 2.0 description: Efficiently deploy your Appwrite buckets using the Command-Line Tool (CLI). --- -The Appwrite CLI allows you to configure and deploy buckets across projects. Set up your Appwrite application using CLI commands [here](/docs/tooling/command-line/installation). +The Appwrite CLI allows you to configure and deploy buckets across projects. Install and initialize CLI Appwrite [here](/docs/tooling/command-line/installation). # Pull bucket {% #pull-bucket %} @@ -50,7 +50,7 @@ After pulling your Appwrite function, your `Appwrite.json` file should look simi To push the changes you made inside your `appwrite.json` file, use the `push` command in the folder holding your `appwrite.json` file. ```sh -appwrite push teams +appwrite push buckets ``` # Commands {% #commands %} diff --git a/src/routes/docs/tooling/command-line/collections/+page.markdoc b/src/routes/docs/tooling/command-line/collections/+page.markdoc index cb354ceaa5..d97f582e96 100644 --- a/src/routes/docs/tooling/command-line/collections/+page.markdoc +++ b/src/routes/docs/tooling/command-line/collections/+page.markdoc @@ -4,7 +4,7 @@ title: Deploy collections with CLI 2.0 description: Efficiently deploy your Appwrite collections using the Command-Line Tool (CLI). --- -Create and manage your collections using the CLI 2.0 commands. Set up your Appwrite application using CLI commands [here](/docs/tooling/command-line/installation). +Create and manage your collections using the CLI 2.0 commands. Install and initialize CLI Appwrite [here](/docs/tooling/command-line/installation). The Appwrite CLI also helps you deploy your project's databases and collections schema from one project to another. diff --git a/src/routes/docs/tooling/command-line/functions/+page.markdoc b/src/routes/docs/tooling/command-line/functions/+page.markdoc index 5aa01385a9..84f95d3a28 100644 --- a/src/routes/docs/tooling/command-line/functions/+page.markdoc +++ b/src/routes/docs/tooling/command-line/functions/+page.markdoc @@ -4,7 +4,7 @@ title: Deploy functions with CLI 2.0 description: Efficiently deploy your Appwrite functions using the Command-Line Tool (CLI). --- -The CLI handles the creation and deployment of Appwrite Functions. Set up your Appwrite application using CLI commands [here](/docs/tooling/command-line/installation). +The CLI handles the creation and deployment of Appwrite Functions. Install and initialize CLI Appwrite [here](/docs/tooling/command-line/installation). # Pull function {% #pull-function %} diff --git a/src/routes/docs/tooling/command-line/projects/+page.markdoc b/src/routes/docs/tooling/command-line/projects/+page.markdoc index 3d7764dc3d..2ffae79633 100644 --- a/src/routes/docs/tooling/command-line/projects/+page.markdoc +++ b/src/routes/docs/tooling/command-line/projects/+page.markdoc @@ -4,7 +4,7 @@ title: Deploy project with CLI 2.0 description: Efficiently deploy your Appwrite project using the Command-Line Tool (CLI). --- -After you're logged in, the CLI needs to be initialized with your Appwrite project. +After you're logged in, the CLI needs to be initialized with your Appwrite project. Install and CLI Appwrite [here](/docs/tooling/command-line/installation). # Pull project {% #pull-project %} diff --git a/src/routes/docs/tooling/command-line/teams/+page.markdoc b/src/routes/docs/tooling/command-line/teams/+page.markdoc index e0a5abada8..479288fd35 100644 --- a/src/routes/docs/tooling/command-line/teams/+page.markdoc +++ b/src/routes/docs/tooling/command-line/teams/+page.markdoc @@ -4,7 +4,7 @@ title: Deploy teams with CLI 2.0 description: Efficiently deploy your Appwrite teams using the Command-Line Tool (CLI). --- -The Appwrite CLI can create teams to organize users. Teams can be used to grant access [permissions](https://appwrite.io/docs/products/auth/teams#permissions) to a group of users. Set up your Appwrite application using CLI commands [here](/docs/tooling/command-line/installation). +The Appwrite CLI can create teams to organize users. Teams can be used to grant access [permissions](https://appwrite.io/docs/products/auth/teams#permissions) to a group of users. Install and initialize CLI Appwrite [here](/docs/tooling/command-line/installation). # Pull team {% #pull-team %} diff --git a/src/routes/docs/tooling/command-line/topics/+page.markdoc b/src/routes/docs/tooling/command-line/topics/+page.markdoc index 346353035c..a4196067eb 100644 --- a/src/routes/docs/tooling/command-line/topics/+page.markdoc +++ b/src/routes/docs/tooling/command-line/topics/+page.markdoc @@ -4,6 +4,8 @@ title: Deploy topics with CLI 2.0 description: Efficiently deploy your Appwrite topics using the Command-Line Tool (CLI). --- +The Appwrite CLI can create, set, delete, and configure topics. Install and initialize CLI Appwrite [here](/docs/tooling/command-line/installation). + # Pull topics {% #pull-topics %} You can pull your Appwrite topics customizable settings using the `pull` command in the folder holding your `appwrite.json` file. From a214bca41589acca3b73840a9ca95793eb4d241e Mon Sep 17 00:00:00 2001 From: choir27 Date: Tue, 2 Jul 2024 12:42:15 -0400 Subject: [PATCH 27/66] docs: update overview word choice and sentence structure --- src/routes/docs/tooling/command-line/buckets/+page.markdoc | 2 +- src/routes/docs/tooling/command-line/collections/+page.markdoc | 2 +- src/routes/docs/tooling/command-line/functions/+page.markdoc | 2 +- src/routes/docs/tooling/command-line/projects/+page.markdoc | 2 +- src/routes/docs/tooling/command-line/teams/+page.markdoc | 2 +- src/routes/docs/tooling/command-line/topics/+page.markdoc | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/routes/docs/tooling/command-line/buckets/+page.markdoc b/src/routes/docs/tooling/command-line/buckets/+page.markdoc index d28f86bae5..113ba3fcbb 100644 --- a/src/routes/docs/tooling/command-line/buckets/+page.markdoc +++ b/src/routes/docs/tooling/command-line/buckets/+page.markdoc @@ -4,7 +4,7 @@ title: Deploy buckets with CLI 2.0 description: Efficiently deploy your Appwrite buckets using the Command-Line Tool (CLI). --- -The Appwrite CLI allows you to configure and deploy buckets across projects. Install and initialize CLI Appwrite [here](/docs/tooling/command-line/installation). +The Appwrite CLI allows you to configure and deploy buckets across projects. Install and initialize CLI Appwrite [here](/docs/tooling/command-line/installation#Installation). # Pull bucket {% #pull-bucket %} diff --git a/src/routes/docs/tooling/command-line/collections/+page.markdoc b/src/routes/docs/tooling/command-line/collections/+page.markdoc index d97f582e96..d7425d7025 100644 --- a/src/routes/docs/tooling/command-line/collections/+page.markdoc +++ b/src/routes/docs/tooling/command-line/collections/+page.markdoc @@ -4,7 +4,7 @@ title: Deploy collections with CLI 2.0 description: Efficiently deploy your Appwrite collections using the Command-Line Tool (CLI). --- -Create and manage your collections using the CLI 2.0 commands. Install and initialize CLI Appwrite [here](/docs/tooling/command-line/installation). +Create and manage your collections using the CLI 2.0 commands. Install and initialize CLI Appwrite [here](/docs/tooling/command-line/installation#Installation). The Appwrite CLI also helps you deploy your project's databases and collections schema from one project to another. diff --git a/src/routes/docs/tooling/command-line/functions/+page.markdoc b/src/routes/docs/tooling/command-line/functions/+page.markdoc index 84f95d3a28..557aa1673c 100644 --- a/src/routes/docs/tooling/command-line/functions/+page.markdoc +++ b/src/routes/docs/tooling/command-line/functions/+page.markdoc @@ -4,7 +4,7 @@ title: Deploy functions with CLI 2.0 description: Efficiently deploy your Appwrite functions using the Command-Line Tool (CLI). --- -The CLI handles the creation and deployment of Appwrite Functions. Install and initialize CLI Appwrite [here](/docs/tooling/command-line/installation). +The CLI handles the creation and deployment of Appwrite Functions. Install and initialize CLI Appwrite [here](/docs/tooling/command-line/installation#Installation). # Pull function {% #pull-function %} diff --git a/src/routes/docs/tooling/command-line/projects/+page.markdoc b/src/routes/docs/tooling/command-line/projects/+page.markdoc index 2ffae79633..eb94194101 100644 --- a/src/routes/docs/tooling/command-line/projects/+page.markdoc +++ b/src/routes/docs/tooling/command-line/projects/+page.markdoc @@ -4,7 +4,7 @@ title: Deploy project with CLI 2.0 description: Efficiently deploy your Appwrite project using the Command-Line Tool (CLI). --- -After you're logged in, the CLI needs to be initialized with your Appwrite project. Install and CLI Appwrite [here](/docs/tooling/command-line/installation). +After you're logged in, the CLI needs to be initialized with your Appwrite project. Install and CLI Appwrite [here](/docs/tooling/command-line/installation#Installation). # Pull project {% #pull-project %} diff --git a/src/routes/docs/tooling/command-line/teams/+page.markdoc b/src/routes/docs/tooling/command-line/teams/+page.markdoc index 479288fd35..42969ce94e 100644 --- a/src/routes/docs/tooling/command-line/teams/+page.markdoc +++ b/src/routes/docs/tooling/command-line/teams/+page.markdoc @@ -4,7 +4,7 @@ title: Deploy teams with CLI 2.0 description: Efficiently deploy your Appwrite teams using the Command-Line Tool (CLI). --- -The Appwrite CLI can create teams to organize users. Teams can be used to grant access [permissions](https://appwrite.io/docs/products/auth/teams#permissions) to a group of users. Install and initialize CLI Appwrite [here](/docs/tooling/command-line/installation). +The Appwrite CLI can create teams to organize users. Teams can be used to grant access [permissions](https://appwrite.io/docs/products/auth/teams#permissions) to a group of users. Install and initialize CLI Appwrite [here](/docs/tooling/command-line/installation#Installation). # Pull team {% #pull-team %} diff --git a/src/routes/docs/tooling/command-line/topics/+page.markdoc b/src/routes/docs/tooling/command-line/topics/+page.markdoc index a4196067eb..72c84a866a 100644 --- a/src/routes/docs/tooling/command-line/topics/+page.markdoc +++ b/src/routes/docs/tooling/command-line/topics/+page.markdoc @@ -4,7 +4,7 @@ title: Deploy topics with CLI 2.0 description: Efficiently deploy your Appwrite topics using the Command-Line Tool (CLI). --- -The Appwrite CLI can create, set, delete, and configure topics. Install and initialize CLI Appwrite [here](/docs/tooling/command-line/installation). +The Appwrite CLI can create, set, delete, and configure topics. Install and initialize CLI Appwrite [here](/docs/tooling/command-line/installation#Installation). # Pull topics {% #pull-topics %} From 91692f5199674d1306091859d0f06a9636f148a5 Mon Sep 17 00:00:00 2001 From: choir27 Date: Tue, 2 Jul 2024 16:43:54 -0400 Subject: [PATCH 28/66] docs: remove 2.0 from CLI, reword introduction so the word here is not used for href redirects --- src/routes/docs/tooling/command-line/buckets/+page.markdoc | 4 ++-- .../docs/tooling/command-line/collections/+page.markdoc | 4 ++-- src/routes/docs/tooling/command-line/functions/+page.markdoc | 4 ++-- src/routes/docs/tooling/command-line/projects/+page.markdoc | 4 ++-- src/routes/docs/tooling/command-line/teams/+page.markdoc | 4 ++-- src/routes/docs/tooling/command-line/topics/+page.markdoc | 4 ++-- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/routes/docs/tooling/command-line/buckets/+page.markdoc b/src/routes/docs/tooling/command-line/buckets/+page.markdoc index 113ba3fcbb..97f49e663f 100644 --- a/src/routes/docs/tooling/command-line/buckets/+page.markdoc +++ b/src/routes/docs/tooling/command-line/buckets/+page.markdoc @@ -1,10 +1,10 @@ --- layout: article -title: Deploy buckets with CLI 2.0 +title: Deploy buckets with CLI description: Efficiently deploy your Appwrite buckets using the Command-Line Tool (CLI). --- -The Appwrite CLI allows you to configure and deploy buckets across projects. Install and initialize CLI Appwrite [here](/docs/tooling/command-line/installation#Installation). +The Appwrite CLI allows you to configure and deploy buckets across projects. Make sure you [install and initialize](/docs/tooling/command-line/installation#Installation) your CLI Appwrite project. # Pull bucket {% #pull-bucket %} diff --git a/src/routes/docs/tooling/command-line/collections/+page.markdoc b/src/routes/docs/tooling/command-line/collections/+page.markdoc index d7425d7025..c9c08870f2 100644 --- a/src/routes/docs/tooling/command-line/collections/+page.markdoc +++ b/src/routes/docs/tooling/command-line/collections/+page.markdoc @@ -1,10 +1,10 @@ --- layout: article -title: Deploy collections with CLI 2.0 +title: Deploy collections with CLI description: Efficiently deploy your Appwrite collections using the Command-Line Tool (CLI). --- -Create and manage your collections using the CLI 2.0 commands. Install and initialize CLI Appwrite [here](/docs/tooling/command-line/installation#Installation). +Create and manage your collections using the CLI commands. Make sure you [install and initialize](/docs/tooling/command-line/installation#Installation) your CLI Appwrite project. The Appwrite CLI also helps you deploy your project's databases and collections schema from one project to another. diff --git a/src/routes/docs/tooling/command-line/functions/+page.markdoc b/src/routes/docs/tooling/command-line/functions/+page.markdoc index 557aa1673c..2883c8389f 100644 --- a/src/routes/docs/tooling/command-line/functions/+page.markdoc +++ b/src/routes/docs/tooling/command-line/functions/+page.markdoc @@ -1,10 +1,10 @@ --- layout: article -title: Deploy functions with CLI 2.0 +title: Deploy functions with CLI description: Efficiently deploy your Appwrite functions using the Command-Line Tool (CLI). --- -The CLI handles the creation and deployment of Appwrite Functions. Install and initialize CLI Appwrite [here](/docs/tooling/command-line/installation#Installation). +The CLI handles the creation and deployment of Appwrite Functions. Make sure you [install and initialize](/docs/tooling/command-line/installation#Installation) your CLI Appwrite project. # Pull function {% #pull-function %} diff --git a/src/routes/docs/tooling/command-line/projects/+page.markdoc b/src/routes/docs/tooling/command-line/projects/+page.markdoc index eb94194101..6ad4cb898b 100644 --- a/src/routes/docs/tooling/command-line/projects/+page.markdoc +++ b/src/routes/docs/tooling/command-line/projects/+page.markdoc @@ -1,10 +1,10 @@ --- layout: article -title: Deploy project with CLI 2.0 +title: Deploy project with CLI description: Efficiently deploy your Appwrite project using the Command-Line Tool (CLI). --- -After you're logged in, the CLI needs to be initialized with your Appwrite project. Install and CLI Appwrite [here](/docs/tooling/command-line/installation#Installation). +After you're logged in, the CLI needs to be initialized with your Appwrite project. Make sure you [install and initialize](/docs/tooling/command-line/installation#Installation) your CLI Appwrite project. # Pull project {% #pull-project %} diff --git a/src/routes/docs/tooling/command-line/teams/+page.markdoc b/src/routes/docs/tooling/command-line/teams/+page.markdoc index 42969ce94e..248a40b883 100644 --- a/src/routes/docs/tooling/command-line/teams/+page.markdoc +++ b/src/routes/docs/tooling/command-line/teams/+page.markdoc @@ -1,10 +1,10 @@ --- layout: article -title: Deploy teams with CLI 2.0 +title: Deploy teams with CLI description: Efficiently deploy your Appwrite teams using the Command-Line Tool (CLI). --- -The Appwrite CLI can create teams to organize users. Teams can be used to grant access [permissions](https://appwrite.io/docs/products/auth/teams#permissions) to a group of users. Install and initialize CLI Appwrite [here](/docs/tooling/command-line/installation#Installation). +The Appwrite CLI can create teams to organize users. Teams can be used to grant access [permissions](https://appwrite.io/docs/products/auth/teams#permissions) to a group of users. Make sure you [install and initialize](/docs/tooling/command-line/installation#Installation) your CLI Appwrite project. # Pull team {% #pull-team %} diff --git a/src/routes/docs/tooling/command-line/topics/+page.markdoc b/src/routes/docs/tooling/command-line/topics/+page.markdoc index 72c84a866a..32b64a1728 100644 --- a/src/routes/docs/tooling/command-line/topics/+page.markdoc +++ b/src/routes/docs/tooling/command-line/topics/+page.markdoc @@ -1,10 +1,10 @@ --- layout: article -title: Deploy topics with CLI 2.0 +title: Deploy topics with CLI description: Efficiently deploy your Appwrite topics using the Command-Line Tool (CLI). --- -The Appwrite CLI can create, set, delete, and configure topics. Install and initialize CLI Appwrite [here](/docs/tooling/command-line/installation#Installation). +The Appwrite CLI can create, set, delete, and configure topics. Make sure you [install and initialize](/docs/tooling/command-line/installation#Installation) your CLI Appwrite project. # Pull topics {% #pull-topics %} From e9fe99353d57d4954ec2c802c73cd4a40b43b34d Mon Sep 17 00:00:00 2001 From: choir27 Date: Wed, 3 Jul 2024 10:33:59 -0400 Subject: [PATCH 29/66] docs: update CLI code snippet syntax highlighting for consistency. Move and update word choice and sentence structure of version disclaimer --- .../docs/products/auth/teams/+page.markdoc | 4 +- .../databases/collections/+page.markdoc | 4 +- .../functions/deploy-manually/+page.markdoc | 4 +- .../products/storage/buckets/+page.markdoc | 4 +- .../docs/tooling/command-line/+layout.svelte | 4 - .../command-line/buckets/+page.markdoc | 6 +- .../command-line/collections/+page.markdoc | 6 +- .../command-line/commands/+page.markdoc | 115 +++++++++++------- .../command-line/functions/+page.markdoc | 6 +- .../command-line/installation/+page.markdoc | 4 - .../command-line/projects/+page.markdoc | 94 -------------- .../tooling/command-line/teams/+page.markdoc | 6 +- .../tooling/command-line/topics/+page.markdoc | 6 +- 13 files changed, 91 insertions(+), 172 deletions(-) delete mode 100644 src/routes/docs/tooling/command-line/projects/+page.markdoc diff --git a/src/routes/docs/products/auth/teams/+page.markdoc b/src/routes/docs/products/auth/teams/+page.markdoc index 7aace2d28f..5f911e6662 100644 --- a/src/routes/docs/products/auth/teams/+page.markdoc +++ b/src/routes/docs/products/auth/teams/+page.markdoc @@ -195,13 +195,13 @@ Before you can deploy with the Appwrite CLI, make sure you've [installed and ini To manually deploy your Appwrite teams, you need to pull in your current Appwrite teams by using the following command: -```bash +```sh appwrite pull teams ``` Push any configurations or changes you made to the generated code by using the following command: -```bash +```sh appwrite push teams ``` {% arrow_link href="/docs/tooling/command-line/teams#commands" %} diff --git a/src/routes/docs/products/databases/collections/+page.markdoc b/src/routes/docs/products/databases/collections/+page.markdoc index 53eaf46b4a..59a125ed40 100644 --- a/src/routes/docs/products/databases/collections/+page.markdoc +++ b/src/routes/docs/products/databases/collections/+page.markdoc @@ -281,13 +281,13 @@ You can create an index by navigating to your collection's **Indexes** tab or by Before you can deploy with the Appwrite CLI, make sure you've [installed and initialized](/docs/tooling/command-line/installation) the CLI and [logged-in](/docs/tooling/command-line/installation#get-started) into your Appwrite account. {% /info %} -```bash +```sh appwrite pull collections ``` Push any configurations or changes you made to the generated code by using the following command: -```bash +```sh appwrite push collections ``` diff --git a/src/routes/docs/products/functions/deploy-manually/+page.markdoc b/src/routes/docs/products/functions/deploy-manually/+page.markdoc index 5f9c405041..2d74fb0305 100644 --- a/src/routes/docs/products/functions/deploy-manually/+page.markdoc +++ b/src/routes/docs/products/functions/deploy-manually/+page.markdoc @@ -19,13 +19,13 @@ Before you can deploy with the Appwrite CLI, make sure you've [installed and ini To deploy with the Appwrite CLI, your function must be added to `appwrite.json`. Use the `appwrite init function` method to create a starter function, then paste in your function code. -```bash +```sh appwrite init function ``` Edit the generated code, add dependencies, and deploy the function using the following command: -```bash +```sh appwrite deploy function ``` {% arrow_link href="/docs/tooling/command-line/functions#commands" %} diff --git a/src/routes/docs/products/storage/buckets/+page.markdoc b/src/routes/docs/products/storage/buckets/+page.markdoc index 540583d871..729ad6ad63 100644 --- a/src/routes/docs/products/storage/buckets/+page.markdoc +++ b/src/routes/docs/products/storage/buckets/+page.markdoc @@ -18,13 +18,13 @@ Before you can deploy with the Appwrite CLI, make sure you've [installed and ini To manually deploy your Appwrite buckets, you need to pull in your current Appwrite buckets by using the following command: -```bash +```sh appwrite pull buckets ``` Push any configurations or changes you made to the generated code by using the following command: -```bash +```sh appwrite push buckets ``` {% arrow_link href="/docs/tooling/command-line/buckets#commands" %} diff --git a/src/routes/docs/tooling/command-line/+layout.svelte b/src/routes/docs/tooling/command-line/+layout.svelte index c881f8b21e..c9cb16817a 100644 --- a/src/routes/docs/tooling/command-line/+layout.svelte +++ b/src/routes/docs/tooling/command-line/+layout.svelte @@ -28,10 +28,6 @@ { label: 'Deployments', items: [ - { - label: 'Projects', - href: '/docs/tooling/command-line/projects' - }, { label: 'Collections', href: '/docs/tooling/command-line/collections' diff --git a/src/routes/docs/tooling/command-line/buckets/+page.markdoc b/src/routes/docs/tooling/command-line/buckets/+page.markdoc index 97f49e663f..fb43d7b37f 100644 --- a/src/routes/docs/tooling/command-line/buckets/+page.markdoc +++ b/src/routes/docs/tooling/command-line/buckets/+page.markdoc @@ -14,11 +14,11 @@ You can pull your Appwrite bucket's customizable settings using the `pull` comma appwrite pull buckets ``` -# Appwrite.json {% #appwritejson %} +# appwrite.json {% #appwritejson %} -After pulling your Appwrite function, your `Appwrite.json` file should look similar to the following: +After pulling your Appwrite function, your `appwrite.json` file should look similar to the following: -``` +```server-nodejs { "projectId": "", "buckets": [ diff --git a/src/routes/docs/tooling/command-line/collections/+page.markdoc b/src/routes/docs/tooling/command-line/collections/+page.markdoc index c9c08870f2..682c7b2567 100644 --- a/src/routes/docs/tooling/command-line/collections/+page.markdoc +++ b/src/routes/docs/tooling/command-line/collections/+page.markdoc @@ -16,11 +16,11 @@ You can pull your Appwrite collection's and database's customizable settings usi appwrite pull collections ``` -# Appwrite.json {% #appwritejson %} +# appwrite.json {% #appwritejson %} -After pulling your Appwrite function, your `Appwrite.json` file should look similar to the following: +After pulling your Appwrite function, your `appwrite.json` file should look similar to the following: -``` +```node-server { "projectId": "", "databases": [ diff --git a/src/routes/docs/tooling/command-line/commands/+page.markdoc b/src/routes/docs/tooling/command-line/commands/+page.markdoc index 2ba995e0c3..c3ca1611b5 100644 --- a/src/routes/docs/tooling/command-line/commands/+page.markdoc +++ b/src/routes/docs/tooling/command-line/commands/+page.markdoc @@ -4,7 +4,11 @@ title: Commands description: Learn about Appwrites CLI and the powerful, feature complete commands to manage Appwrite's auth, databases, functions, storage, and more. --- -Other than commands to create and deploy databases, collections, functions, teams, and buckets, the Appwrite CLI can be used as a Server SDK as well. The Appwrite CLI has a command for every Server API endpoint. +{% info title="CLI Version" %} +It is highly recommended that you have the latest version of the CLI; [update your CLI](https://www.npmjs.com/package/appwrite-cli-beta). +{% /info %} + +Other than commands to create and push databases, collections, functions, teams, and buckets, the Appwrite CLI can be used as a Server SDK as well. The Appwrite CLI has a command for every Server API endpoint. Commands follows the following general syntax: @@ -15,6 +19,8 @@ appwrite [COMMAND] [OPTIONS] # Commands {% #commands %} Below is a list of the available commands in the Appwrite CLI. You can get more information on each command by running `appwrite [COMMAND] --help`. + +## Appwrite account commands {% #appwrite-account-commands %} {% table %} * Command @@ -23,48 +29,52 @@ Below is a list of the available commands in the Appwrite CLI. You can get more * `login [options]` * The login command allows you to authenticate into the CLI. This command expects the console account that you use to log into the Appwrite Console. --- -* `client [options]` -* The client command allows you to configure your CLI. ---- -* `init [options]` -* The init command helps you initialize your Appwrite project, databases, collections, functions, teams, and buckets. ---- -* `deploy | push` -* The deploy command provides a convenient wrapper for deploying your databases, collections, functions, teams, and buckets. ---- * `logout` * The logout command allows you to logout from the CLI. --- -* `projects` -* The projects command allows you to view, create, and manage your Appwrite projects. ---- -* `storage` -* The storage command allows you to manage your project files. +* `register` +* Prints link to register an Appwrite account. --- -* `teams` -* The teams command allows you to group users of your project and to enable them to share access permissions to your project's resources. +* `whoami` +* The whomai command gives information about the currently logged in user. --- -* `users` -* The users command allows you to manage your project users. +{% /table %} + +## Appwrite push commands {% #appwrite-push-commands %} + +{% table %} +* Command +* Description --- -* `account` -* The account command allows you to authenticate as and manage a user account. +* `init [options]` +* The init command helps you initialize your Appwrite project, databases, collections, functions, teams, and buckets. --- -* `avatars` -* The avatars command provides utilities to manage images, icons, and avatars. +* `pull` +* The pull command helps you pull your Appwrite project, functions, collections, buckets, teams, and messaging --- -* `functions` -* The functions command allows you view, create and manage your Appwrite Functions. +* `push` +* The push command provides a convenient wrapper for pushing your databases, collections, functions, teams, and buckets. --- -* `databases` -* The databases command allows you to create structured collections of documents, query and filter lists of documents. +* `run` +* The run command allows you to run projects locally to allow easy development and quick debugging --- -* `locale` -* The locale command allows you to customize your app based on your users' location. +{% /table %} + +## General commands {% #general-commands %} + +{% table %} +* Command +* Description --- * `assistant` * The assistant command allows you to interact with the Appwrite Assistant AI. --- +* `client [options]` +* The client command allows you to configure your CLI. +--- +* `locale` +* The locale command allows you to customize your app based on your users' location. +--- * `console` * The console command gives you access to the APIs used by the Appwrite console. --- @@ -74,34 +84,45 @@ Below is a list of the available commands in the Appwrite CLI. You can get more * `health` * The health command allows you to both validate and monitor your Appwrite server's health. --- -* `messaging` -* The messaging command allows you to send messages. ---- * `migrations` * The migrations command allows you to migrate data between services. --- -* `project` -* The project command is for overall project administration. +* `vcs` +* The vcs command allows you to interact with VCS providers and manage your code repositories. --- -* `proxy` -* The proxy command allows you to configure behavior for your attached domains. +{% /table %} + +## Appwrite project commands {% #appwrite-project-commands %} + +{% table %} + +* Command +* Description --- -* `pull` -* The pull command helps you pull your Appwrite project, functions, collections, buckets, teams, and messaging +* `account` +* The account command allows you to authenticate as and manage a user account. --- -* `register` -* Prints link to register an Appwrite account. +* `users` +* The users command allows you to manage your project users. --- -* `run | dev` -* The run command allows you to run projects locally to allow easy development and quick debugging +* `teams` +* The teams command allows you to group users of your project and to enable them to share access permissions to your project's resources. --- -* `vcs` -* The vcs command allows you to interact with VCS providers and manage your code repositories. +* `databases` +* The databases command allows you to create structured collections of documents, query and filter lists of documents. --- -* `whoami` -* The whomai command gives information about the currently logged in user. +* `functions` +* The functions command allows you view, create and manage your Appwrite Functions. +--- +* `messaging` +* The messaging command allows you to send messages. +--- +* `storage` +* The storage command allows you to manage your project files. +--- +* `avatars` +* The avatars command provides utilities to manage images, icons, and avatars. --- - {% /table %} {% table %} diff --git a/src/routes/docs/tooling/command-line/functions/+page.markdoc b/src/routes/docs/tooling/command-line/functions/+page.markdoc index 2883c8389f..fa27d2a1a5 100644 --- a/src/routes/docs/tooling/command-line/functions/+page.markdoc +++ b/src/routes/docs/tooling/command-line/functions/+page.markdoc @@ -14,10 +14,10 @@ You can pull your Appwrite functions customizable settings using the `pull` comm appwrite pull functions ``` -# Appwrite.json {% #appwritejson %} +# appwrite.json {% #appwritejson %} -After pulling your Appwrite function, your `Appwrite.json` file should look similar to the following: -``` +After pulling your Appwrite function, your `appwrite.json` file should look similar to the following: +```node-server { "projectId": , "functions": [ diff --git a/src/routes/docs/tooling/command-line/installation/+page.markdoc b/src/routes/docs/tooling/command-line/installation/+page.markdoc index fb858413bf..9b59789199 100644 --- a/src/routes/docs/tooling/command-line/installation/+page.markdoc +++ b/src/routes/docs/tooling/command-line/installation/+page.markdoc @@ -100,10 +100,6 @@ appwrite client --selfSigned true ``` {% /info %} -{% info title="Correct CLI Version Required" %} -All commands only work with **version 2.0** of the CLI and will **not** work on previous versions. Update [here](https://www.npmjs.com/package/appwrite-cli-beta). -{% /info %} - ## Next steps {% #next-steps %} You can use the CLI to create and deploy functions and collections. Deploy commands allow you to configure your Appwrite project programmatically and replicate functions and collection schemas across Appwrite projects. diff --git a/src/routes/docs/tooling/command-line/projects/+page.markdoc b/src/routes/docs/tooling/command-line/projects/+page.markdoc deleted file mode 100644 index 6ad4cb898b..0000000000 --- a/src/routes/docs/tooling/command-line/projects/+page.markdoc +++ /dev/null @@ -1,94 +0,0 @@ ---- -layout: article -title: Deploy project with CLI -description: Efficiently deploy your Appwrite project using the Command-Line Tool (CLI). ---- - -After you're logged in, the CLI needs to be initialized with your Appwrite project. Make sure you [install and initialize](/docs/tooling/command-line/installation#Installation) your CLI Appwrite project. - -# Pull project {% #pull-project %} - -You can pull your Appwrite project's customizable settings using the `pull` command in the folder holding your `appwrite.json` file. - -```sh -appwrite pull project -``` - -# Appwrite.json {% #appwritejson %} - -After pulling your project, your `appwrite.json` project should look similar to this. - -``` -{ - "projectId": "", - "projectName": "EchoVerse", - "projectSettings": { - "services": { - "account": true, - "avatars": true, - "databases": true, - "locale": true, - "health": true, - "storage": true, - "teams": true, - "users": true, - "functions": true, - "graphql": true, - "messaging": true - }, - "auth": { - "methods": { - "jwt": true, - "phone": true, - "invites": true, - "anonymous": true, - "email-otp": true, - "magic-url": true, - "email-password": true - }, - "security": { - "duration": 7200, - "limit": 100, - "sessionsLimit": 10, - "passwordHistory": 0, - "passwordDictionary": false, - "personalDataCheck": false - } - } - } -} -``` - -# Push project {% #push-project %} - -To push the changes you made inside your `appwrite.json` file, use the `push` command in the folder holding your `appwrite.json` file. - -```sh -appwrite push project -``` - -# Commands {% #commands %} - -The project command is for overall project administration. Appwrite database CLI commands generally follow the following syntax: - -```sh -appwrite project [COMMAND] [OPTIONS] -``` -{% table %} ---- -* `getUsage [options]` | `listVariables` -* Get a list of all project variables. These variables will be accessible in all Appwrite Functions at runtime. ---- -* `createVariable [options]` -* Create a new project variable. This variable will be accessible in all Appwrite Functions at runtime. ---- -* `getVariable [options]` -* Get a project variable by its unique ID. ---- -* `updateVariable [options]` -* Update project variable by its unique ID. This variable will be accessible in all Appwrite Functions at runtime. ---- -* `deleteVariable [options]` -* Delete a project variable by its unique ID. ---- -{% /table %} \ No newline at end of file diff --git a/src/routes/docs/tooling/command-line/teams/+page.markdoc b/src/routes/docs/tooling/command-line/teams/+page.markdoc index 248a40b883..1da5374c0a 100644 --- a/src/routes/docs/tooling/command-line/teams/+page.markdoc +++ b/src/routes/docs/tooling/command-line/teams/+page.markdoc @@ -14,10 +14,10 @@ You can pull your Appwrite team's customizable settings using the `pull` command appwrite pull teams ``` -# Appwrite.json {% #appwritejson %} -After pulling your Appwrite function, your `Appwrite.json` file should look similar to the following: +# appwrite.json {% #appwritejson %} +After pulling your Appwrite function, your `appwrite.json` file should look similar to the following: -``` +```server-nodejs { "projectId": "", "teams": [ diff --git a/src/routes/docs/tooling/command-line/topics/+page.markdoc b/src/routes/docs/tooling/command-line/topics/+page.markdoc index 32b64a1728..50b922c774 100644 --- a/src/routes/docs/tooling/command-line/topics/+page.markdoc +++ b/src/routes/docs/tooling/command-line/topics/+page.markdoc @@ -14,11 +14,11 @@ You can pull your Appwrite topics customizable settings using the `pull` command appwrite pull topics ``` -# Appwrite.json {% #appwritejson %} +# appwrite.json {% #appwritejson %} -After pulling your Appwrite function, your `Appwrite.json` file should look similar to the following: +After pulling your Appwrite function, your `appwrite.json` file should look similar to the following: -``` +```server-nodejs { "projectId": "", "topics": [ From bc5f28ae7443c6ecd432a7b7d6585fc2b0d5d85e Mon Sep 17 00:00:00 2001 From: choir27 Date: Wed, 3 Jul 2024 12:55:53 -0400 Subject: [PATCH 30/66] docs: add init sections, remove projects cli docs, apply some changes from PR #992 --- .../functions/deploy-manually/+page.markdoc | 12 ++++-- .../functions/functions/+page.markdoc | 19 +++++++--- .../command-line/buckets/+page.markdoc | 16 +++++++- .../command-line/collections/+page.markdoc | 20 ++++++++-- .../command-line/commands/+page.markdoc | 38 +++++++++++++++++-- .../command-line/functions/+page.markdoc | 20 ++++++++-- .../command-line/installation/+page.markdoc | 7 ++++ .../non-interactive/+page.markdoc | 31 ++++++++------- .../tooling/command-line/teams/+page.markdoc | 16 +++++++- .../tooling/command-line/topics/+page.markdoc | 15 +++++++- 10 files changed, 157 insertions(+), 37 deletions(-) diff --git a/src/routes/docs/products/functions/deploy-manually/+page.markdoc b/src/routes/docs/products/functions/deploy-manually/+page.markdoc index 2d74fb0305..08470fb330 100644 --- a/src/routes/docs/products/functions/deploy-manually/+page.markdoc +++ b/src/routes/docs/products/functions/deploy-manually/+page.markdoc @@ -17,16 +17,22 @@ Before you can deploy with the Appwrite CLI, make sure you've [installed and ini {% /info %} To deploy with the Appwrite CLI, your function must be added to `appwrite.json`. -Use the `appwrite init function` method to create a starter function, then paste in your function code. +You can pull an existing function: + +```sh +appwrite pull functions +``` + +Or you can create a function: ```sh appwrite init function ``` -Edit the generated code, add dependencies, and deploy the function using the following command: +Edit the generated code, add dependencies, and push the function using the following command: ```sh -appwrite deploy function +appwrite push function ``` {% arrow_link href="/docs/tooling/command-line/functions#commands" %} Learn more about the CLI functions commands diff --git a/src/routes/docs/products/functions/functions/+page.markdoc b/src/routes/docs/products/functions/functions/+page.markdoc index 0d72670996..5c82582167 100644 --- a/src/routes/docs/products/functions/functions/+page.markdoc +++ b/src/routes/docs/products/functions/functions/+page.markdoc @@ -69,18 +69,25 @@ Remember to specify the build commands for your function to install dependencies You can create functions using the CLI, without needing to access the Console. Before you can deploy with the Appwrite CLI, make sure you've [initialized the CLI.](/docs/tooling/command-line/installation) -To deploy with the Appwrite CLI, your function must be added to your `appwrite.json` config file. -Use the `appwrite init function` method to create a starter function, then paste in your function code. +To deploy with the Appwrite CLI, your function must be added to your `appwrite.json` config file. -```bash +You can pull an existing function: + +```sh +appwrite pull functions +``` + +Or you can create a function: + +```sh appwrite init function ``` The init command will initialize a folder with a starter function code. -To deploy the generated code, add dependencies, and deploy the function using the following command: +To push the generated code, add dependencies, and deploy the function using the following command: -```bash -appwrite deploy function +```sh +appwrite push function ``` {% /tabsitem %} {% /tabs %} diff --git a/src/routes/docs/tooling/command-line/buckets/+page.markdoc b/src/routes/docs/tooling/command-line/buckets/+page.markdoc index fb43d7b37f..11a5aa34ef 100644 --- a/src/routes/docs/tooling/command-line/buckets/+page.markdoc +++ b/src/routes/docs/tooling/command-line/buckets/+page.markdoc @@ -6,9 +6,21 @@ description: Efficiently deploy your Appwrite buckets using the Command-Line Too The Appwrite CLI allows you to configure and deploy buckets across projects. Make sure you [install and initialize](/docs/tooling/command-line/installation#Installation) your CLI Appwrite project. +# Initialize bucket {% #initialize-bucket %} + +Initialize your new bucket using the following command: + +```sh +appwrite init bucket +? What would you like to name your bucket? My Awesome Bucket +? What ID would you like to have for your bucket? unique() +? Enable File-Security configuring permissions for individual file No +✓ Success +``` + # Pull bucket {% #pull-bucket %} -You can pull your Appwrite bucket's customizable settings using the `pull` command in the folder holding your `appwrite.json` file. +You can pull your Appwrite buckets using the `pull` command in the folder holding your `appwrite.json` file. ```sh appwrite pull buckets @@ -16,7 +28,7 @@ appwrite pull buckets # appwrite.json {% #appwritejson %} -After pulling your Appwrite function, your `appwrite.json` file should look similar to the following: +Your `appwrite.json` file should look similar to the following: ```server-nodejs { diff --git a/src/routes/docs/tooling/command-line/collections/+page.markdoc b/src/routes/docs/tooling/command-line/collections/+page.markdoc index 682c7b2567..bacdc0ef79 100644 --- a/src/routes/docs/tooling/command-line/collections/+page.markdoc +++ b/src/routes/docs/tooling/command-line/collections/+page.markdoc @@ -6,11 +6,25 @@ description: Efficiently deploy your Appwrite collections using the Command-Line Create and manage your collections using the CLI commands. Make sure you [install and initialize](/docs/tooling/command-line/installation#Installation) your CLI Appwrite project. -The Appwrite CLI also helps you deploy your project's databases and collections schema from one project to another. +The Appwrite CLI also helps you push your project's databases and collections schema from one project to another. + +# Init collection {% #init-collection %} + +Initialize your new collection using the following command: + +```sh +appwrite init collection +? What would you like to name your database? My Awesome Database +? What ID would you like to have for your database? unique() +? What would you like to name your collection? My Awesome Collection +? What ID would you like to have for your collection? unique() +? Enable Document-Security for configuring permissions for individual documents No +✓ Success +``` # Pull collection {% #pull-collection %} -You can pull your Appwrite collection's and database's customizable settings using the `pull` command in the folder holding your `appwrite.json` file. +You also can pull your Appwrite collections and databases using the `pull` command in the folder holding your `appwrite.json` file. ```sh appwrite pull collections @@ -20,7 +34,7 @@ appwrite pull collections After pulling your Appwrite function, your `appwrite.json` file should look similar to the following: -```node-server +```server-nodejs { "projectId": "", "databases": [ diff --git a/src/routes/docs/tooling/command-line/commands/+page.markdoc b/src/routes/docs/tooling/command-line/commands/+page.markdoc index c3ca1611b5..a5e9ce7166 100644 --- a/src/routes/docs/tooling/command-line/commands/+page.markdoc +++ b/src/routes/docs/tooling/command-line/commands/+page.markdoc @@ -5,7 +5,7 @@ description: Learn about Appwrites CLI and the powerful, feature complete comman --- {% info title="CLI Version" %} -It is highly recommended that you have the latest version of the CLI; [update your CLI](https://www.npmjs.com/package/appwrite-cli-beta). +It is highly recommended that you have the latest version of the CLI; [update your CLI](https://www.npmjs.com/package/appwrite-cli-beta) by running `npm install -g appwrite-cli-beta@latest`. {% /info %} Other than commands to create and push databases, collections, functions, teams, and buckets, the Appwrite CLI can be used as a Server SDK as well. The Appwrite CLI has a command for every Server API endpoint. @@ -47,10 +47,10 @@ Below is a list of the available commands in the Appwrite CLI. You can get more * Description --- * `init [options]` -* The init command helps you initialize your Appwrite project, databases, collections, functions, teams, and buckets. +* The init command helps you initialize your Appwrite project, databases, collections, functions, teams, messaging-topics, and buckets. --- * `pull` -* The pull command helps you pull your Appwrite project, functions, collections, buckets, teams, and messaging +* The pull command helps you pull your Appwrite project, functions, collections, buckets, teams, and messaging-topics. --- * `push` * The push command provides a convenient wrapper for pushing your databases, collections, functions, teams, and buckets. @@ -172,6 +172,38 @@ By default, output is rendered in a tabular format. To format the output as JSON appwrite users list --json ``` +# Force {% #force %} +By default, when pushing or pulling resources, Appwrite CLI asks you to confirm in a destructive use case. Use the `--force` flag to verify all questions. + +```sh +appwrite push collections --force +``` + +# All {% #all %} +By default, when pushing or pulling resources, Appwrite CLI would ask you to select specific resources. Use the `--all` flag to select all available options. + +```sh +appwrite pull functions --all +``` + +# Error reporting {% #report %} +If you encounter errors with any command, you can use the --report flag to generate a GitHub reporting link. + +```sh +appwrite login --report +``` + +# View on console {% #console-flow %} +Many resources support the option to view them in the console. Use the `--console` flag to get a direct link to the console, and add the optional `--open` flag to automatically open it in the default browser. + +```sh +appwrite databases getDocument \ + --databaseId DATABASE_ID \ + --collectionId COLLECTION_ID \ + --documentId DOCUMENT_ID \ + --console --open +``` + # Examples {% #examples %} ## Create user {% #create-user %} diff --git a/src/routes/docs/tooling/command-line/functions/+page.markdoc b/src/routes/docs/tooling/command-line/functions/+page.markdoc index fa27d2a1a5..eedd482c1e 100644 --- a/src/routes/docs/tooling/command-line/functions/+page.markdoc +++ b/src/routes/docs/tooling/command-line/functions/+page.markdoc @@ -6,9 +6,22 @@ description: Efficiently deploy your Appwrite functions using the Command-Line T The CLI handles the creation and deployment of Appwrite Functions. Make sure you [install and initialize](/docs/tooling/command-line/installation#Installation) your CLI Appwrite project. +# Init function {% #init-function %} + +Initialize your new function using the following command: + +```sh +appwrite init function +? What would you like to name your function? My Awesome Function +? What ID would you like to have for your function? unique() +? What runtime would you like to use? Node.js (node-16.0) +? What template would you like to use? Starter +✓ Success +``` + # Pull function {% #pull-function %} -You can pull your Appwrite functions customizable settings using the `pull` command in the folder holding your `appwrite.json` file. +You can also pull your existing Appwrite functions using the `pull` command in the folder holding your `appwrite.json` file. ```sh appwrite pull functions @@ -16,8 +29,9 @@ appwrite pull functions # appwrite.json {% #appwritejson %} -After pulling your Appwrite function, your `appwrite.json` file should look similar to the following: -```node-server +Your `appwrite.json` file should look similar to the following: + +```server-nodejs { "projectId": , "functions": [ diff --git a/src/routes/docs/tooling/command-line/installation/+page.markdoc b/src/routes/docs/tooling/command-line/installation/+page.markdoc index 9b59789199..730b1a33cb 100644 --- a/src/routes/docs/tooling/command-line/installation/+page.markdoc +++ b/src/routes/docs/tooling/command-line/installation/+page.markdoc @@ -70,6 +70,13 @@ Before you can use the CLI, you need to login to your Appwrite account using appwrite login ``` +In case of a self-hosted instance, add the `self-hosted` flag. + +```sh +appwrite login --self-hosted +``` +You can log-in to multiple accounts or change the **current** account by simply running the command again. + # Initialization {% #Initialization %} After you're logged in, the CLI needs to be initialized with your Appwrite project. You can initialize the CLI using: diff --git a/src/routes/docs/tooling/command-line/non-interactive/+page.markdoc b/src/routes/docs/tooling/command-line/non-interactive/+page.markdoc index 6a04beb2e7..49cfdbbae6 100644 --- a/src/routes/docs/tooling/command-line/non-interactive/+page.markdoc +++ b/src/routes/docs/tooling/command-line/non-interactive/+page.markdoc @@ -31,38 +31,43 @@ In non-interactive mode, the CLI uses an API key to authenticate. Your API key m {% /table %} # Deployment {% #deployment %} -Appwrite's deploy commands can also be executed in a non-interactive mode. This applies to both function and collection deployment. +Appwrite's `push` commands can also be executed in a non-interactive mode. This applies to the following resources: functions, collections, buckets, teams, and messaging topics. -You can deploy a function non-interactively by using the `--yes` option to skip all warnings and specifying which functions you want to deploy. +You can push a resource non-interactively by using the `--force` option to skip all warnings and specifying which resources you want to deploy. -Deploy a single function by ID: +To push all available resources: ```sh -appwrite deploy function --functionId [FUNCTION ID] --yes +appwrite push all --all --force ``` -Deploy all functions: +To push a single funciton by ID: +```sh +appwrite push function --functionId [FUNCTION ID] --force +``` + +Push all functions: ```sh -appwrite deploy function --all --yes +appwrite push function --all --force ``` -You can deploy databases, collections, teams, and buckets non-interactively in a similar way by using the `--all` and `--yes` option. +You can push databases, collections, teams, and buckets non-interactively in a similar way by using the `--all` and `--force` option. -Deploy all databases and collections: +Push all databases and collections: ```sh -appwrite deploy collection --all --yes +appwrite push collection --all --force ``` -Deploy all teams: +Push all teams: ```sh -appwrite deploy team --all --yes +appwrite push team --all --force ``` -Deploy all buckets: +Push all buckets: ```sh -appwrite deploy buckets --all --yes +appwrite push buckets --all --force ``` \ No newline at end of file diff --git a/src/routes/docs/tooling/command-line/teams/+page.markdoc b/src/routes/docs/tooling/command-line/teams/+page.markdoc index 1da5374c0a..5e7f6d7958 100644 --- a/src/routes/docs/tooling/command-line/teams/+page.markdoc +++ b/src/routes/docs/tooling/command-line/teams/+page.markdoc @@ -6,16 +6,28 @@ description: Efficiently deploy your Appwrite teams using the Command-Line Tool The Appwrite CLI can create teams to organize users. Teams can be used to grant access [permissions](https://appwrite.io/docs/products/auth/teams#permissions) to a group of users. Make sure you [install and initialize](/docs/tooling/command-line/installation#Installation) your CLI Appwrite project. +# Initialize team {% #initialize-team %} + +Initialize your new team using the following command: + +```sh +appwrite init team +? What would you like to name your team? My Awesome Team? +What ID would you like to have for your team? unique() +✓ Success +ℹ Info Next you can use 'appwrite push team' to deploy the changes. +``` + # Pull team {% #pull-team %} -You can pull your Appwrite team's customizable settings using the `pull` command in the folder holding your `appwrite.json` file. +You can also pull your existing Appwrite teams using the `pull` command in the folder holding your `appwrite.json` file. ```sh appwrite pull teams ``` # appwrite.json {% #appwritejson %} -After pulling your Appwrite function, your `appwrite.json` file should look similar to the following: +Your `appwrite.json` file should look similar to the following: ```server-nodejs { diff --git a/src/routes/docs/tooling/command-line/topics/+page.markdoc b/src/routes/docs/tooling/command-line/topics/+page.markdoc index 50b922c774..0c9d2c03df 100644 --- a/src/routes/docs/tooling/command-line/topics/+page.markdoc +++ b/src/routes/docs/tooling/command-line/topics/+page.markdoc @@ -6,9 +6,20 @@ description: Efficiently deploy your Appwrite topics using the Command-Line Tool The Appwrite CLI can create, set, delete, and configure topics. Make sure you [install and initialize](/docs/tooling/command-line/installation#Installation) your CLI Appwrite project. +# Initialize topic {% #initialize-topic %} + +Initialize your new topic using the following command: + +``` +appwrite init topic +? What would you like to name your messaging topic? My Awesome Topic +? What ID would you like to have for your messaging topic? unique() +✓ Success +``` + # Pull topics {% #pull-topics %} -You can pull your Appwrite topics customizable settings using the `pull` command in the folder holding your `appwrite.json` file. +You can also pull your existing Appwrite topics using the `pull` command in the folder holding your `appwrite.json` file. ```sh appwrite pull topics @@ -16,7 +27,7 @@ appwrite pull topics # appwrite.json {% #appwritejson %} -After pulling your Appwrite function, your `appwrite.json` file should look similar to the following: +Your `appwrite.json` file should look similar to the following: ```server-nodejs { From be7b04a922093d66e84196fe415abfbfd6edd7ad Mon Sep 17 00:00:00 2001 From: choir27 Date: Wed, 3 Jul 2024 15:52:33 -0400 Subject: [PATCH 31/66] docs: remove two spaces, update word choice for overwrite warning and CLI docs overview, update href link --- .../docs/products/auth/teams/+page.markdoc | 2 +- .../products/databases/collections/+page.markdoc | 2 +- .../functions/deploy-manually/+page.markdoc | 4 ++-- .../products/functions/functions/+page.markdoc | 4 ++-- .../docs/products/messaging/topics/+page.markdoc | 8 ++++---- .../docs/products/storage/buckets/+page.markdoc | 2 +- .../tooling/command-line/buckets/+page.markdoc | 14 +++++++------- .../command-line/collections/+page.markdoc | 4 ++-- .../tooling/command-line/functions/+page.markdoc | 16 ++++++++-------- .../command-line/installation/+page.markdoc | 2 +- .../tooling/command-line/teams/+page.markdoc | 10 +++++----- .../tooling/command-line/topics/+page.markdoc | 2 +- 12 files changed, 35 insertions(+), 35 deletions(-) diff --git a/src/routes/docs/products/auth/teams/+page.markdoc b/src/routes/docs/products/auth/teams/+page.markdoc index 5f911e6662..ac2868e56d 100644 --- a/src/routes/docs/products/auth/teams/+page.markdoc +++ b/src/routes/docs/products/auth/teams/+page.markdoc @@ -210,7 +210,7 @@ Learn more about the CLI team commands ## Overwrite warning {% #overwrite-warning %} -If you made changes in the Appwrite Console that are different from your `appwrite.json`, using the CLI push command will overwrite your console changes. Update your `appwrite.json` manually before pushing. +If you made changes in the Appwrite Console that are different from your `appwrite.json,` using the CLI deploy command will overwrite your console changes. Update your `appwrite.json` manually before deploying. {% arrow_link href="/docs/tooling/command-line/teams#appwritejson" %} Learn more about appwrite.json diff --git a/src/routes/docs/products/databases/collections/+page.markdoc b/src/routes/docs/products/databases/collections/+page.markdoc index 59a125ed40..541f4c02b4 100644 --- a/src/routes/docs/products/databases/collections/+page.markdoc +++ b/src/routes/docs/products/databases/collections/+page.markdoc @@ -297,7 +297,7 @@ Learn more about the CLI collections commands ## Overwrite warning {% #overwrite-warning %} -If you made changes in the Appwrite Console that are different from your `appwrite.json`, using the CLI push command will overwrite your console changes. Update your `appwrite.json` manually before pushing. +If you made changes in the Appwrite Console that are different from your `appwrite.json,` using the CLI deploy command will overwrite your console changes. Update your `appwrite.json` manually before deploying. {% arrow_link href="/docs/tooling/command-line/collections#appwritejson" %} Learn more about appwrite.json diff --git a/src/routes/docs/products/functions/deploy-manually/+page.markdoc b/src/routes/docs/products/functions/deploy-manually/+page.markdoc index 08470fb330..0cb3b382da 100644 --- a/src/routes/docs/products/functions/deploy-manually/+page.markdoc +++ b/src/routes/docs/products/functions/deploy-manually/+page.markdoc @@ -16,7 +16,7 @@ you can also create deployments manually or through the Appwrite CLI. Before you can deploy with the Appwrite CLI, make sure you've [installed and initialized](/docs/tooling/command-line/installation) the CLI. {% /info %} -To deploy with the Appwrite CLI, your function must be added to `appwrite.json`. +Your function must be added to `appwrite.json` to deploy with the Appwrite CLI. You can pull an existing function: ```sh @@ -40,7 +40,7 @@ Learn more about the CLI functions commands ## Overwrite warning {% #overwrite-warning %} -If you made changes in the Appwrite Console that are different from your `appwrite.json`, using the CLI deploy command will overwrite your console changes. Update your `appwrite.json` manually before deploying. +If you made changes in the Appwrite Console that are different from your `appwrite.json,` using the CLI deploy command will overwrite your console changes. Update your `appwrite.json` manually before deploying. ## Configure CLI deployments {% #configure-cli-deployments %} If you need to target a different project, API endpoint, change the path or entry point of your function, or update any of the other configuration options, diff --git a/src/routes/docs/products/functions/functions/+page.markdoc b/src/routes/docs/products/functions/functions/+page.markdoc index 5c82582167..400517763d 100644 --- a/src/routes/docs/products/functions/functions/+page.markdoc +++ b/src/routes/docs/products/functions/functions/+page.markdoc @@ -66,10 +66,10 @@ Remember to specify the build commands for your function to install dependencies {% /tabsitem %} {% tabsitem #cli title="CLI" %} -You can create functions using the CLI, without needing to access the Console. +You can create functions using the CLI without needing to access the Console. Before you can deploy with the Appwrite CLI, make sure you've [initialized the CLI.](/docs/tooling/command-line/installation) -To deploy with the Appwrite CLI, your function must be added to your `appwrite.json` config file. +Your function must be added to `appwrite.json` to deploy with the Appwrite CLI. You can pull an existing function: diff --git a/src/routes/docs/products/messaging/topics/+page.markdoc b/src/routes/docs/products/messaging/topics/+page.markdoc index 9c16e7d079..a1e4cb9919 100644 --- a/src/routes/docs/products/messaging/topics/+page.markdoc +++ b/src/routes/docs/products/messaging/topics/+page.markdoc @@ -274,22 +274,22 @@ Before you can deploy with the Appwrite CLI, make sure you've [installed and ini To manually deploy your Appwrite topics, you need to pull in your current Appwrite topics by using the following command: -```bash +```sh appwrite pull topics ``` Push any configurations or changes you made to the generated code by using the following command: -```bash +```sh appwrite push topics ``` {% arrow_link href="/docs/tooling/command-line/topics#commands" %} -Learn more about the CLI topics commands +Learn more about the CLI topic commands {% /arrow_link %} ## Overwrite warning {% #overwrite-warning %} -If you made changes in the Appwrite Console that are different from your `appwrite.json`, using the CLI push command will overwrite your console changes. Update your `appwrite.json` manually before pushing. +If you made changes in the Appwrite Console that are different from your `appwrite.json,` using the CLI deploy command will overwrite your console changes. Update your `appwrite.json` manually before deploying. {% arrow_link href="/docs/tooling/command-line/topics#appwritejson" %} Learn more about appwrite.json diff --git a/src/routes/docs/products/storage/buckets/+page.markdoc b/src/routes/docs/products/storage/buckets/+page.markdoc index 729ad6ad63..5f83a8772b 100644 --- a/src/routes/docs/products/storage/buckets/+page.markdoc +++ b/src/routes/docs/products/storage/buckets/+page.markdoc @@ -33,7 +33,7 @@ Learn more about the CLI buckets commands ## Overwrite warning {% #overwrite-warning %} -If you made changes in the Appwrite Console that are different from your `appwrite.json`, using the CLI push command will overwrite your console changes. Update your `appwrite.json` manually before pushing. +If you made changes in the Appwrite Console that are different from your `appwrite.json,` using the CLI deploy command will overwrite your console changes. Update your `appwrite.json` manually before deploying. {% arrow_link href="/docs/tooling/command-line/buckets#appwritejson" %} Learn more about appwrite.json diff --git a/src/routes/docs/tooling/command-line/buckets/+page.markdoc b/src/routes/docs/tooling/command-line/buckets/+page.markdoc index 11a5aa34ef..7360fff042 100644 --- a/src/routes/docs/tooling/command-line/buckets/+page.markdoc +++ b/src/routes/docs/tooling/command-line/buckets/+page.markdoc @@ -4,7 +4,7 @@ title: Deploy buckets with CLI description: Efficiently deploy your Appwrite buckets using the Command-Line Tool (CLI). --- -The Appwrite CLI allows you to configure and deploy buckets across projects. Make sure you [install and initialize](/docs/tooling/command-line/installation#Installation) your CLI Appwrite project. +The Appwrite CLI allows you to configure and deploy buckets across projects. Ensure you [install and initialize](/docs/tooling/command-line/installation#Installation) your CLI Appwrite project. # Initialize bucket {% #initialize-bucket %} @@ -20,7 +20,7 @@ appwrite init bucket # Pull bucket {% #pull-bucket %} -You can pull your Appwrite buckets using the `pull` command in the folder holding your `appwrite.json` file. +You can also pull your Appwrite buckets using the `pull` command in the folder holding your `appwrite.json` file. ```sh appwrite pull buckets @@ -95,8 +95,8 @@ appwrite storage [COMMAND] [OPTIONS] * `listFiles [options]` * Get a list of all the user files. You can use the query params to filter your results. --- -* `createFile [options]` -* Create a new file. Before using this route, you should create a new bucket resource using either a [server integration](https://appwrite.io/docs/server/storage#storageCreateBucket) API or directly from your Appwrite console. Larger files should be uploaded using multiple requests with the [content-range](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Range) header to send a partial request with a maximum supported chunk of '5MB'. The 'content-range' header values should always be in bytes. When the first request is sent, the server will return the **File** object, and the subsequent part request must include the file's **id** in 'x-appwrite-id' header to allow the server to know that the partial upload is for the existing file and not for a new one. If you're creating a new file using one of the Appwrite SDKs, all the chunking logic will be managed by the SDK internally. +* `createFile [options]` +* Create a new file. Before using this route, you should create a new bucket resource using either a [server integration](https://appwrite.io/docs/server/storage#storageCreateBucket) API or directly from your Appwrite console. Larger files should be uploaded using multiple requests with the [content-range](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Range) header to send a partial request with a maximum supported chunk of '5MB'. The 'content-range' header values should always be in bytes. When the first request is sent, the server will return the **File** object, and the subsequent part request must include the file's **id** in 'x-appwrite-id' header to allow the server to know that the partial upload is for the existing file and not for a new one. If you're creating a new file using one of the Appwrite SDKs, all the chunking logic will be managed by the SDK internally. --- * `getFile [options]` * Get a file by its unique ID. This endpoint response returns a JSON object with the file metadata. @@ -107,13 +107,13 @@ appwrite storage [COMMAND] [OPTIONS] * `deleteFile [options]` * Delete a file by its unique ID. Only users with write permissions have access to delete this resource. --- -* `getFileDownload [options]` +* `getFileDownload [options]` * Get a file content by its unique ID. The endpoint response return with a 'Content-Disposition: attachment' header that tells the browser to start downloading the file to user downloads directory. --- * `getFilePreview [options]` * Get a file preview image. Currently, this method supports preview for image files (jpg, png, and gif), other supported formats, like pdf, docs, slides, and spreadsheets, will return the file icon image. You can also pass query string arguments for cutting and resizing your preview image. Preview is supported only for image files smaller than 10MB. --- -* `getFileView [options]` -* Get a file content by its unique ID. This endpoint is similar to the download method but returns with no 'Content-Disposition: attachment' header. +* `getFileView [options]` +* Get a file content by its unique ID. This endpoint is similar to the download method but returns with no 'Content-Disposition: attachment' header. --- {% /table %} \ No newline at end of file diff --git a/src/routes/docs/tooling/command-line/collections/+page.markdoc b/src/routes/docs/tooling/command-line/collections/+page.markdoc index bacdc0ef79..c17c637176 100644 --- a/src/routes/docs/tooling/command-line/collections/+page.markdoc +++ b/src/routes/docs/tooling/command-line/collections/+page.markdoc @@ -4,7 +4,7 @@ title: Deploy collections with CLI description: Efficiently deploy your Appwrite collections using the Command-Line Tool (CLI). --- -Create and manage your collections using the CLI commands. Make sure you [install and initialize](/docs/tooling/command-line/installation#Installation) your CLI Appwrite project. +Create and manage your collections using the CLI commands. Ensure you [install and initialize](/docs/tooling/command-line/installation#Installation) your CLI Appwrite project. The Appwrite CLI also helps you push your project's databases and collections schema from one project to another. @@ -24,7 +24,7 @@ appwrite init collection # Pull collection {% #pull-collection %} -You also can pull your Appwrite collections and databases using the `pull` command in the folder holding your `appwrite.json` file. +You can also pull your existing Appwrite collections and databases using the `pull` command in the folder holding your `appwrite.json` file. ```sh appwrite pull collections diff --git a/src/routes/docs/tooling/command-line/functions/+page.markdoc b/src/routes/docs/tooling/command-line/functions/+page.markdoc index eedd482c1e..664e249b91 100644 --- a/src/routes/docs/tooling/command-line/functions/+page.markdoc +++ b/src/routes/docs/tooling/command-line/functions/+page.markdoc @@ -4,7 +4,7 @@ title: Deploy functions with CLI description: Efficiently deploy your Appwrite functions using the Command-Line Tool (CLI). --- -The CLI handles the creation and deployment of Appwrite Functions. Make sure you [install and initialize](/docs/tooling/command-line/installation#Installation) your CLI Appwrite project. +The CLI handles the creation and deployment of Appwrite Functions. Ensure you [install and initialize](/docs/tooling/command-line/installation#Installation) your CLI Appwrite project. # Init function {% #init-function %} @@ -113,7 +113,7 @@ appwrite push functions # Commands {% #commands %} -The functions command allows you view, create and manage your Cloud Functions. Appwrite database CLI commands generally follow the following syntax: +The functions command lets you view, create, and manage your Cloud Functions. Appwrite database CLI commands generally follow the following syntax: ```sh appwrite functions [COMMAND] [OPTIONS] @@ -126,13 +126,13 @@ appwrite functions [COMMAND] [OPTIONS] * `list [options]` * Get a list of all the project's functions. You can use the query params to filter your results. --- -* `create [options]` +* `create [options]` * Create a new function. You can pass a list of [permissions](https://appwrite.io/docs/permissions) to allow different project users or team with access to execute the function using the client API. --- * `listRuntimes` * Get a list of all runtimes that are currently active on your instance. --- -* `getUsage [options]` | `get [options]` +* `get [options]` * Get a function by its unique ID. --- * `update [options]` @@ -145,7 +145,7 @@ appwrite functions [COMMAND] [OPTIONS] * Get a list of all the project's code deployments. You can use the query params to filter your results. --- * `createDeployment [options]` -* Create a new function code deployment. Use this endpoint to upload a new version of your code function. To execute your newly uploaded code, you'll need to update the function's deployment to use your new deployment UID. This endpoint accepts a tar.gz file compressed with your code. Make sure to include any dependencies your code has within the compressed file. You can learn more about code packaging in the [Appwrite Cloud Functions tutorial](https://appwrite.io/docs/functions). Use the "command" param to set the entrypoint used to execute your code. +* Create a new function code deployment. Use this endpoint to upload a new version of your code function. To execute your newly uploaded code, you'll need to update the function's deployment to use your new deployment UID. This endpoint accepts a tar.gz file compressed with your code. Make sure to include any dependencies your code has within the compressed file. You can learn more about code packaging in the [Appwrite Cloud Functions tutorial](https://appwrite.io/docs/functions). Use the "command" param to set the entrypoint used to execute your code. --- * `getDeployment [options]` * Get a code deployment by its unique ID. @@ -156,19 +156,19 @@ appwrite functions [COMMAND] [OPTIONS] * `deleteDeployment [options]` * Delete a code deployment by its unique ID. --- -* `createBuild [options]` | `updateDeploymentBuild [options]` | `downloadDeployment [options]` +* `downloadDeployment [options]` * Get a Deployment's contents by its unique ID. This endpoint supports range requests for partial or streaming file download. --- * `listExecutions [options]` * Get a list of all the current user function execution logs. You can use the query params to filter your results. --- -* `createExecution [options]` +* `createExecution [options]` * Trigger a function execution. The returned object will return you the current execution status. You can ping the 'Get Execution' endpoint to get updates on the current execution status. Once this endpoint is called, your function execution process will start asynchronously. --- * `getExecution [options]` * Get a function execution log by its unique ID. --- -* `getFunctionUsage [options]` | `listVariables [options]` +* `listVariables [options]` * Get a list of all variables of a specific function. --- * `createVariable [options]` diff --git a/src/routes/docs/tooling/command-line/installation/+page.markdoc b/src/routes/docs/tooling/command-line/installation/+page.markdoc index 730b1a33cb..d3b1390c1e 100644 --- a/src/routes/docs/tooling/command-line/installation/+page.markdoc +++ b/src/routes/docs/tooling/command-line/installation/+page.markdoc @@ -111,7 +111,7 @@ appwrite client --selfSigned true You can use the CLI to create and deploy functions and collections. Deploy commands allow you to configure your Appwrite project programmatically and replicate functions and collection schemas across Appwrite projects. -[Learn more about deployment](/docs/tooling/command-line/projects) +[Learn more about deployment](/docs/tooling/command-line/collections) Besides utility commands, the CLI can be used to execute commands like a Server SDK. diff --git a/src/routes/docs/tooling/command-line/teams/+page.markdoc b/src/routes/docs/tooling/command-line/teams/+page.markdoc index 5e7f6d7958..e68ad34bc2 100644 --- a/src/routes/docs/tooling/command-line/teams/+page.markdoc +++ b/src/routes/docs/tooling/command-line/teams/+page.markdoc @@ -4,7 +4,7 @@ title: Deploy teams with CLI description: Efficiently deploy your Appwrite teams using the Command-Line Tool (CLI). --- -The Appwrite CLI can create teams to organize users. Teams can be used to grant access [permissions](https://appwrite.io/docs/products/auth/teams#permissions) to a group of users. Make sure you [install and initialize](/docs/tooling/command-line/installation#Installation) your CLI Appwrite project. +The Appwrite CLI can create teams to organize users. Teams can be used to grant access [permissions](https://appwrite.io/docs/products/auth/teams#permissions) to a group of users. Ensure you [install and initialize](/docs/tooling/command-line/installation#Installation) your CLI Appwrite project. # Initialize team {% #initialize-team %} @@ -62,7 +62,7 @@ appwrite push teams # Commands {% #commands %} -The team's command allows you to group users of your project and to enable them to share read and write access to your project resources. Appwrite database CLI commands generally follow the following syntax: +The team's command allows you to group users of your project and enable them to share read and write access to your project resources. Appwrite database CLI commands generally follow the following syntax: ```sh appwrite teams [COMMAND] [OPTIONS] @@ -93,8 +93,8 @@ appwrite teams [COMMAND] [OPTIONS] * `listMemberships [options]` * Use this endpoint to list a team's members using the team's ID. All team members have read access to this endpoint. --- -* `createMembership [options]` -* Invite a new member to join your team. Provide an ID for existing users, or invite unregistered users using an email or phone number. If initiated from a Client SDK, Appwrite will send an email or sms with a link to join the team to the invited user, and an account will be created for them if one doesn't exist. If initiated from a Server SDK, the new member will be added automatically to the team. You only need to provide one of a user ID, email, or phone number. Appwrite will prioritize accepting the user ID > email > phone number if you provide more than one of these parameters. Use the 'url' parameter to redirect the user from the invitation email to your app. After the user is redirected, use the [Update Team Membership Status](https://appwrite.io/docs/references/cloud/client-web/teams#updateMembershipStatus) endpoint to allow the user to accept the invitation to the team. Please note that to avoid a [Redirect Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) Appwrite will accept the only redirect URLs under the domains you have added as a platform on the Appwrite Console. +* `createMembership [options]` +* Invite a new member to join your team. Provide an ID for existing users, or invite unregistered users using an email or phone number. If initiated from a Client SDK, Appwrite will send an email or sms with a link to join the team to the invited user, and an account will be created for them if one doesn't exist. If initiated from a Server SDK, the new member will be added automatically to the team. You only need to provide one of a user ID, email, or phone number. Appwrite will prioritize accepting the user ID > email > phone number if you provide more than one of these parameters. Use the 'url' parameter to redirect the user from the invitation email to your app. After the user is redirected, use the [Update Team Membership Status](https://appwrite.io/docs/references/cloud/client-web/teams#updateMembershipStatus) endpoint to allow the user to accept the invitation to the team. Please note that to avoid a [Redirect Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) Appwrite will accept the only redirect URLs under the domains you have added as a platform on the Appwrite Console. --- * `getMembership [options]` * Get a team member by the membership unique id. All team members have read access for this resource. @@ -106,7 +106,7 @@ appwrite teams [COMMAND] [OPTIONS] * This endpoint allows a user to leave a team or for a team owner to delete the membership of any other team member. You can also use this endpoint to delete a user membership even if it is not accepted. --- * `updateMembershipStatus [options]` -* Use this endpoint to allow a user to accept an invitation to join a team after being redirected back to your app from the invitation email received by the user. If the request is successful, a session for the user is automatically created. +* Use this endpoint to allow a user to accept an invitation to join a team after being redirected back to your app from the invitation email received by the user. If the request is successful, a session for the user is automatically created. --- * `getPrefs [options]` * Get the team's shared preferences by its unique ID. If a preference doesn't need to be shared by all team members, prefer storing them in [user preferences](https://appwrite.io/docs/references/cloud/client-web/account#getPrefs). diff --git a/src/routes/docs/tooling/command-line/topics/+page.markdoc b/src/routes/docs/tooling/command-line/topics/+page.markdoc index 0c9d2c03df..6e34f5fefb 100644 --- a/src/routes/docs/tooling/command-line/topics/+page.markdoc +++ b/src/routes/docs/tooling/command-line/topics/+page.markdoc @@ -4,7 +4,7 @@ title: Deploy topics with CLI description: Efficiently deploy your Appwrite topics using the Command-Line Tool (CLI). --- -The Appwrite CLI can create, set, delete, and configure topics. Make sure you [install and initialize](/docs/tooling/command-line/installation#Installation) your CLI Appwrite project. +The Appwrite CLI can create, set, delete, and configure topics. Ensure you [install and initialize](/docs/tooling/command-line/installation#Installation) your CLI Appwrite project. # Initialize topic {% #initialize-topic %} From 1f3c3024dbabe2941c367c0bfc4dffbbccaca726 Mon Sep 17 00:00:00 2001 From: choir27 Date: Wed, 3 Jul 2024 16:55:29 -0400 Subject: [PATCH 32/66] docs: update overview for CLI docs to include disclaimer for install/init/login, update CLI version disclaimer, update word choice and sentence structure --- .../command-line/buckets/+page.markdoc | 16 ++-- .../command-line/collections/+page.markdoc | 18 ++-- .../command-line/commands/+page.markdoc | 84 ++++++++++--------- .../command-line/functions/+page.markdoc | 17 ++-- .../command-line/installation/+page.markdoc | 4 +- .../tooling/command-line/teams/+page.markdoc | 14 ++-- .../tooling/command-line/topics/+page.markdoc | 13 +-- 7 files changed, 83 insertions(+), 83 deletions(-) diff --git a/src/routes/docs/tooling/command-line/buckets/+page.markdoc b/src/routes/docs/tooling/command-line/buckets/+page.markdoc index 7360fff042..5682b070fa 100644 --- a/src/routes/docs/tooling/command-line/buckets/+page.markdoc +++ b/src/routes/docs/tooling/command-line/buckets/+page.markdoc @@ -4,7 +4,11 @@ title: Deploy buckets with CLI description: Efficiently deploy your Appwrite buckets using the Command-Line Tool (CLI). --- -The Appwrite CLI allows you to configure and deploy buckets across projects. Ensure you [install and initialize](/docs/tooling/command-line/installation#Installation) your CLI Appwrite project. +{% info title="Before proceeding" %} +Ensure you [**install**](/docs/tooling/command-line/installation#Installation) the CLI, [**login**](/docs/tooling/command-line/installation#get-started) to your Appwrite account, and [**initialize**](/docs/tooling/command-line/installation#Initialization) your Appwrite project. +{% /info %} + +The Appwrite CLI allows you to configure and deploy buckets across projects. # Initialize bucket {% #initialize-bucket %} @@ -12,15 +16,11 @@ Initialize your new bucket using the following command: ```sh appwrite init bucket -? What would you like to name your bucket? My Awesome Bucket -? What ID would you like to have for your bucket? unique() -? Enable File-Security configuring permissions for individual file No -✓ Success ``` # Pull bucket {% #pull-bucket %} -You can also pull your Appwrite buckets using the `pull` command in the folder holding your `appwrite.json` file. +You can also pull your existing Appwrite buckets using the `pull` command in the folder holding your `appwrite.json` file. ```sh appwrite pull buckets @@ -28,7 +28,7 @@ appwrite pull buckets # appwrite.json {% #appwritejson %} -Your `appwrite.json` file should look similar to the following: +After initializing your Appwrite project and pulling your existing buckets, your `appwrite.json` file should look similar to the following: ```server-nodejs { @@ -59,7 +59,7 @@ Your `appwrite.json` file should look similar to the following: # Push bucket {% #push-bucket %} -To push the changes you made inside your `appwrite.json` file, use the `push` command in the folder holding your `appwrite.json` file. +In the folder holding your `appwrite.json` file, use the `push` command to push your changes you made inside your `appwrite.json` file. ```sh appwrite push buckets diff --git a/src/routes/docs/tooling/command-line/collections/+page.markdoc b/src/routes/docs/tooling/command-line/collections/+page.markdoc index c17c637176..c613d25cd7 100644 --- a/src/routes/docs/tooling/command-line/collections/+page.markdoc +++ b/src/routes/docs/tooling/command-line/collections/+page.markdoc @@ -4,22 +4,18 @@ title: Deploy collections with CLI description: Efficiently deploy your Appwrite collections using the Command-Line Tool (CLI). --- -Create and manage your collections using the CLI commands. Ensure you [install and initialize](/docs/tooling/command-line/installation#Installation) your CLI Appwrite project. +{% info title="Before proceeding" %} +Ensure you [**install**](/docs/tooling/command-line/installation#Installation) the CLI, [**login**](/docs/tooling/command-line/installation#get-started) to your Appwrite account, and [**initialize**](/docs/tooling/command-line/installation#Initialization) your Appwrite project. +{% /info %} -The Appwrite CLI also helps you push your project's databases and collections schema from one project to another. +Create and manage your collections using the CLI commands. The Appwrite CLI also helps you push your project's databases and collections schema from one project to another. -# Init collection {% #init-collection %} +# Initialize collection {% #initialize-collection %} Initialize your new collection using the following command: ```sh appwrite init collection -? What would you like to name your database? My Awesome Database -? What ID would you like to have for your database? unique() -? What would you like to name your collection? My Awesome Collection -? What ID would you like to have for your collection? unique() -? Enable Document-Security for configuring permissions for individual documents No -✓ Success ``` # Pull collection {% #pull-collection %} @@ -32,7 +28,7 @@ appwrite pull collections # appwrite.json {% #appwritejson %} -After pulling your Appwrite function, your `appwrite.json` file should look similar to the following: +After initializing your Appwrite project and pulling your existing buckets, your `appwrite.json` file should look similar to the following: ```server-nodejs { @@ -139,7 +135,7 @@ After pulling your Appwrite function, your `appwrite.json` file should look simi # Push collection {% #push-collection %} -To push the changes you made inside your `appwrite.json` file, use the `push` command in the folder holding your `appwrite.json` file. +In the folder holding your `appwrite.json` file, use the `push` command to push your changes you made inside your `appwrite.json` file. ```sh appwrite push collections diff --git a/src/routes/docs/tooling/command-line/commands/+page.markdoc b/src/routes/docs/tooling/command-line/commands/+page.markdoc index a5e9ce7166..5354cb723b 100644 --- a/src/routes/docs/tooling/command-line/commands/+page.markdoc +++ b/src/routes/docs/tooling/command-line/commands/+page.markdoc @@ -5,12 +5,15 @@ description: Learn about Appwrites CLI and the powerful, feature complete comman --- {% info title="CLI Version" %} -It is highly recommended that you have the latest version of the CLI; [update your CLI](https://www.npmjs.com/package/appwrite-cli-beta) by running `npm install -g appwrite-cli-beta@latest`. +It is highly recommended that you have the latest version of the CLI. [Update your CLI](https://www.npmjs.com/package/appwrite-cli-beta) by running the following command in your terminal: +```sh +npm install -g appwrite-cli-beta@latest +``` {% /info %} -Other than commands to create and push databases, collections, functions, teams, and buckets, the Appwrite CLI can be used as a Server SDK as well. The Appwrite CLI has a command for every Server API endpoint. +Other than commands to create and push databases, collections, functions, messaging-topics, teams, and buckets, the Appwrite CLI can be used as a Server SDK as well. The Appwrite CLI has a command for every Server API endpoint. -Commands follows the following general syntax: +Commands generally follows the following syntax: ```sh appwrite [COMMAND] [OPTIONS] @@ -19,8 +22,40 @@ appwrite [COMMAND] [OPTIONS] # Commands {% #commands %} Below is a list of the available commands in the Appwrite CLI. You can get more information on each command by running `appwrite [COMMAND] --help`. - -## Appwrite account commands {% #appwrite-account-commands %} + +## General commands {% #general-commands %} + +{% table %} +* Command +* Description +--- +* `assistant` +* The assistant command allows you to interact with the Appwrite Assistant AI. +--- +* `client [options]` +* The client command allows you to configure your CLI. +--- +* `locale` +* The locale command allows you to customize your app based on your users' location. +--- +* `console` +* The console command gives you access to the APIs used by the Appwrite console. +--- +* `graphql` +* The graphql command allows you to query and mutate any resource type on your Appwrite server. +--- +* `health` +* The health command allows you to both validate and monitor your Appwrite server's health. +--- +* `migrations` +* The migrations command allows you to migrate data between services. +--- +* `vcs` +* The vcs command allows you to interact with VCS providers and manage your code repositories. +--- +{% /table %} + +## Account commands {% #account-commands %} {% table %} * Command @@ -40,7 +75,7 @@ Below is a list of the available commands in the Appwrite CLI. You can get more --- {% /table %} -## Appwrite push commands {% #appwrite-push-commands %} +## Deployment commands {% #deployment-commands %} {% table %} * Command @@ -60,39 +95,7 @@ Below is a list of the available commands in the Appwrite CLI. You can get more --- {% /table %} -## General commands {% #general-commands %} - -{% table %} -* Command -* Description ---- -* `assistant` -* The assistant command allows you to interact with the Appwrite Assistant AI. ---- -* `client [options]` -* The client command allows you to configure your CLI. ---- -* `locale` -* The locale command allows you to customize your app based on your users' location. ---- -* `console` -* The console command gives you access to the APIs used by the Appwrite console. ---- -* `graphql` -* The graphql command allows you to query and mutate any resource type on your Appwrite server. ---- -* `health` -* The health command allows you to both validate and monitor your Appwrite server's health. ---- -* `migrations` -* The migrations command allows you to migrate data between services. ---- -* `vcs` -* The vcs command allows you to interact with VCS providers and manage your code repositories. ---- -{% /table %} - -## Appwrite project commands {% #appwrite-project-commands %} +## Project commands {% #appwrite-project-commands %} {% table %} @@ -125,8 +128,9 @@ Below is a list of the available commands in the Appwrite CLI. You can get more --- {% /table %} +## Command options {% #command-options %} + {% table %} -# Options {% #options %} * Command * Description diff --git a/src/routes/docs/tooling/command-line/functions/+page.markdoc b/src/routes/docs/tooling/command-line/functions/+page.markdoc index 664e249b91..cb16a94db8 100644 --- a/src/routes/docs/tooling/command-line/functions/+page.markdoc +++ b/src/routes/docs/tooling/command-line/functions/+page.markdoc @@ -4,19 +4,18 @@ title: Deploy functions with CLI description: Efficiently deploy your Appwrite functions using the Command-Line Tool (CLI). --- -The CLI handles the creation and deployment of Appwrite Functions. Ensure you [install and initialize](/docs/tooling/command-line/installation#Installation) your CLI Appwrite project. +{% info title="Before proceeding" %} +Ensure you [**install**](/docs/tooling/command-line/installation#Installation) the CLI, [**login**](/docs/tooling/command-line/installation#get-started) to your Appwrite account, and [**initialize**](/docs/tooling/command-line/installation#Initialization) your Appwrite project. +{% /info %} -# Init function {% #init-function %} +The CLI handles the creation and deployment of Appwrite Functions. + +# Initialize function {% #initialize-function %} Initialize your new function using the following command: ```sh appwrite init function -? What would you like to name your function? My Awesome Function -? What ID would you like to have for your function? unique() -? What runtime would you like to use? Node.js (node-16.0) -? What template would you like to use? Starter -✓ Success ``` # Pull function {% #pull-function %} @@ -29,7 +28,7 @@ appwrite pull functions # appwrite.json {% #appwritejson %} -Your `appwrite.json` file should look similar to the following: +After initializing your Appwrite project and pulling your existing buckets, your `appwrite.json` file should look similar to the following: ```server-nodejs { @@ -105,7 +104,7 @@ Your `appwrite.json` file should look similar to the following: # Push function {% #push-function %} -To push the changes you made inside your `appwrite.json` file, use the `push` command in the folder holding your `appwrite.json` file. +In the folder holding your `appwrite.json` file, use the `push` command to push your changes you made inside your `appwrite.json` file. ```sh appwrite push functions diff --git a/src/routes/docs/tooling/command-line/installation/+page.markdoc b/src/routes/docs/tooling/command-line/installation/+page.markdoc index d3b1390c1e..de5b10b975 100644 --- a/src/routes/docs/tooling/command-line/installation/+page.markdoc +++ b/src/routes/docs/tooling/command-line/installation/+page.markdoc @@ -89,7 +89,7 @@ This will create your `appwrite.json` file, where you will configure with your v ```server-nodejs { - "projectId": "heivi192901fjj1c20912" + "projectId": } ``` @@ -109,7 +109,7 @@ appwrite client --selfSigned true ## Next steps {% #next-steps %} -You can use the CLI to create and deploy functions and collections. Deploy commands allow you to configure your Appwrite project programmatically and replicate functions and collection schemas across Appwrite projects. +You can use the CLI to create and deploy collections, functions, teams, topics, and buckets. Deploy commands allow you to configure your Appwrite project programmatically and replicate functions and collection schemas across Appwrite projects. [Learn more about deployment](/docs/tooling/command-line/collections) diff --git a/src/routes/docs/tooling/command-line/teams/+page.markdoc b/src/routes/docs/tooling/command-line/teams/+page.markdoc index e68ad34bc2..80b675a7c2 100644 --- a/src/routes/docs/tooling/command-line/teams/+page.markdoc +++ b/src/routes/docs/tooling/command-line/teams/+page.markdoc @@ -4,7 +4,11 @@ title: Deploy teams with CLI description: Efficiently deploy your Appwrite teams using the Command-Line Tool (CLI). --- -The Appwrite CLI can create teams to organize users. Teams can be used to grant access [permissions](https://appwrite.io/docs/products/auth/teams#permissions) to a group of users. Ensure you [install and initialize](/docs/tooling/command-line/installation#Installation) your CLI Appwrite project. +{% info title="Before proceeding" %} +Ensure you [**install**](/docs/tooling/command-line/installation#Installation) the CLI, [**login**](/docs/tooling/command-line/installation#get-started) to your Appwrite account, and [**initialize**](/docs/tooling/command-line/installation#Initialization) your Appwrite project. +{% /info %} + +The Appwrite CLI can create teams to organize users. Teams can be used to grant access [permissions](https://appwrite.io/docs/products/auth/teams#permissions) to a group of users. # Initialize team {% #initialize-team %} @@ -12,10 +16,6 @@ Initialize your new team using the following command: ```sh appwrite init team -? What would you like to name your team? My Awesome Team? -What ID would you like to have for your team? unique() -✓ Success -ℹ Info Next you can use 'appwrite push team' to deploy the changes. ``` # Pull team {% #pull-team %} @@ -27,7 +27,7 @@ appwrite pull teams ``` # appwrite.json {% #appwritejson %} -Your `appwrite.json` file should look similar to the following: +After initializing your Appwrite project and pulling your existing buckets, your `appwrite.json` file should look similar to the following: ```server-nodejs { @@ -54,7 +54,7 @@ Your `appwrite.json` file should look similar to the following: # Push team {% #push-teams %} -To push the changes you made inside your `appwrite.json` file, use the `push` command in the folder holding your `appwrite.json` file. +In the folder holding your `appwrite.json` file, use the `push` command to push your changes you made inside your `appwrite.json` file. ```sh appwrite push teams diff --git a/src/routes/docs/tooling/command-line/topics/+page.markdoc b/src/routes/docs/tooling/command-line/topics/+page.markdoc index 6e34f5fefb..026fa1b98e 100644 --- a/src/routes/docs/tooling/command-line/topics/+page.markdoc +++ b/src/routes/docs/tooling/command-line/topics/+page.markdoc @@ -4,7 +4,11 @@ title: Deploy topics with CLI description: Efficiently deploy your Appwrite topics using the Command-Line Tool (CLI). --- -The Appwrite CLI can create, set, delete, and configure topics. Ensure you [install and initialize](/docs/tooling/command-line/installation#Installation) your CLI Appwrite project. +{% info title="Before proceeding" %} +Ensure you [**install**](/docs/tooling/command-line/installation#Installation) the CLI, [**login**](/docs/tooling/command-line/installation#get-started) to your Appwrite account, and [**initialize**](/docs/tooling/command-line/installation#Initialization) your Appwrite project. +{% /info %} + +The Appwrite CLI can create, set, delete, and configure topics. # Initialize topic {% #initialize-topic %} @@ -12,9 +16,6 @@ Initialize your new topic using the following command: ``` appwrite init topic -? What would you like to name your messaging topic? My Awesome Topic -? What ID would you like to have for your messaging topic? unique() -✓ Success ``` # Pull topics {% #pull-topics %} @@ -27,7 +28,7 @@ appwrite pull topics # appwrite.json {% #appwritejson %} -Your `appwrite.json` file should look similar to the following: +After initializing your Appwrite project and pulling your existing buckets, your `appwrite.json` file should look similar to the following: ```server-nodejs { @@ -64,7 +65,7 @@ Your `appwrite.json` file should look similar to the following: # Push topics {% #push-topics %} -To push the changes you made inside your `appwrite.json` file, use the `push` command in the folder holding your `appwrite.json` file. +In the folder holding your `appwrite.json` file, use the `push` command to push your changes you made inside your `appwrite.json` file. ```sh appwrite push topics From 9d8387e0094de87b3ab5a787eb16d5334e5e0545 Mon Sep 17 00:00:00 2001 From: Richard <66279068+choir27@users.noreply.github.com> Date: Fri, 5 Jul 2024 11:45:11 -0400 Subject: [PATCH 33/66] Update src/routes/docs/products/auth/teams/+page.markdoc Co-authored-by: Steven Nguyen <1477010+stnguyen90@users.noreply.github.com> --- src/routes/docs/products/auth/teams/+page.markdoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/routes/docs/products/auth/teams/+page.markdoc b/src/routes/docs/products/auth/teams/+page.markdoc index ac2868e56d..9f4f32acff 100644 --- a/src/routes/docs/products/auth/teams/+page.markdoc +++ b/src/routes/docs/products/auth/teams/+page.markdoc @@ -190,7 +190,7 @@ val response = teams.createMembership( # CLI {% #CLI %} {% info title="CLI setup" %} -Before you can deploy with the Appwrite CLI, make sure you've [installed and initialized](/docs/tooling/command-line/installation) the CLI and [logged-in](/docs/tooling/command-line/installation#get-started) into your Appwrite account. +Before you can deploy with the Appwrite CLI, make sure you've [installed and initialized](/docs/tooling/command-line/installation) the CLI and [logged in](/docs/tooling/command-line/installation#get-started) to your Appwrite account. {% /info %} To manually deploy your Appwrite teams, you need to pull in your current Appwrite teams by using the following command: From cf666f53006f0084de672f5430025509b0c5ce95 Mon Sep 17 00:00:00 2001 From: Richard <66279068+choir27@users.noreply.github.com> Date: Fri, 5 Jul 2024 11:45:19 -0400 Subject: [PATCH 34/66] Update src/routes/docs/products/functions/functions/+page.markdoc Co-authored-by: Steven Nguyen <1477010+stnguyen90@users.noreply.github.com> --- src/routes/docs/products/functions/functions/+page.markdoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/routes/docs/products/functions/functions/+page.markdoc b/src/routes/docs/products/functions/functions/+page.markdoc index 400517763d..8bbda68156 100644 --- a/src/routes/docs/products/functions/functions/+page.markdoc +++ b/src/routes/docs/products/functions/functions/+page.markdoc @@ -71,7 +71,7 @@ Before you can deploy with the Appwrite CLI, make sure you've [initialized the C Your function must be added to `appwrite.json` to deploy with the Appwrite CLI. -You can pull an existing function: +You can pull existing functions: ```sh appwrite pull functions From 9572abdb2937cdcb119f7fb30559e7ab1809ead2 Mon Sep 17 00:00:00 2001 From: Richard <66279068+choir27@users.noreply.github.com> Date: Fri, 5 Jul 2024 11:48:52 -0400 Subject: [PATCH 35/66] Update src/routes/docs/tooling/command-line/installation/+page.markdoc Co-authored-by: Steven Nguyen <1477010+stnguyen90@users.noreply.github.com> --- src/routes/docs/tooling/command-line/installation/+page.markdoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/routes/docs/tooling/command-line/installation/+page.markdoc b/src/routes/docs/tooling/command-line/installation/+page.markdoc index de5b10b975..ef03cb2b81 100644 --- a/src/routes/docs/tooling/command-line/installation/+page.markdoc +++ b/src/routes/docs/tooling/command-line/installation/+page.markdoc @@ -8,7 +8,7 @@ The [Appwrite CLI](https://github.com/appwrite/sdk-for-cli) is a command-line ap # Installation {% #Installation %} -The CLI is packaged both as a [npm module](https://www.npmjs.com/package/appwrite-cli) as well as a [standalone binary](https://github.com/appwrite/sdk-for-cli/releases/latest) for your operating system, making it completely dependency free, platform independent and language agnostic. +The CLI is packaged both as an [npm module](https://www.npmjs.com/package/appwrite-cli) as well as a [standalone binary](https://github.com/appwrite/sdk-for-cli/releases/latest) for your operating system, making it completely dependency free, platform independent, and language agnostic. If you plan to use the CLI to initialize new Appwrite Functions, ensure that [Git is installed](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) on your machine. From 3581a7608a4adadbc694c077c0d148e2ff9e790c Mon Sep 17 00:00:00 2001 From: Richard <66279068+choir27@users.noreply.github.com> Date: Fri, 5 Jul 2024 11:49:07 -0400 Subject: [PATCH 36/66] Update src/routes/docs/tooling/command-line/commands/+page.markdoc Co-authored-by: Steven Nguyen <1477010+stnguyen90@users.noreply.github.com> --- src/routes/docs/tooling/command-line/commands/+page.markdoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/routes/docs/tooling/command-line/commands/+page.markdoc b/src/routes/docs/tooling/command-line/commands/+page.markdoc index 5354cb723b..ae9f8b4aaf 100644 --- a/src/routes/docs/tooling/command-line/commands/+page.markdoc +++ b/src/routes/docs/tooling/command-line/commands/+page.markdoc @@ -177,7 +177,7 @@ appwrite users list --json ``` # Force {% #force %} -By default, when pushing or pulling resources, Appwrite CLI asks you to confirm in a destructive use case. Use the `--force` flag to verify all questions. +By default, when pushing or pulling resources, the Appwrite CLI will ask you to confirm destructive operations. Use the `--force` flag to verify all questions. ```sh appwrite push collections --force From ac55a0b17b748cad230e9d46c6f54c6071f6b686 Mon Sep 17 00:00:00 2001 From: Richard <66279068+choir27@users.noreply.github.com> Date: Fri, 5 Jul 2024 11:49:20 -0400 Subject: [PATCH 37/66] Update src/routes/docs/tooling/command-line/commands/+page.markdoc Co-authored-by: Steven Nguyen <1477010+stnguyen90@users.noreply.github.com> --- src/routes/docs/tooling/command-line/commands/+page.markdoc | 1 - 1 file changed, 1 deletion(-) diff --git a/src/routes/docs/tooling/command-line/commands/+page.markdoc b/src/routes/docs/tooling/command-line/commands/+page.markdoc index ae9f8b4aaf..dc0d9ccee3 100644 --- a/src/routes/docs/tooling/command-line/commands/+page.markdoc +++ b/src/routes/docs/tooling/command-line/commands/+page.markdoc @@ -161,7 +161,6 @@ Below is a list of the available commands in the Appwrite CLI. You can get more --- {% /table %} - # Verbose {% #verbose %} In case of errors with any command, you can get more information about what went wrong using the `--verbose` flag From 6e1aea02c3dda3f09351ebd5c2cf4e0dfd4d67c0 Mon Sep 17 00:00:00 2001 From: Richard <66279068+choir27@users.noreply.github.com> Date: Fri, 5 Jul 2024 11:49:30 -0400 Subject: [PATCH 38/66] Update src/routes/docs/tooling/command-line/commands/+page.markdoc Co-authored-by: Steven Nguyen <1477010+stnguyen90@users.noreply.github.com> --- src/routes/docs/tooling/command-line/commands/+page.markdoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/routes/docs/tooling/command-line/commands/+page.markdoc b/src/routes/docs/tooling/command-line/commands/+page.markdoc index dc0d9ccee3..3082a9d1e8 100644 --- a/src/routes/docs/tooling/command-line/commands/+page.markdoc +++ b/src/routes/docs/tooling/command-line/commands/+page.markdoc @@ -151,7 +151,7 @@ Below is a list of the available commands in the Appwrite CLI. You can get more * Flag to push all resources --- * `--id [id...]` -* Flag to pass list of ids for a giving action +* Flag to pass list of ids for a given action --- * `--report` * Enable reporting in case of CLI errors From 4fb654329898ed831a18e7d82063e3bc125a1012 Mon Sep 17 00:00:00 2001 From: Richard <66279068+choir27@users.noreply.github.com> Date: Fri, 5 Jul 2024 11:49:35 -0400 Subject: [PATCH 39/66] Update src/routes/docs/tooling/command-line/commands/+page.markdoc Co-authored-by: Steven Nguyen <1477010+stnguyen90@users.noreply.github.com> --- src/routes/docs/tooling/command-line/commands/+page.markdoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/routes/docs/tooling/command-line/commands/+page.markdoc b/src/routes/docs/tooling/command-line/commands/+page.markdoc index 3082a9d1e8..ee7c2cdba3 100644 --- a/src/routes/docs/tooling/command-line/commands/+page.markdoc +++ b/src/routes/docs/tooling/command-line/commands/+page.markdoc @@ -13,7 +13,7 @@ npm install -g appwrite-cli-beta@latest Other than commands to create and push databases, collections, functions, messaging-topics, teams, and buckets, the Appwrite CLI can be used as a Server SDK as well. The Appwrite CLI has a command for every Server API endpoint. -Commands generally follows the following syntax: +Commands generally follow the following syntax: ```sh appwrite [COMMAND] [OPTIONS] From bb6cc0c617380eae18443cb1f1f75223356521a3 Mon Sep 17 00:00:00 2001 From: choir27 Date: Fri, 5 Jul 2024 13:48:24 -0400 Subject: [PATCH 40/66] docs: move comma outside of code syntax appwrite.json, start working on transitioning from services to CLI more smoothly --- .../docs/products/auth/teams/+page.markdoc | 2 +- .../databases/collections/+page.markdoc | 65 ++++++++++--------- .../functions/deploy-manually/+page.markdoc | 2 +- .../products/messaging/topics/+page.markdoc | 2 +- .../products/storage/buckets/+page.markdoc | 12 ++-- 5 files changed, 43 insertions(+), 40 deletions(-) diff --git a/src/routes/docs/products/auth/teams/+page.markdoc b/src/routes/docs/products/auth/teams/+page.markdoc index 9f4f32acff..4616a28aca 100644 --- a/src/routes/docs/products/auth/teams/+page.markdoc +++ b/src/routes/docs/products/auth/teams/+page.markdoc @@ -210,7 +210,7 @@ Learn more about the CLI team commands ## Overwrite warning {% #overwrite-warning %} -If you made changes in the Appwrite Console that are different from your `appwrite.json,` using the CLI deploy command will overwrite your console changes. Update your `appwrite.json` manually before deploying. +If you made changes in the Appwrite Console that are different from your `appwrite.json`, using the CLI deploy command will overwrite your console changes. Update your `appwrite.json` manually before deploying. {% arrow_link href="/docs/tooling/command-line/teams#appwritejson" %} Learn more about appwrite.json diff --git a/src/routes/docs/products/databases/collections/+page.markdoc b/src/routes/docs/products/databases/collections/+page.markdoc index 541f4c02b4..6f0afbaea3 100644 --- a/src/routes/docs/products/databases/collections/+page.markdoc +++ b/src/routes/docs/products/databases/collections/+page.markdoc @@ -9,8 +9,9 @@ The terms collections and documents are used because the Appwrite JSON REST API That said, Appwrite is designed to support both SQL and NoSQL database adapters like MariaDB, MySQL, or MongoDB in future versions. # Create collection {% #create-collection %} -You can create collections using the Appwrite Console or a [Server SDK](/docs/sdks#server). +You can create collections using the Appwrite Console, a [Server SDK](/docs/sdks#server), or using the [CLI](/docs/tooling/command-line/installation). {% tabs %} + {% tabsitem #console title="Console" %} You can create a collection by heading to the **Databases** page, navigate to a [database](/docs/products/databases/databases), and click **Create collection**. @@ -223,8 +224,40 @@ let collection = try await databases.createCollection( You can also configure **permissions** in the `createCollection` method, learn more about the `createCollection` in the [API references](/docs/references). {% /tabsitem %} + +{% tabsitem #cli title="CLI" %} +{% info title="CLI setup" %} +Before you can deploy with the Appwrite CLI, make sure you've [installed and initialized](/docs/tooling/command-line/installation) the CLI and [logged-in](/docs/tooling/command-line/installation#get-started) into your Appwrite account. +{% /info %} + +```sh +appwrite pull collections +``` + +Push any configurations or changes you made to the generated code by using the `push` command. + +```sh +appwrite push collections +``` + +{% arrow_link href="/docs/tooling/command-line/collections#commands" %} +Learn more about the CLI collections commands +{% /arrow_link %} + +{% info title="Overwrite warning" %} + +If you made changes in the Appwrite Console that are different from your `appwrite.json`, using the CLI deploy command will overwrite your console changes. Update your `appwrite.json` manually before deploying. + +{% arrow_link href="/docs/tooling/command-line/collections#appwritejson" %} +Learn more about appwrite.json +{% /arrow_link %} +{% /info %} + +{% /tabsitem %} + {% /tabs %} + # Permissions {% #permissions %} Appwrite uses permissions to control data access. For security, only users that are granted permissions can access a resource. @@ -273,32 +306,4 @@ The following indexes are currently supported: | `unique` | Unique Index to disallow duplicates. | | `fulltext` | For searching within string attributes. Required for the [search query method](/docs/products/databases/queries#query-class). | -You can create an index by navigating to your collection's **Indexes** tab or by using your favorite [Server SDK](/docs/sdks#server). - -# CLI {% #cli %} - -{% info title="CLI setup" %} -Before you can deploy with the Appwrite CLI, make sure you've [installed and initialized](/docs/tooling/command-line/installation) the CLI and [logged-in](/docs/tooling/command-line/installation#get-started) into your Appwrite account. -{% /info %} - -```sh -appwrite pull collections -``` - -Push any configurations or changes you made to the generated code by using the following command: - -```sh -appwrite push collections -``` - -{% arrow_link href="/docs/tooling/command-line/collections#commands" %} -Learn more about the CLI collections commands -{% /arrow_link %} - -## Overwrite warning {% #overwrite-warning %} - -If you made changes in the Appwrite Console that are different from your `appwrite.json,` using the CLI deploy command will overwrite your console changes. Update your `appwrite.json` manually before deploying. - -{% arrow_link href="/docs/tooling/command-line/collections#appwritejson" %} -Learn more about appwrite.json -{% /arrow_link %} +You can create an index by navigating to your collection's **Indexes** tab or by using your favorite [Server SDK](/docs/sdks#server). \ No newline at end of file diff --git a/src/routes/docs/products/functions/deploy-manually/+page.markdoc b/src/routes/docs/products/functions/deploy-manually/+page.markdoc index 0cb3b382da..e6abb424be 100644 --- a/src/routes/docs/products/functions/deploy-manually/+page.markdoc +++ b/src/routes/docs/products/functions/deploy-manually/+page.markdoc @@ -40,7 +40,7 @@ Learn more about the CLI functions commands ## Overwrite warning {% #overwrite-warning %} -If you made changes in the Appwrite Console that are different from your `appwrite.json,` using the CLI deploy command will overwrite your console changes. Update your `appwrite.json` manually before deploying. +If you made changes in the Appwrite Console that are different from your `appwrite.json`, using the CLI deploy command will overwrite your console changes. Update your `appwrite.json` manually before deploying. ## Configure CLI deployments {% #configure-cli-deployments %} If you need to target a different project, API endpoint, change the path or entry point of your function, or update any of the other configuration options, diff --git a/src/routes/docs/products/messaging/topics/+page.markdoc b/src/routes/docs/products/messaging/topics/+page.markdoc index a1e4cb9919..b5e59e259f 100644 --- a/src/routes/docs/products/messaging/topics/+page.markdoc +++ b/src/routes/docs/products/messaging/topics/+page.markdoc @@ -289,7 +289,7 @@ Learn more about the CLI topic commands ## Overwrite warning {% #overwrite-warning %} -If you made changes in the Appwrite Console that are different from your `appwrite.json,` using the CLI deploy command will overwrite your console changes. Update your `appwrite.json` manually before deploying. +If you made changes in the Appwrite Console that are different from your `appwrite.json`, using the CLI deploy command will overwrite your console changes. Update your `appwrite.json` manually before deploying. {% arrow_link href="/docs/tooling/command-line/topics#appwritejson" %} Learn more about appwrite.json diff --git a/src/routes/docs/products/storage/buckets/+page.markdoc b/src/routes/docs/products/storage/buckets/+page.markdoc index 5f83a8772b..6640d7796e 100644 --- a/src/routes/docs/products/storage/buckets/+page.markdoc +++ b/src/routes/docs/products/storage/buckets/+page.markdoc @@ -31,14 +31,12 @@ appwrite push buckets Learn more about the CLI buckets commands {% /arrow_link %} -## Overwrite warning {% #overwrite-warning %} - -If you made changes in the Appwrite Console that are different from your `appwrite.json,` using the CLI deploy command will overwrite your console changes. Update your `appwrite.json` manually before deploying. - -{% arrow_link href="/docs/tooling/command-line/buckets#appwritejson" %} +{% tabs %} +{% tabsitem #console title="Overwrite warning" %} +If you made changes in the Appwrite Console that are different from your `appwrite.json`, using the CLI deploy command will overwrite your console changes. Update your `appwrite.json` manually before deploying. Learn more about appwrite.json -{% /arrow_link %} - +{% /tabsitem %} +{% /tabs %} {% tabs %} {% tabsitem #console title="Console" %} From cf66cca46a591f2d56ab0af437ecc2cbba530fd8 Mon Sep 17 00:00:00 2001 From: Richard <66279068+choir27@users.noreply.github.com> Date: Fri, 5 Jul 2024 13:56:07 -0400 Subject: [PATCH 41/66] Update src/routes/docs/tooling/command-line/topics/+page.markdoc Co-authored-by: Steven Nguyen <1477010+stnguyen90@users.noreply.github.com> --- src/routes/docs/tooling/command-line/topics/+page.markdoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/routes/docs/tooling/command-line/topics/+page.markdoc b/src/routes/docs/tooling/command-line/topics/+page.markdoc index 026fa1b98e..f26a0a31b5 100644 --- a/src/routes/docs/tooling/command-line/topics/+page.markdoc +++ b/src/routes/docs/tooling/command-line/topics/+page.markdoc @@ -28,7 +28,7 @@ appwrite pull topics # appwrite.json {% #appwritejson %} -After initializing your Appwrite project and pulling your existing buckets, your `appwrite.json` file should look similar to the following: +After initializing your Appwrite project and pulling your existing topics, your `appwrite.json` file should look similar to the following: ```server-nodejs { From 5aed0b086707b2d105a6faf4f37cb053d381e541 Mon Sep 17 00:00:00 2001 From: Richard <66279068+choir27@users.noreply.github.com> Date: Fri, 5 Jul 2024 13:56:24 -0400 Subject: [PATCH 42/66] Update src/routes/docs/tooling/command-line/buckets/+page.markdoc Co-authored-by: Steven Nguyen <1477010+stnguyen90@users.noreply.github.com> --- src/routes/docs/tooling/command-line/buckets/+page.markdoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/routes/docs/tooling/command-line/buckets/+page.markdoc b/src/routes/docs/tooling/command-line/buckets/+page.markdoc index 5682b070fa..88fb1f1a73 100644 --- a/src/routes/docs/tooling/command-line/buckets/+page.markdoc +++ b/src/routes/docs/tooling/command-line/buckets/+page.markdoc @@ -12,7 +12,7 @@ The Appwrite CLI allows you to configure and deploy buckets across projects. # Initialize bucket {% #initialize-bucket %} -Initialize your new bucket using the following command: +Initialize a new bucket using the following command: ```sh appwrite init bucket From ca9ad3033e95925884ca308e3982fec2b78767fd Mon Sep 17 00:00:00 2001 From: Richard <66279068+choir27@users.noreply.github.com> Date: Fri, 5 Jul 2024 13:56:47 -0400 Subject: [PATCH 43/66] Update src/routes/docs/tooling/command-line/buckets/+page.markdoc Co-authored-by: Steven Nguyen <1477010+stnguyen90@users.noreply.github.com> --- src/routes/docs/tooling/command-line/buckets/+page.markdoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/routes/docs/tooling/command-line/buckets/+page.markdoc b/src/routes/docs/tooling/command-line/buckets/+page.markdoc index 88fb1f1a73..165a50be48 100644 --- a/src/routes/docs/tooling/command-line/buckets/+page.markdoc +++ b/src/routes/docs/tooling/command-line/buckets/+page.markdoc @@ -30,7 +30,7 @@ appwrite pull buckets After initializing your Appwrite project and pulling your existing buckets, your `appwrite.json` file should look similar to the following: -```server-nodejs +```json { "projectId": "", "buckets": [ From 1e8e5ef46537a87fb0c170ac15a5c4c86c744cf5 Mon Sep 17 00:00:00 2001 From: Richard <66279068+choir27@users.noreply.github.com> Date: Fri, 5 Jul 2024 13:57:04 -0400 Subject: [PATCH 44/66] Update src/routes/docs/tooling/command-line/buckets/+page.markdoc Co-authored-by: Steven Nguyen <1477010+stnguyen90@users.noreply.github.com> --- src/routes/docs/tooling/command-line/buckets/+page.markdoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/routes/docs/tooling/command-line/buckets/+page.markdoc b/src/routes/docs/tooling/command-line/buckets/+page.markdoc index 165a50be48..562fd34a1b 100644 --- a/src/routes/docs/tooling/command-line/buckets/+page.markdoc +++ b/src/routes/docs/tooling/command-line/buckets/+page.markdoc @@ -67,7 +67,7 @@ appwrite push buckets # Commands {% #commands %} -The storage command allows you to manage your project files. Appwrite database CLI commands generally follow the following syntax: +The storage command allows you to manage your project's buckets and files. Appwrite storage CLI commands generally follow the following syntax: ```sh appwrite storage [COMMAND] [OPTIONS] From 772c661160f8b5e364c587cf8a3a29c72ad7f689 Mon Sep 17 00:00:00 2001 From: Richard <66279068+choir27@users.noreply.github.com> Date: Fri, 5 Jul 2024 13:57:21 -0400 Subject: [PATCH 45/66] Update src/routes/docs/tooling/command-line/topics/+page.markdoc Co-authored-by: Steven Nguyen <1477010+stnguyen90@users.noreply.github.com> --- src/routes/docs/tooling/command-line/topics/+page.markdoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/routes/docs/tooling/command-line/topics/+page.markdoc b/src/routes/docs/tooling/command-line/topics/+page.markdoc index f26a0a31b5..a97ef75e87 100644 --- a/src/routes/docs/tooling/command-line/topics/+page.markdoc +++ b/src/routes/docs/tooling/command-line/topics/+page.markdoc @@ -12,7 +12,7 @@ The Appwrite CLI can create, set, delete, and configure topics. # Initialize topic {% #initialize-topic %} -Initialize your new topic using the following command: +Initialize a new topic using the following command: ``` appwrite init topic From 73026022e56a6fc214b80fe7b91f8da778feb86a Mon Sep 17 00:00:00 2001 From: choir27 Date: Sat, 6 Jul 2024 10:57:20 -0400 Subject: [PATCH 46/66] docs: update CLI sections in product/service docs to transition better from previous and proceeding sections. Change appwrite.json syntax highlighting to json. --- .../docs/products/auth/teams/+page.markdoc | 27 +++---------------- .../databases/collections/+page.markdoc | 27 +++---------------- .../functions/deploy-manually/+page.markdoc | 26 +----------------- .../functions/functions/+page.markdoc | 2 +- .../products/messaging/topics/+page.markdoc | 25 ++--------------- .../products/storage/buckets/+page.markdoc | 23 ++-------------- .../command-line/collections/+page.markdoc | 2 +- .../command-line/commands/+page.markdoc | 4 +-- .../command-line/functions/+page.markdoc | 2 +- .../command-line/installation/+page.markdoc | 2 +- .../tooling/command-line/teams/+page.markdoc | 4 +-- .../tooling/command-line/topics/+page.markdoc | 2 +- 12 files changed, 19 insertions(+), 127 deletions(-) diff --git a/src/routes/docs/products/auth/teams/+page.markdoc b/src/routes/docs/products/auth/teams/+page.markdoc index 4616a28aca..42f42461e5 100644 --- a/src/routes/docs/products/auth/teams/+page.markdoc +++ b/src/routes/docs/products/auth/teams/+page.markdoc @@ -187,33 +187,12 @@ val response = teams.createMembership( {% /multicode %} -# CLI {% #CLI %} +# Using the CLI {% #using-the-CLI %} -{% info title="CLI setup" %} -Before you can deploy with the Appwrite CLI, make sure you've [installed and initialized](/docs/tooling/command-line/installation) the CLI and [logged in](/docs/tooling/command-line/installation#get-started) to your Appwrite account. -{% /info %} +Using the CLI, you can invite members, create, get, update, and delete a team and list, and create, update, and delete memberships with the CLI commands. You can also create, get, and update a team by changing the content of the [appwrite.json](/docs/tooling/command-line/teams#appwritejson) file. However, you cannot use the CLI to grant permissions to team members. -To manually deploy your Appwrite teams, you need to pull in your current Appwrite teams by using the following command: - -```sh -appwrite pull teams -``` - -Push any configurations or changes you made to the generated code by using the following command: - -```sh -appwrite push teams -``` {% arrow_link href="/docs/tooling/command-line/teams#commands" %} -Learn more about the CLI team commands -{% /arrow_link %} - -## Overwrite warning {% #overwrite-warning %} - -If you made changes in the Appwrite Console that are different from your `appwrite.json`, using the CLI deploy command will overwrite your console changes. Update your `appwrite.json` manually before deploying. - -{% arrow_link href="/docs/tooling/command-line/teams#appwritejson" %} -Learn more about appwrite.json +Learn more about the CLI teams commands {% /arrow_link %} # Permissions {% #permissions %} diff --git a/src/routes/docs/products/databases/collections/+page.markdoc b/src/routes/docs/products/databases/collections/+page.markdoc index 6f0afbaea3..19632bf957 100644 --- a/src/routes/docs/products/databases/collections/+page.markdoc +++ b/src/routes/docs/products/databases/collections/+page.markdoc @@ -225,38 +225,17 @@ let collection = try await databases.createCollection( You can also configure **permissions** in the `createCollection` method, learn more about the `createCollection` in the [API references](/docs/references). {% /tabsitem %} -{% tabsitem #cli title="CLI" %} -{% info title="CLI setup" %} -Before you can deploy with the Appwrite CLI, make sure you've [installed and initialized](/docs/tooling/command-line/installation) the CLI and [logged-in](/docs/tooling/command-line/installation#get-started) into your Appwrite account. -{% /info %} +{% /tabs %} -```sh -appwrite pull collections -``` -Push any configurations or changes you made to the generated code by using the `push` command. +## Using the CLI {% #using-the-cli %} -```sh -appwrite push collections -``` +You can also create your collections and update, get, and delete them using CLI commands. Using the [appwrite.json](/docs/tooling/command-line/collections#appwritejson) file, you can delete, create, edit, and get your collections attributes; you can also configure the data size limit, toggle if the data is required, and toggle if it's an array of data. Configuring collection level permissions cannot be done using the CLI, but instead through the Appwrite Console. {% arrow_link href="/docs/tooling/command-line/collections#commands" %} Learn more about the CLI collections commands {% /arrow_link %} -{% info title="Overwrite warning" %} - -If you made changes in the Appwrite Console that are different from your `appwrite.json`, using the CLI deploy command will overwrite your console changes. Update your `appwrite.json` manually before deploying. - -{% arrow_link href="/docs/tooling/command-line/collections#appwritejson" %} -Learn more about appwrite.json -{% /arrow_link %} -{% /info %} - -{% /tabsitem %} - -{% /tabs %} - # Permissions {% #permissions %} Appwrite uses permissions to control data access. diff --git a/src/routes/docs/products/functions/deploy-manually/+page.markdoc b/src/routes/docs/products/functions/deploy-manually/+page.markdoc index e6abb424be..3775bd8d7c 100644 --- a/src/routes/docs/products/functions/deploy-manually/+page.markdoc +++ b/src/routes/docs/products/functions/deploy-manually/+page.markdoc @@ -12,36 +12,12 @@ you can also create deployments manually or through the Appwrite CLI. # CLI {% #cli %} -{% info title="CLI setup" %} -Before you can deploy with the Appwrite CLI, make sure you've [installed and initialized](/docs/tooling/command-line/installation) the CLI. -{% /info %} +Before deploying your function and updating, deleting, or downloading its deployment using the CLI, [**install**](/docs/tooling/command-line/installation#Installation) the CLI, [**log in**](/docs/tooling/command-line/installation#get-started) to your Appwrite account, and [**initialize**](/docs/tooling/command-line/installation#Initialization) your Appwrite project. Use the CLI commands or edit the `appwrite.json` file directly to create, update, list and delete variables. -Your function must be added to `appwrite.json` to deploy with the Appwrite CLI. -You can pull an existing function: - -```sh -appwrite pull functions -``` - -Or you can create a function: - -```sh -appwrite init function -``` - -Edit the generated code, add dependencies, and push the function using the following command: - -```sh -appwrite push function -``` {% arrow_link href="/docs/tooling/command-line/functions#commands" %} Learn more about the CLI functions commands {% /arrow_link %} -## Overwrite warning {% #overwrite-warning %} - -If you made changes in the Appwrite Console that are different from your `appwrite.json`, using the CLI deploy command will overwrite your console changes. Update your `appwrite.json` manually before deploying. - ## Configure CLI deployments {% #configure-cli-deployments %} If you need to target a different project, API endpoint, change the path or entry point of your function, or update any of the other configuration options, you can do so by editing the `appwrite.json` file. diff --git a/src/routes/docs/products/functions/functions/+page.markdoc b/src/routes/docs/products/functions/functions/+page.markdoc index 8bbda68156..0721087ea8 100644 --- a/src/routes/docs/products/functions/functions/+page.markdoc +++ b/src/routes/docs/products/functions/functions/+page.markdoc @@ -67,7 +67,7 @@ Remember to specify the build commands for your function to install dependencies {% tabsitem #cli title="CLI" %} You can create functions using the CLI without needing to access the Console. -Before you can deploy with the Appwrite CLI, make sure you've [initialized the CLI.](/docs/tooling/command-line/installation) +Before you can deploy with the Appwrite CLI, make sure you [**install**](/docs/tooling/command-line/installation#Installation) the CLI, [**log in**](/docs/tooling/command-line/installation#get-started) to your Appwrite account, and [**initialize**](/docs/tooling/command-line/installation#Initialization) your Appwrite project. Your function must be added to `appwrite.json` to deploy with the Appwrite CLI. diff --git a/src/routes/docs/products/messaging/topics/+page.markdoc b/src/routes/docs/products/messaging/topics/+page.markdoc index b5e59e259f..3cb55a3063 100644 --- a/src/routes/docs/products/messaging/topics/+page.markdoc +++ b/src/routes/docs/products/messaging/topics/+page.markdoc @@ -266,30 +266,9 @@ let topic = try await messaging.createTopic( {% /tabsitem %} {% /tabs %} -# CLI {% #CLI %} +# Using the CLI {% #using-the-CLI %} -{% info title="CLI setup" %} -Before you can deploy with the Appwrite CLI, make sure you've [installed and initialized](/docs/tooling/command-line/installation) the CLI and [logged-in](/docs/tooling/command-line/installation#get-started) into your Appwrite account. -{% /info %} - -To manually deploy your Appwrite topics, you need to pull in your current Appwrite topics by using the following command: - -```sh -appwrite pull topics -``` - -Push any configurations or changes you made to the generated code by using the following command: - -```sh -appwrite push topics -``` -{% arrow_link href="/docs/tooling/command-line/topics#commands" %} -Learn more about the CLI topic commands -{% /arrow_link %} - -## Overwrite warning {% #overwrite-warning %} - -If you made changes in the Appwrite Console that are different from your `appwrite.json`, using the CLI deploy command will overwrite your console changes. Update your `appwrite.json` manually before deploying. +Create a topic with the CLI, or get, delete, and update a topic using a CLI command, which can also list, create, and delete subscribers. You can also accomplish this by configuring with the `appwrite.json` file, but you cannot set or update any permissions. {% arrow_link href="/docs/tooling/command-line/topics#appwritejson" %} Learn more about appwrite.json diff --git a/src/routes/docs/products/storage/buckets/+page.markdoc b/src/routes/docs/products/storage/buckets/+page.markdoc index 6640d7796e..500a6c13d6 100644 --- a/src/routes/docs/products/storage/buckets/+page.markdoc +++ b/src/routes/docs/products/storage/buckets/+page.markdoc @@ -10,34 +10,15 @@ Buckets let you limit file size and extensions, whether or not to encrypt the fi # Create Bucket {% #create-bucket %} You can create your bucket from the Appwrite Console or a [Server SDK](/docs/sdks#server). You can also create buckets using the [CLI](/docs/tooling/command-line/installation), requiring only a single [command](/docs/tooling/command-line/buckets) to create buckets and handle server-side tasks with buckets and storage. -# CLI {% #cli %} +# Using the CLI {% #using-the-cli %} -{% info title="CLI setup" %} -Before you can deploy with the Appwrite CLI, make sure you've [installed and initialized](/docs/tooling/command-line/installation) the CLI and [logged-in](/docs/tooling/command-line/installation#get-started) into your Appwrite account. -{% /info %} +Using the CLI, you can create a bucket and get, update, and delete it, which you can also accomplish by changing the `appwrite.json` file. But you cannot control file access by granting bucket access to users. -To manually deploy your Appwrite buckets, you need to pull in your current Appwrite buckets by using the following command: -```sh -appwrite pull buckets -``` - -Push any configurations or changes you made to the generated code by using the following command: - -```sh -appwrite push buckets -``` {% arrow_link href="/docs/tooling/command-line/buckets#commands" %} Learn more about the CLI buckets commands {% /arrow_link %} -{% tabs %} -{% tabsitem #console title="Overwrite warning" %} -If you made changes in the Appwrite Console that are different from your `appwrite.json`, using the CLI deploy command will overwrite your console changes. Update your `appwrite.json` manually before deploying. -Learn more about appwrite.json -{% /tabsitem %} -{% /tabs %} - {% tabs %} {% tabsitem #console title="Console" %} You can create a bucket by heading to the **Storage** page and clicking **Create bucket**. diff --git a/src/routes/docs/tooling/command-line/collections/+page.markdoc b/src/routes/docs/tooling/command-line/collections/+page.markdoc index c613d25cd7..89ca5dc72c 100644 --- a/src/routes/docs/tooling/command-line/collections/+page.markdoc +++ b/src/routes/docs/tooling/command-line/collections/+page.markdoc @@ -30,7 +30,7 @@ appwrite pull collections After initializing your Appwrite project and pulling your existing buckets, your `appwrite.json` file should look similar to the following: -```server-nodejs +```json { "projectId": "", "databases": [ diff --git a/src/routes/docs/tooling/command-line/commands/+page.markdoc b/src/routes/docs/tooling/command-line/commands/+page.markdoc index ee7c2cdba3..fb156d4ee0 100644 --- a/src/routes/docs/tooling/command-line/commands/+page.markdoc +++ b/src/routes/docs/tooling/command-line/commands/+page.markdoc @@ -6,11 +6,9 @@ description: Learn about Appwrites CLI and the powerful, feature complete comman {% info title="CLI Version" %} It is highly recommended that you have the latest version of the CLI. [Update your CLI](https://www.npmjs.com/package/appwrite-cli-beta) by running the following command in your terminal: -```sh -npm install -g appwrite-cli-beta@latest -``` {% /info %} + Other than commands to create and push databases, collections, functions, messaging-topics, teams, and buckets, the Appwrite CLI can be used as a Server SDK as well. The Appwrite CLI has a command for every Server API endpoint. Commands generally follow the following syntax: diff --git a/src/routes/docs/tooling/command-line/functions/+page.markdoc b/src/routes/docs/tooling/command-line/functions/+page.markdoc index cb16a94db8..b6044c3e5f 100644 --- a/src/routes/docs/tooling/command-line/functions/+page.markdoc +++ b/src/routes/docs/tooling/command-line/functions/+page.markdoc @@ -30,7 +30,7 @@ appwrite pull functions After initializing your Appwrite project and pulling your existing buckets, your `appwrite.json` file should look similar to the following: -```server-nodejs +```json { "projectId": , "functions": [ diff --git a/src/routes/docs/tooling/command-line/installation/+page.markdoc b/src/routes/docs/tooling/command-line/installation/+page.markdoc index ef03cb2b81..0dd28797a8 100644 --- a/src/routes/docs/tooling/command-line/installation/+page.markdoc +++ b/src/routes/docs/tooling/command-line/installation/+page.markdoc @@ -87,7 +87,7 @@ appwrite init project This will create your `appwrite.json` file, where you will configure with your various services. -```server-nodejs +```json { "projectId": } diff --git a/src/routes/docs/tooling/command-line/teams/+page.markdoc b/src/routes/docs/tooling/command-line/teams/+page.markdoc index 80b675a7c2..d5a205d82e 100644 --- a/src/routes/docs/tooling/command-line/teams/+page.markdoc +++ b/src/routes/docs/tooling/command-line/teams/+page.markdoc @@ -8,7 +8,7 @@ description: Efficiently deploy your Appwrite teams using the Command-Line Tool Ensure you [**install**](/docs/tooling/command-line/installation#Installation) the CLI, [**login**](/docs/tooling/command-line/installation#get-started) to your Appwrite account, and [**initialize**](/docs/tooling/command-line/installation#Initialization) your Appwrite project. {% /info %} -The Appwrite CLI can create teams to organize users. Teams can be used to grant access [permissions](https://appwrite.io/docs/products/auth/teams#permissions) to a group of users. +The Appwrite CLI can create teams to organize users. Teams can be used to grant [permissions](https://appwrite.io/docs/products/auth/teams#permissions) to a group of users. # Initialize team {% #initialize-team %} @@ -29,7 +29,7 @@ appwrite pull teams # appwrite.json {% #appwritejson %} After initializing your Appwrite project and pulling your existing buckets, your `appwrite.json` file should look similar to the following: -```server-nodejs +```json { "projectId": "", "teams": [ diff --git a/src/routes/docs/tooling/command-line/topics/+page.markdoc b/src/routes/docs/tooling/command-line/topics/+page.markdoc index a97ef75e87..fd62359241 100644 --- a/src/routes/docs/tooling/command-line/topics/+page.markdoc +++ b/src/routes/docs/tooling/command-line/topics/+page.markdoc @@ -30,7 +30,7 @@ appwrite pull topics After initializing your Appwrite project and pulling your existing topics, your `appwrite.json` file should look similar to the following: -```server-nodejs +```json { "projectId": "", "topics": [ From 486d81c01a22e0ffca47a7e64b4eebcbeb1f4bcf Mon Sep 17 00:00:00 2001 From: choir27 Date: Sat, 6 Jul 2024 12:24:30 -0400 Subject: [PATCH 47/66] docs: create partial for duplicate content in CLI docs, update cli code snippet examples for consistency, replace holding for containing --- src/partials/cli-disclaimer.md | 3 ++ .../command-line/buckets/+page.markdoc | 10 +++--- .../command-line/collections/+page.markdoc | 10 +++--- .../command-line/commands/+page.markdoc | 36 ++++++++++++++++++- .../command-line/functions/+page.markdoc | 10 +++--- .../command-line/installation/+page.markdoc | 7 ++++ .../non-interactive/+page.markdoc | 8 ++--- .../tooling/command-line/teams/+page.markdoc | 12 +++---- .../tooling/command-line/topics/+page.markdoc | 14 ++++---- 9 files changed, 72 insertions(+), 38 deletions(-) create mode 100644 src/partials/cli-disclaimer.md diff --git a/src/partials/cli-disclaimer.md b/src/partials/cli-disclaimer.md new file mode 100644 index 0000000000..7eb2acd1ea --- /dev/null +++ b/src/partials/cli-disclaimer.md @@ -0,0 +1,3 @@ +{% info title="Before proceeding" %} +Ensure you [**install**](/docs/tooling/command-line/installation#Installation) the CLI, [**login**](/docs/tooling/command-line/installation#get-started) to your Appwrite account, and [**initialize**](/docs/tooling/command-line/installation#Initialization) your Appwrite project. +{% /info %} diff --git a/src/routes/docs/tooling/command-line/buckets/+page.markdoc b/src/routes/docs/tooling/command-line/buckets/+page.markdoc index 562fd34a1b..eb80f931d4 100644 --- a/src/routes/docs/tooling/command-line/buckets/+page.markdoc +++ b/src/routes/docs/tooling/command-line/buckets/+page.markdoc @@ -4,9 +4,7 @@ title: Deploy buckets with CLI description: Efficiently deploy your Appwrite buckets using the Command-Line Tool (CLI). --- -{% info title="Before proceeding" %} -Ensure you [**install**](/docs/tooling/command-line/installation#Installation) the CLI, [**login**](/docs/tooling/command-line/installation#get-started) to your Appwrite account, and [**initialize**](/docs/tooling/command-line/installation#Initialization) your Appwrite project. -{% /info %} +{% partial file="cli-disclaimer.md" /%} The Appwrite CLI allows you to configure and deploy buckets across projects. @@ -15,12 +13,12 @@ The Appwrite CLI allows you to configure and deploy buckets across projects. Initialize a new bucket using the following command: ```sh -appwrite init bucket +appwrite init buckets ``` # Pull bucket {% #pull-bucket %} -You can also pull your existing Appwrite buckets using the `pull` command in the folder holding your `appwrite.json` file. +You can also pull your existing Appwrite buckets using the `pull` command in the folder containing your `appwrite.json` file. ```sh appwrite pull buckets @@ -59,7 +57,7 @@ After initializing your Appwrite project and pulling your existing buckets, your # Push bucket {% #push-bucket %} -In the folder holding your `appwrite.json` file, use the `push` command to push your changes you made inside your `appwrite.json` file. +In the folder containing your `appwrite.json` file, use the `push` command to push your changes you made inside your `appwrite.json` file. ```sh appwrite push buckets diff --git a/src/routes/docs/tooling/command-line/collections/+page.markdoc b/src/routes/docs/tooling/command-line/collections/+page.markdoc index 89ca5dc72c..8f7e9a8886 100644 --- a/src/routes/docs/tooling/command-line/collections/+page.markdoc +++ b/src/routes/docs/tooling/command-line/collections/+page.markdoc @@ -4,9 +4,7 @@ title: Deploy collections with CLI description: Efficiently deploy your Appwrite collections using the Command-Line Tool (CLI). --- -{% info title="Before proceeding" %} -Ensure you [**install**](/docs/tooling/command-line/installation#Installation) the CLI, [**login**](/docs/tooling/command-line/installation#get-started) to your Appwrite account, and [**initialize**](/docs/tooling/command-line/installation#Initialization) your Appwrite project. -{% /info %} +{% partial file="cli-disclaimer.md" /%} Create and manage your collections using the CLI commands. The Appwrite CLI also helps you push your project's databases and collections schema from one project to another. @@ -15,12 +13,12 @@ Create and manage your collections using the CLI commands. The Appwrite CLI also Initialize your new collection using the following command: ```sh -appwrite init collection +appwrite init collections ``` # Pull collection {% #pull-collection %} -You can also pull your existing Appwrite collections and databases using the `pull` command in the folder holding your `appwrite.json` file. +You can also pull your existing Appwrite collections and databases using the `pull` command in the folder containing your `appwrite.json` file. ```sh appwrite pull collections @@ -135,7 +133,7 @@ After initializing your Appwrite project and pulling your existing buckets, your # Push collection {% #push-collection %} -In the folder holding your `appwrite.json` file, use the `push` command to push your changes you made inside your `appwrite.json` file. +In the folder containing your `appwrite.json` file, use the `push` command to push your changes you made inside your `appwrite.json` file. ```sh appwrite push collections diff --git a/src/routes/docs/tooling/command-line/commands/+page.markdoc b/src/routes/docs/tooling/command-line/commands/+page.markdoc index fb156d4ee0..d6baefdfde 100644 --- a/src/routes/docs/tooling/command-line/commands/+page.markdoc +++ b/src/routes/docs/tooling/command-line/commands/+page.markdoc @@ -5,7 +5,41 @@ description: Learn about Appwrites CLI and the powerful, feature complete comman --- {% info title="CLI Version" %} -It is highly recommended that you have the latest version of the CLI. [Update your CLI](https://www.npmjs.com/package/appwrite-cli-beta) by running the following command in your terminal: +It is highly recommended that you have the latest version of the CLI. [Update your CLI](https://www.npmjs.com/package/appwrite-cli-beta) by running the following commands in your terminal: + +{% tabs %} +{% tabsitem #npm title="NPM" %} +```sh +npm install -g appwrite-cli +``` +{% /tabsitem %} + +{% tabsitem #linxmacos title="Linux/MacOS" %} +```sh +wget -q https://appwrite.io/cli/install.sh -O - | /bin/bash +``` +{% /tabsitem %} + +{% tabsitem #macos title="MacOS" %} +```sh +brew install appwrite +``` +{% /tabsitem %} + +{% tabsitem #windows title="Windows" %} +```sh +iwr --useb https://appwrite.io/cli/install.ps1 | iex +``` +{% /tabsitem %} + +{% tabsitem #scoop title="Scoop" %} +```sh +scoop install https://raw.githubusercontent.com/appwrite/sdk-for-cli/master/scoop/appwrite.json +``` +{% /tabsitem %} + +{% /tabs %} + {% /info %} diff --git a/src/routes/docs/tooling/command-line/functions/+page.markdoc b/src/routes/docs/tooling/command-line/functions/+page.markdoc index b6044c3e5f..9b35ea8bc9 100644 --- a/src/routes/docs/tooling/command-line/functions/+page.markdoc +++ b/src/routes/docs/tooling/command-line/functions/+page.markdoc @@ -4,9 +4,7 @@ title: Deploy functions with CLI description: Efficiently deploy your Appwrite functions using the Command-Line Tool (CLI). --- -{% info title="Before proceeding" %} -Ensure you [**install**](/docs/tooling/command-line/installation#Installation) the CLI, [**login**](/docs/tooling/command-line/installation#get-started) to your Appwrite account, and [**initialize**](/docs/tooling/command-line/installation#Initialization) your Appwrite project. -{% /info %} +{% partial file="cli-disclaimer.md" /%} The CLI handles the creation and deployment of Appwrite Functions. @@ -20,7 +18,7 @@ appwrite init function # Pull function {% #pull-function %} -You can also pull your existing Appwrite functions using the `pull` command in the folder holding your `appwrite.json` file. +You can also pull your existing Appwrite functions using the `pull` command in the folder containing your `appwrite.json` file. ```sh appwrite pull functions @@ -104,7 +102,7 @@ After initializing your Appwrite project and pulling your existing buckets, your # Push function {% #push-function %} -In the folder holding your `appwrite.json` file, use the `push` command to push your changes you made inside your `appwrite.json` file. +In the folder containing your `appwrite.json` file, use the `push` command to push your changes you made inside your `appwrite.json` file. ```sh appwrite push functions @@ -112,7 +110,7 @@ appwrite push functions # Commands {% #commands %} -The functions command lets you view, create, and manage your Cloud Functions. Appwrite database CLI commands generally follow the following syntax: +The functions command lets you view, create, and manage your Cloud Functions. Appwrite functions CLI commands generally follow the following syntax: ```sh appwrite functions [COMMAND] [OPTIONS] diff --git a/src/routes/docs/tooling/command-line/installation/+page.markdoc b/src/routes/docs/tooling/command-line/installation/+page.markdoc index 0dd28797a8..243d6cd452 100644 --- a/src/routes/docs/tooling/command-line/installation/+page.markdoc +++ b/src/routes/docs/tooling/command-line/installation/+page.markdoc @@ -52,6 +52,13 @@ iwr -useb https://appwrite.io/cli/install.ps1 | iex curl -sL https://appwrite.io/cli/install.sh | bash ``` {% /tabsitem %} + +{% tabsitem #scoop title="Scoop" %} +```sh +scoop install https://raw.githubusercontent.com/appwrite/sdk-for-cli/master/scoop/appwrite.json +``` +{% /tabsitem %} + {% /tabs %} ## Verify installation {% #verify-installation %} diff --git a/src/routes/docs/tooling/command-line/non-interactive/+page.markdoc b/src/routes/docs/tooling/command-line/non-interactive/+page.markdoc index 49cfdbbae6..97bb1fcdc8 100644 --- a/src/routes/docs/tooling/command-line/non-interactive/+page.markdoc +++ b/src/routes/docs/tooling/command-line/non-interactive/+page.markdoc @@ -41,7 +41,7 @@ To push all available resources: appwrite push all --all --force ``` -To push a single funciton by ID: +To push a single function by ID: ```sh appwrite push function --functionId [FUNCTION ID] --force ``` @@ -49,7 +49,7 @@ appwrite push function --functionId [FUNCTION ID] --force Push all functions: ```sh -appwrite push function --all --force +appwrite push functions --all --force ``` You can push databases, collections, teams, and buckets non-interactively in a similar way by using the `--all` and `--force` option. @@ -57,13 +57,13 @@ You can push databases, collections, teams, and buckets non-interactively in a s Push all databases and collections: ```sh -appwrite push collection --all --force +appwrite push collections --all --force ``` Push all teams: ```sh -appwrite push team --all --force +appwrite push teams --all --force ``` Push all buckets: diff --git a/src/routes/docs/tooling/command-line/teams/+page.markdoc b/src/routes/docs/tooling/command-line/teams/+page.markdoc index d5a205d82e..0ab6c4739d 100644 --- a/src/routes/docs/tooling/command-line/teams/+page.markdoc +++ b/src/routes/docs/tooling/command-line/teams/+page.markdoc @@ -4,9 +4,7 @@ title: Deploy teams with CLI description: Efficiently deploy your Appwrite teams using the Command-Line Tool (CLI). --- -{% info title="Before proceeding" %} -Ensure you [**install**](/docs/tooling/command-line/installation#Installation) the CLI, [**login**](/docs/tooling/command-line/installation#get-started) to your Appwrite account, and [**initialize**](/docs/tooling/command-line/installation#Initialization) your Appwrite project. -{% /info %} +{% partial file="cli-disclaimer.md" /%} The Appwrite CLI can create teams to organize users. Teams can be used to grant [permissions](https://appwrite.io/docs/products/auth/teams#permissions) to a group of users. @@ -15,12 +13,12 @@ The Appwrite CLI can create teams to organize users. Teams can be used to grant Initialize your new team using the following command: ```sh -appwrite init team +appwrite init teams ``` # Pull team {% #pull-team %} -You can also pull your existing Appwrite teams using the `pull` command in the folder holding your `appwrite.json` file. +You can also pull your existing Appwrite teams using the `pull` command in the folder containing your `appwrite.json` file. ```sh appwrite pull teams @@ -54,7 +52,7 @@ After initializing your Appwrite project and pulling your existing buckets, your # Push team {% #push-teams %} -In the folder holding your `appwrite.json` file, use the `push` command to push your changes you made inside your `appwrite.json` file. +In the folder containing your `appwrite.json` file, use the `push` command to push your changes you made inside your `appwrite.json` file. ```sh appwrite push teams @@ -62,7 +60,7 @@ appwrite push teams # Commands {% #commands %} -The team's command allows you to group users of your project and enable them to share read and write access to your project resources. Appwrite database CLI commands generally follow the following syntax: +The team's command allows you to group users of your project and enable them to share read and write access to your project resources. Appwrite team CLI commands generally follow the following syntax: ```sh appwrite teams [COMMAND] [OPTIONS] diff --git a/src/routes/docs/tooling/command-line/topics/+page.markdoc b/src/routes/docs/tooling/command-line/topics/+page.markdoc index fd62359241..c9340211af 100644 --- a/src/routes/docs/tooling/command-line/topics/+page.markdoc +++ b/src/routes/docs/tooling/command-line/topics/+page.markdoc @@ -4,23 +4,21 @@ title: Deploy topics with CLI description: Efficiently deploy your Appwrite topics using the Command-Line Tool (CLI). --- -{% info title="Before proceeding" %} -Ensure you [**install**](/docs/tooling/command-line/installation#Installation) the CLI, [**login**](/docs/tooling/command-line/installation#get-started) to your Appwrite account, and [**initialize**](/docs/tooling/command-line/installation#Initialization) your Appwrite project. -{% /info %} +{% partial file="cli-disclaimer.md" /%} -The Appwrite CLI can create, set, delete, and configure topics. +The Appwrite CLI can create, update, delete, and get topics. # Initialize topic {% #initialize-topic %} Initialize a new topic using the following command: ``` -appwrite init topic +appwrite init topics ``` # Pull topics {% #pull-topics %} -You can also pull your existing Appwrite topics using the `pull` command in the folder holding your `appwrite.json` file. +You can also pull your existing Appwrite topics using the `pull` command in the folder containing your `appwrite.json` file. ```sh appwrite pull topics @@ -65,7 +63,7 @@ After initializing your Appwrite project and pulling your existing topics, your # Push topics {% #push-topics %} -In the folder holding your `appwrite.json` file, use the `push` command to push your changes you made inside your `appwrite.json` file. +In the folder containing your `appwrite.json` file, use the `push` command to push your changes you made inside your `appwrite.json` file. ```sh appwrite push topics @@ -73,7 +71,7 @@ appwrite push topics # Commands {% #commands %} -The messaging command allows you to send messages. Appwrite database CLI commands generally follow the following syntax: +The messaging command allows you to send, get, update, and delete messages. Appwrite messaging CLI commands generally follow the following syntax: ```sh appwrite messaging [COMMAND] [OPTIONS] From 862b81c17fc0297b3def73893de91b5832b51131 Mon Sep 17 00:00:00 2001 From: choir27 Date: Sat, 6 Jul 2024 15:15:04 -0400 Subject: [PATCH 48/66] docs: create partials for duplicate code, update word choices and sentence structures for commands, update self-hosted to endpoint and add some details on its usage, add transiiton for providers section, update word choices and sentence structure throughout CLI docs --- src/partials/cli-disclaimer.md | 2 +- src/partials/cli-push-command.md | 1 + .../databases/collections/+page.markdoc | 2 +- .../functions/deploy-manually/+page.markdoc | 2 +- .../products/messaging/topics/+page.markdoc | 2 +- .../products/storage/buckets/+page.markdoc | 4 +-- .../command-line/buckets/+page.markdoc | 2 +- .../command-line/collections/+page.markdoc | 4 +-- .../command-line/commands/+page.markdoc | 26 +++++++++---------- .../command-line/functions/+page.markdoc | 6 ++--- .../command-line/installation/+page.markdoc | 9 +++---- .../non-interactive/+page.markdoc | 4 ++- .../tooling/command-line/teams/+page.markdoc | 4 +-- .../tooling/command-line/topics/+page.markdoc | 2 +- 14 files changed, 36 insertions(+), 34 deletions(-) create mode 100644 src/partials/cli-push-command.md diff --git a/src/partials/cli-disclaimer.md b/src/partials/cli-disclaimer.md index 7eb2acd1ea..305675b9e6 100644 --- a/src/partials/cli-disclaimer.md +++ b/src/partials/cli-disclaimer.md @@ -1,3 +1,3 @@ {% info title="Before proceeding" %} -Ensure you [**install**](/docs/tooling/command-line/installation#Installation) the CLI, [**login**](/docs/tooling/command-line/installation#get-started) to your Appwrite account, and [**initialize**](/docs/tooling/command-line/installation#Initialization) your Appwrite project. +Ensure you [**install**](/docs/tooling/command-line/installation#Installation) the CLI, [**log in**](/docs/tooling/command-line/installation#get-started) to your Appwrite account, and [**initialize**](/docs/tooling/command-line/installation#Initialization) your Appwrite project. {% /info %} diff --git a/src/partials/cli-push-command.md b/src/partials/cli-push-command.md new file mode 100644 index 0000000000..1789c00d86 --- /dev/null +++ b/src/partials/cli-push-command.md @@ -0,0 +1 @@ +Use the' push' command in the folder containing your `appwrite.json` file to push the changes you made inside your `appwrite.json` file. diff --git a/src/routes/docs/products/databases/collections/+page.markdoc b/src/routes/docs/products/databases/collections/+page.markdoc index 19632bf957..9495a9fba1 100644 --- a/src/routes/docs/products/databases/collections/+page.markdoc +++ b/src/routes/docs/products/databases/collections/+page.markdoc @@ -230,7 +230,7 @@ You can also configure **permissions** in the `createCollection` method, learn m ## Using the CLI {% #using-the-cli %} -You can also create your collections and update, get, and delete them using CLI commands. Using the [appwrite.json](/docs/tooling/command-line/collections#appwritejson) file, you can delete, create, edit, and get your collections attributes; you can also configure the data size limit, toggle if the data is required, and toggle if it's an array of data. Configuring collection level permissions cannot be done using the CLI, but instead through the Appwrite Console. +You can also create your collections and update, get, and delete them using CLI commands. Using the [appwrite.json](/docs/tooling/command-line/collections#appwritejson) file, you can delete, create, edit, and get your collections attributes; you can also configure the data size limit, toggle if the data is required, and toggle if it's an array of data. Configuring collection-level permissions cannot be done using the CLI but instead through the Appwrite Console. {% arrow_link href="/docs/tooling/command-line/collections#commands" %} Learn more about the CLI collections commands diff --git a/src/routes/docs/products/functions/deploy-manually/+page.markdoc b/src/routes/docs/products/functions/deploy-manually/+page.markdoc index 3775bd8d7c..5734b14241 100644 --- a/src/routes/docs/products/functions/deploy-manually/+page.markdoc +++ b/src/routes/docs/products/functions/deploy-manually/+page.markdoc @@ -12,7 +12,7 @@ you can also create deployments manually or through the Appwrite CLI. # CLI {% #cli %} -Before deploying your function and updating, deleting, or downloading its deployment using the CLI, [**install**](/docs/tooling/command-line/installation#Installation) the CLI, [**log in**](/docs/tooling/command-line/installation#get-started) to your Appwrite account, and [**initialize**](/docs/tooling/command-line/installation#Initialization) your Appwrite project. Use the CLI commands or edit the `appwrite.json` file directly to create, update, list and delete variables. +Before deploying your function and updating, deleting, or downloading its deployment using the CLI, [**install**](/docs/tooling/command-line/installation#Installation) the CLI, [**log in**](/docs/tooling/command-line/installation#get-started) to your Appwrite account, and [**initialize**](/docs/tooling/command-line/installation#Initialization) your Appwrite project. Use the CLI commands or edit the `appwrite.json` file directly to create, update, list, and delete variables. {% arrow_link href="/docs/tooling/command-line/functions#commands" %} Learn more about the CLI functions commands diff --git a/src/routes/docs/products/messaging/topics/+page.markdoc b/src/routes/docs/products/messaging/topics/+page.markdoc index 3cb55a3063..b6dd2dfa32 100644 --- a/src/routes/docs/products/messaging/topics/+page.markdoc +++ b/src/routes/docs/products/messaging/topics/+page.markdoc @@ -268,7 +268,7 @@ let topic = try await messaging.createTopic( # Using the CLI {% #using-the-CLI %} -Create a topic with the CLI, or get, delete, and update a topic using a CLI command, which can also list, create, and delete subscribers. You can also accomplish this by configuring with the `appwrite.json` file, but you cannot set or update any permissions. +Create a topic with the CLI or get, delete, and update a topic using a CLI command, which can also list, create, and delete subscribers. You can also accomplish this by configuring with the `appwrite.json` file, but you cannot set or update any permissions. {% arrow_link href="/docs/tooling/command-line/topics#appwritejson" %} Learn more about appwrite.json diff --git a/src/routes/docs/products/storage/buckets/+page.markdoc b/src/routes/docs/products/storage/buckets/+page.markdoc index 500a6c13d6..4d81a9014a 100644 --- a/src/routes/docs/products/storage/buckets/+page.markdoc +++ b/src/routes/docs/products/storage/buckets/+page.markdoc @@ -8,11 +8,11 @@ Storage buckets are a group of files, similar to collections in Appwrite Databas Buckets let you limit file size and extensions, whether or not to encrypt the files, and more. # Create Bucket {% #create-bucket %} -You can create your bucket from the Appwrite Console or a [Server SDK](/docs/sdks#server). You can also create buckets using the [CLI](/docs/tooling/command-line/installation), requiring only a single [command](/docs/tooling/command-line/buckets) to create buckets and handle server-side tasks with buckets and storage. +You can create your bucket from the Appwrite Console, a [Server SDK](/docs/sdks#server), or the [CLI](/docs/tooling/command-line/buckets). # Using the CLI {% #using-the-cli %} -Using the CLI, you can create a bucket and get, update, and delete it, which you can also accomplish by changing the `appwrite.json` file. But you cannot control file access by granting bucket access to users. +Using the CLI, you can create a bucket and get, update, and delete it, which you can also accomplish by changing the `appwrite.json` file. However, you cannot control file access by granting bucket access to users. {% arrow_link href="/docs/tooling/command-line/buckets#commands" %} diff --git a/src/routes/docs/tooling/command-line/buckets/+page.markdoc b/src/routes/docs/tooling/command-line/buckets/+page.markdoc index eb80f931d4..d0b39b5ff1 100644 --- a/src/routes/docs/tooling/command-line/buckets/+page.markdoc +++ b/src/routes/docs/tooling/command-line/buckets/+page.markdoc @@ -57,7 +57,7 @@ After initializing your Appwrite project and pulling your existing buckets, your # Push bucket {% #push-bucket %} -In the folder containing your `appwrite.json` file, use the `push` command to push your changes you made inside your `appwrite.json` file. +{% partial file="cli-push-command.md" /%} ```sh appwrite push buckets diff --git a/src/routes/docs/tooling/command-line/collections/+page.markdoc b/src/routes/docs/tooling/command-line/collections/+page.markdoc index 8f7e9a8886..ca53f16da3 100644 --- a/src/routes/docs/tooling/command-line/collections/+page.markdoc +++ b/src/routes/docs/tooling/command-line/collections/+page.markdoc @@ -10,7 +10,7 @@ Create and manage your collections using the CLI commands. The Appwrite CLI also # Initialize collection {% #initialize-collection %} -Initialize your new collection using the following command: +Initialize a new collection using the following command: ```sh appwrite init collections @@ -133,7 +133,7 @@ After initializing your Appwrite project and pulling your existing buckets, your # Push collection {% #push-collection %} -In the folder containing your `appwrite.json` file, use the `push` command to push your changes you made inside your `appwrite.json` file. +{% partial file="cli-push-command.md" /%} ```sh appwrite push collections diff --git a/src/routes/docs/tooling/command-line/commands/+page.markdoc b/src/routes/docs/tooling/command-line/commands/+page.markdoc index d6baefdfde..ddaa9b1092 100644 --- a/src/routes/docs/tooling/command-line/commands/+page.markdoc +++ b/src/routes/docs/tooling/command-line/commands/+page.markdoc @@ -5,7 +5,7 @@ description: Learn about Appwrites CLI and the powerful, feature complete comman --- {% info title="CLI Version" %} -It is highly recommended that you have the latest version of the CLI. [Update your CLI](https://www.npmjs.com/package/appwrite-cli-beta) by running the following commands in your terminal: +It is highly recommended that you have the latest version of the CLI. [Update your CLI](https://www.npmjs.com/package/appwrite-cli) by running the following commands in your terminal: {% tabs %} {% tabsitem #npm title="NPM" %} @@ -97,7 +97,7 @@ Below is a list of the available commands in the Appwrite CLI. You can get more * The login command allows you to authenticate into the CLI. This command expects the console account that you use to log into the Appwrite Console. --- * `logout` -* The logout command allows you to logout from the CLI. +* The logout command allows you to log out of your Appwrite account. --- * `register` * Prints link to register an Appwrite account. @@ -114,16 +114,16 @@ Below is a list of the available commands in the Appwrite CLI. You can get more * Description --- * `init [options]` -* The init command helps you initialize your Appwrite project, databases, collections, functions, teams, messaging-topics, and buckets. +* The init command provides a convenient wrapper for creating and initializing projects, functions, collections, buckets, teams, and messaging-topics in Appwrite. --- * `pull` * The pull command helps you pull your Appwrite project, functions, collections, buckets, teams, and messaging-topics. --- * `push` -* The push command provides a convenient wrapper for pushing your databases, collections, functions, teams, and buckets. +* The push command provides a convenient wrapper for pushing your functions, collections, buckets, teams, and topics. --- * `run` -* The run command allows you to run projects locally to allow easy development and quick debugging +* The run command allows you to run projects locally to allow easy development and quick debugging. --- {% /table %} @@ -135,22 +135,22 @@ Below is a list of the available commands in the Appwrite CLI. You can get more * Description --- * `account` -* The account command allows you to authenticate as and manage a user account. +* The account command allows you to authenticate and manage a user account. --- * `users` * The users command allows you to manage your project users. --- * `teams` -* The teams command allows you to group users of your project and to enable them to share access permissions to your project's resources. +* The teams command allows you to group users of your project and enable them to share read and write access to your project resources. --- * `databases` -* The databases command allows you to create structured collections of documents, query and filter lists of documents. +* The databases command allows you to create structured collections of documents and query and filter lists of documents. --- * `functions` -* The functions command allows you view, create and manage your Appwrite Functions. +* The functions command allows you to view, create, and manage your Cloud Functions. --- * `messaging` -* The messaging command allows you to send messages. +* The messaging command allows you to send, create, edit, and delete messages. --- * `storage` * The storage command allows you to manage your project files. @@ -168,7 +168,7 @@ Below is a list of the available commands in the Appwrite CLI. You can get more * Description --- * `-v, --version` -* output the version number +* Output the version number --- * `-V, --verbose` * Show complete error log @@ -183,13 +183,13 @@ Below is a list of the available commands in the Appwrite CLI. You can get more * Flag to push all resources --- * `--id [id...]` -* Flag to pass list of ids for a given action +* Flag to pass a list of ids for a given action --- * `--report` * Enable reporting in case of CLI errors --- * `-h, --help` -* display help for command +* Display help for command --- {% /table %} diff --git a/src/routes/docs/tooling/command-line/functions/+page.markdoc b/src/routes/docs/tooling/command-line/functions/+page.markdoc index 9b35ea8bc9..92f2d3cde3 100644 --- a/src/routes/docs/tooling/command-line/functions/+page.markdoc +++ b/src/routes/docs/tooling/command-line/functions/+page.markdoc @@ -10,10 +10,10 @@ The CLI handles the creation and deployment of Appwrite Functions. # Initialize function {% #initialize-function %} -Initialize your new function using the following command: +Initialize a new function using the following command: ```sh -appwrite init function +appwrite init functions ``` # Pull function {% #pull-function %} @@ -102,7 +102,7 @@ After initializing your Appwrite project and pulling your existing buckets, your # Push function {% #push-function %} -In the folder containing your `appwrite.json` file, use the `push` command to push your changes you made inside your `appwrite.json` file. +{% partial file="cli-push-command.md" /%} ```sh appwrite push functions diff --git a/src/routes/docs/tooling/command-line/installation/+page.markdoc b/src/routes/docs/tooling/command-line/installation/+page.markdoc index 243d6cd452..7e49f96b01 100644 --- a/src/routes/docs/tooling/command-line/installation/+page.markdoc +++ b/src/routes/docs/tooling/command-line/installation/+page.markdoc @@ -24,7 +24,6 @@ npm install -g appwrite-cli For a completely dependency-free installation, the CLI also ships with a convenient installation script for your operating system - {% tabs %} {% tabsitem #macos title="macOS" %} @@ -77,10 +76,10 @@ Before you can use the CLI, you need to login to your Appwrite account using appwrite login ``` -In case of a self-hosted instance, add the `self-hosted` flag. +In case of a self-hosted instance, add the `endpoint` flag. This flag is used whenever you want to self-host Appwrite, and it requires you to add the URL string where you're hosting from after the `endpoint` flag. ```sh -appwrite login --self-hosted +appwrite login --endpoint ``` You can log-in to multiple accounts or change the **current** account by simply running the command again. @@ -92,7 +91,7 @@ After you're logged in, the CLI needs to be initialized with your Appwrite proje appwrite init project ``` -This will create your `appwrite.json` file, where you will configure with your various services. +This will create your `appwrite.json` file, where you will configure your various services like collections, functions, teams, topics, and buckets. ```json { @@ -116,7 +115,7 @@ appwrite client --selfSigned true ## Next steps {% #next-steps %} -You can use the CLI to create and deploy collections, functions, teams, topics, and buckets. Deploy commands allow you to configure your Appwrite project programmatically and replicate functions and collection schemas across Appwrite projects. +You can use the CLI to create and deploy collections, functions, teams, topics, and buckets. Deployment commands allow you to configure your Appwrite project programmatically and replicate functions and collection schemas across Appwrite projects. [Learn more about deployment](/docs/tooling/command-line/collections) diff --git a/src/routes/docs/tooling/command-line/non-interactive/+page.markdoc b/src/routes/docs/tooling/command-line/non-interactive/+page.markdoc index 97bb1fcdc8..e98233b8e2 100644 --- a/src/routes/docs/tooling/command-line/non-interactive/+page.markdoc +++ b/src/routes/docs/tooling/command-line/non-interactive/+page.markdoc @@ -21,6 +21,8 @@ In non-interactive mode, the CLI uses an API key to authenticate. Your API key m # Providers {% #providers %} +In non-interactive mode, you can use providers like Github actions to automate your Appwrite CLI commands, allowing you to use the CLI commands even in non-interactive mode. + {% table %} * Name * Description @@ -33,7 +35,7 @@ In non-interactive mode, the CLI uses an API key to authenticate. Your API key m # Deployment {% #deployment %} Appwrite's `push` commands can also be executed in a non-interactive mode. This applies to the following resources: functions, collections, buckets, teams, and messaging topics. -You can push a resource non-interactively by using the `--force` option to skip all warnings and specifying which resources you want to deploy. +You can push a resource non-interactively by using the `--force` option to skip all warnings and specify which resources you want to deploy. To push all available resources: diff --git a/src/routes/docs/tooling/command-line/teams/+page.markdoc b/src/routes/docs/tooling/command-line/teams/+page.markdoc index 0ab6c4739d..c157c658bd 100644 --- a/src/routes/docs/tooling/command-line/teams/+page.markdoc +++ b/src/routes/docs/tooling/command-line/teams/+page.markdoc @@ -10,7 +10,7 @@ The Appwrite CLI can create teams to organize users. Teams can be used to grant # Initialize team {% #initialize-team %} -Initialize your new team using the following command: +Initialize a new team using the following command: ```sh appwrite init teams @@ -52,7 +52,7 @@ After initializing your Appwrite project and pulling your existing buckets, your # Push team {% #push-teams %} -In the folder containing your `appwrite.json` file, use the `push` command to push your changes you made inside your `appwrite.json` file. +{% partial file="cli-push-command.md" /%} ```sh appwrite push teams diff --git a/src/routes/docs/tooling/command-line/topics/+page.markdoc b/src/routes/docs/tooling/command-line/topics/+page.markdoc index c9340211af..5837965498 100644 --- a/src/routes/docs/tooling/command-line/topics/+page.markdoc +++ b/src/routes/docs/tooling/command-line/topics/+page.markdoc @@ -63,7 +63,7 @@ After initializing your Appwrite project and pulling your existing topics, your # Push topics {% #push-topics %} -In the folder containing your `appwrite.json` file, use the `push` command to push your changes you made inside your `appwrite.json` file. +{% partial file="cli-push-command.md" /%} ```sh appwrite push topics From 92bb19d77f63ed83ae083213460785d2044784bc Mon Sep 17 00:00:00 2001 From: choir27 Date: Sat, 6 Jul 2024 16:19:24 -0400 Subject: [PATCH 49/66] docs: remove table for non-interactive table for paragraph, update word choices and sentence structure, add links --- src/partials/cli-push-command.md | 2 +- src/routes/docs/products/auth/teams/+page.markdoc | 2 +- .../products/databases/collections/+page.markdoc | 2 +- .../docs/products/messaging/topics/+page.markdoc | 2 +- .../docs/products/storage/buckets/+page.markdoc | 2 +- .../docs/tooling/command-line/buckets/+page.markdoc | 8 ++++---- .../tooling/command-line/collections/+page.markdoc | 6 +++--- .../tooling/command-line/commands/+page.markdoc | 4 ++-- .../tooling/command-line/functions/+page.markdoc | 8 ++++---- .../command-line/non-interactive/+page.markdoc | 13 ++----------- .../docs/tooling/command-line/teams/+page.markdoc | 6 +++--- .../docs/tooling/command-line/topics/+page.markdoc | 8 ++++---- 12 files changed, 27 insertions(+), 36 deletions(-) diff --git a/src/partials/cli-push-command.md b/src/partials/cli-push-command.md index 1789c00d86..e415da76de 100644 --- a/src/partials/cli-push-command.md +++ b/src/partials/cli-push-command.md @@ -1 +1 @@ -Use the' push' command in the folder containing your `appwrite.json` file to push the changes you made inside your `appwrite.json` file. +Use the `push` command in the folder containing your `appwrite.json` file to push the changes you made inside your `appwrite.json` file. diff --git a/src/routes/docs/products/auth/teams/+page.markdoc b/src/routes/docs/products/auth/teams/+page.markdoc index 42f42461e5..70c558cd62 100644 --- a/src/routes/docs/products/auth/teams/+page.markdoc +++ b/src/routes/docs/products/auth/teams/+page.markdoc @@ -189,7 +189,7 @@ val response = teams.createMembership( # Using the CLI {% #using-the-CLI %} -Using the CLI, you can invite members, create, get, update, and delete a team and list, and create, update, and delete memberships with the CLI commands. You can also create, get, and update a team by changing the content of the [appwrite.json](/docs/tooling/command-line/teams#appwritejson) file. However, you cannot use the CLI to grant permissions to team members. +Using the CLI, you can invite members as well as create, get, update, and delete a team. You can also accomplish this by changing the content of the [appwrite.json](/docs/tooling/command-line/teams#appwritejson) file. However, you cannot use the CLI to grant permissions to team members. {% arrow_link href="/docs/tooling/command-line/teams#commands" %} Learn more about the CLI teams commands diff --git a/src/routes/docs/products/databases/collections/+page.markdoc b/src/routes/docs/products/databases/collections/+page.markdoc index 9495a9fba1..a137a67735 100644 --- a/src/routes/docs/products/databases/collections/+page.markdoc +++ b/src/routes/docs/products/databases/collections/+page.markdoc @@ -230,7 +230,7 @@ You can also configure **permissions** in the `createCollection` method, learn m ## Using the CLI {% #using-the-cli %} -You can also create your collections and update, get, and delete them using CLI commands. Using the [appwrite.json](/docs/tooling/command-line/collections#appwritejson) file, you can delete, create, edit, and get your collections attributes; you can also configure the data size limit, toggle if the data is required, and toggle if it's an array of data. Configuring collection-level permissions cannot be done using the CLI but instead through the Appwrite Console. +You can also create your collections and update, get, and delete them using CLI commands. Using the [appwrite.json](/docs/tooling/command-line/collections#appwritejson) file, you can configure your collections attributes; you can also configure the data size limit, toggle if the data is required, and toggle if it's an array of data. Configuring collection-level permissions cannot be done using the CLI but instead through the Appwrite Console. {% arrow_link href="/docs/tooling/command-line/collections#commands" %} Learn more about the CLI collections commands diff --git a/src/routes/docs/products/messaging/topics/+page.markdoc b/src/routes/docs/products/messaging/topics/+page.markdoc index b6dd2dfa32..d11dceb532 100644 --- a/src/routes/docs/products/messaging/topics/+page.markdoc +++ b/src/routes/docs/products/messaging/topics/+page.markdoc @@ -268,7 +268,7 @@ let topic = try await messaging.createTopic( # Using the CLI {% #using-the-CLI %} -Create a topic with the CLI or get, delete, and update a topic using a CLI command, which can also list, create, and delete subscribers. You can also accomplish this by configuring with the `appwrite.json` file, but you cannot set or update any permissions. +You can also create a topic using the CLI, along with being able to get, delete, and update a topic. You can also accomplish this by configuring with the `appwrite.json` file, but you cannot set or update any permissions. {% arrow_link href="/docs/tooling/command-line/topics#appwritejson" %} Learn more about appwrite.json diff --git a/src/routes/docs/products/storage/buckets/+page.markdoc b/src/routes/docs/products/storage/buckets/+page.markdoc index 4d81a9014a..8938f9e4e6 100644 --- a/src/routes/docs/products/storage/buckets/+page.markdoc +++ b/src/routes/docs/products/storage/buckets/+page.markdoc @@ -12,7 +12,7 @@ You can create your bucket from the Appwrite Console, a [Server SDK](/docs/sdks# # Using the CLI {% #using-the-cli %} -Using the CLI, you can create a bucket and get, update, and delete it, which you can also accomplish by changing the `appwrite.json` file. However, you cannot control file access by granting bucket access to users. +Using the CLI, you can also create a bucket and get, update, and delete it, which you can also accomplish by updating the `appwrite.json` file. However, you cannot control file access by granting bucket access to users. {% arrow_link href="/docs/tooling/command-line/buckets#commands" %} diff --git a/src/routes/docs/tooling/command-line/buckets/+page.markdoc b/src/routes/docs/tooling/command-line/buckets/+page.markdoc index d0b39b5ff1..d24040660e 100644 --- a/src/routes/docs/tooling/command-line/buckets/+page.markdoc +++ b/src/routes/docs/tooling/command-line/buckets/+page.markdoc @@ -6,11 +6,11 @@ description: Efficiently deploy your Appwrite buckets using the Command-Line Too {% partial file="cli-disclaimer.md" /%} -The Appwrite CLI allows you to configure and deploy buckets across projects. +The Appwrite CLI allows you to configure and deploy buckets across projects. You can also configure with your files using the CLI commands. # Initialize bucket {% #initialize-bucket %} -Initialize a new bucket using the following command: +Create a new bucket using the following command: ```sh appwrite init buckets @@ -18,7 +18,7 @@ appwrite init buckets # Pull bucket {% #pull-bucket %} -You can also pull your existing Appwrite buckets using the `pull` command in the folder containing your `appwrite.json` file. +You can also pull your existing Appwrite buckets from the Appwrite Console using the `pull` command in the folder containing your `appwrite.json` file. ```sh appwrite pull buckets @@ -26,7 +26,7 @@ appwrite pull buckets # appwrite.json {% #appwritejson %} -After initializing your Appwrite project and pulling your existing buckets, your `appwrite.json` file should look similar to the following: +After [initializing](/docs/tooling/command-line/installation#Initialization) your Appwrite project and pulling your existing buckets, your `appwrite.json` file should look similar to the following: ```json { diff --git a/src/routes/docs/tooling/command-line/collections/+page.markdoc b/src/routes/docs/tooling/command-line/collections/+page.markdoc index ca53f16da3..3769cc1cf1 100644 --- a/src/routes/docs/tooling/command-line/collections/+page.markdoc +++ b/src/routes/docs/tooling/command-line/collections/+page.markdoc @@ -10,7 +10,7 @@ Create and manage your collections using the CLI commands. The Appwrite CLI also # Initialize collection {% #initialize-collection %} -Initialize a new collection using the following command: +Create a new collection using the following command: ```sh appwrite init collections @@ -18,7 +18,7 @@ appwrite init collections # Pull collection {% #pull-collection %} -You can also pull your existing Appwrite collections and databases using the `pull` command in the folder containing your `appwrite.json` file. +You can also pull your existing Appwrite collections and databases from the Appwrite Console using the `pull` command in the folder containing your `appwrite.json` file. ```sh appwrite pull collections @@ -26,7 +26,7 @@ appwrite pull collections # appwrite.json {% #appwritejson %} -After initializing your Appwrite project and pulling your existing buckets, your `appwrite.json` file should look similar to the following: +After [initializing](/docs/tooling/command-line/installation#Initialization) your Appwrite project and pulling your existing buckets, your `appwrite.json` file should look similar to the following: ```json { diff --git a/src/routes/docs/tooling/command-line/commands/+page.markdoc b/src/routes/docs/tooling/command-line/commands/+page.markdoc index ddaa9b1092..0fbe38861b 100644 --- a/src/routes/docs/tooling/command-line/commands/+page.markdoc +++ b/src/routes/docs/tooling/command-line/commands/+page.markdoc @@ -261,7 +261,7 @@ appwrite users list ## List collections {% #list-collections %} -To get a list of all your [collections](/docs/tooling/command-line/collections), you can use the listCollections command. +To get a list of all your [collections](/docs/tooling/command-line/collections), you can use the `listCollections` command. ```sh appwrite databases listCollections --databaseId [DATABASE_ID] @@ -275,7 +275,7 @@ appwrite databases listCollections --databaseId [DATABASE_ID]--json ## Get collection {% #get-collection %} -To get more information on a particular collection, you can make use of the getCollection command and pass in the collectionId. +To get more information on a particular collection, you can make use of the `getCollection` command and pass in the collectionId. ```sh appwrite databases getCollection --databaseId [DATABASE_ID] --collectionId [COLLECTION_ID] diff --git a/src/routes/docs/tooling/command-line/functions/+page.markdoc b/src/routes/docs/tooling/command-line/functions/+page.markdoc index 92f2d3cde3..b664ff2d96 100644 --- a/src/routes/docs/tooling/command-line/functions/+page.markdoc +++ b/src/routes/docs/tooling/command-line/functions/+page.markdoc @@ -6,11 +6,11 @@ description: Efficiently deploy your Appwrite functions using the Command-Line T {% partial file="cli-disclaimer.md" /%} -The CLI handles the creation and deployment of Appwrite Functions. +The CLI handles the creation, deployment, and execution of Appwrite Functions, as well as the configuration of the variables. # Initialize function {% #initialize-function %} -Initialize a new function using the following command: +Create a new function using the following command: ```sh appwrite init functions @@ -18,7 +18,7 @@ appwrite init functions # Pull function {% #pull-function %} -You can also pull your existing Appwrite functions using the `pull` command in the folder containing your `appwrite.json` file. +You can also pull your existing Appwrite functions from the Appwrite Console using the `pull` command in the folder containing your `appwrite.json` file. ```sh appwrite pull functions @@ -26,7 +26,7 @@ appwrite pull functions # appwrite.json {% #appwritejson %} -After initializing your Appwrite project and pulling your existing buckets, your `appwrite.json` file should look similar to the following: +After [initializing](/docs/tooling/command-line/installation#Initialization) your Appwrite project and pulling your existing buckets, your `appwrite.json` file should look similar to the following: ```json { diff --git a/src/routes/docs/tooling/command-line/non-interactive/+page.markdoc b/src/routes/docs/tooling/command-line/non-interactive/+page.markdoc index e98233b8e2..c7fee23786 100644 --- a/src/routes/docs/tooling/command-line/non-interactive/+page.markdoc +++ b/src/routes/docs/tooling/command-line/non-interactive/+page.markdoc @@ -21,16 +21,7 @@ In non-interactive mode, the CLI uses an API key to authenticate. Your API key m # Providers {% #providers %} -In non-interactive mode, you can use providers like Github actions to automate your Appwrite CLI commands, allowing you to use the CLI commands even in non-interactive mode. - -{% table %} -* Name -* Description ---- -* Github actions {% #github-actions %} -* You can add your CLI to [Github actions](https://github.com/appwrite/setup-for-actions/tree/feat-cli-g2?tab=readme-ov-file#introduction) to automate your Appwrite CLI commands instead of manually using them. - -{% /table %} +In non-interactive mode, you can use providers like [Github actions](https://github.com/appwrite/setup-for-actions/tree/feat-cli-g2?tab=readme-ov-file#introduction) to automate your Appwrite CLI commands, allowing you to use the CLI commands even in non-interactive mode. # Deployment {% #deployment %} Appwrite's `push` commands can also be executed in a non-interactive mode. This applies to the following resources: functions, collections, buckets, teams, and messaging topics. @@ -45,7 +36,7 @@ appwrite push all --all --force To push a single function by ID: ```sh -appwrite push function --functionId [FUNCTION ID] --force +appwrite push functions --functionId [FUNCTION ID] --force ``` Push all functions: diff --git a/src/routes/docs/tooling/command-line/teams/+page.markdoc b/src/routes/docs/tooling/command-line/teams/+page.markdoc index c157c658bd..90a9a608db 100644 --- a/src/routes/docs/tooling/command-line/teams/+page.markdoc +++ b/src/routes/docs/tooling/command-line/teams/+page.markdoc @@ -10,7 +10,7 @@ The Appwrite CLI can create teams to organize users. Teams can be used to grant # Initialize team {% #initialize-team %} -Initialize a new team using the following command: +Create a new team using the following command: ```sh appwrite init teams @@ -18,14 +18,14 @@ appwrite init teams # Pull team {% #pull-team %} -You can also pull your existing Appwrite teams using the `pull` command in the folder containing your `appwrite.json` file. +You can also pull your existing Appwrite teams from the Appwrite Console using the `pull` command in the folder containing your `appwrite.json` file. ```sh appwrite pull teams ``` # appwrite.json {% #appwritejson %} -After initializing your Appwrite project and pulling your existing buckets, your `appwrite.json` file should look similar to the following: +After [initializing](/docs/tooling/command-line/installation#Initialization) your Appwrite project and pulling your existing buckets, your `appwrite.json` file should look similar to the following: ```json { diff --git a/src/routes/docs/tooling/command-line/topics/+page.markdoc b/src/routes/docs/tooling/command-line/topics/+page.markdoc index 5837965498..bee78622dc 100644 --- a/src/routes/docs/tooling/command-line/topics/+page.markdoc +++ b/src/routes/docs/tooling/command-line/topics/+page.markdoc @@ -6,11 +6,11 @@ description: Efficiently deploy your Appwrite topics using the Command-Line Tool {% partial file="cli-disclaimer.md" /%} -The Appwrite CLI can create, update, delete, and get topics. +The Appwrite CLI can create, update, delete, and get topics, as well as configure the provider and the subscribers. # Initialize topic {% #initialize-topic %} -Initialize a new topic using the following command: +Create a new topic using the following command: ``` appwrite init topics @@ -18,7 +18,7 @@ appwrite init topics # Pull topics {% #pull-topics %} -You can also pull your existing Appwrite topics using the `pull` command in the folder containing your `appwrite.json` file. +You can also pull your existing Appwrite topics from the Appwrite Console using the `pull` command in the folder containing your `appwrite.json` file. ```sh appwrite pull topics @@ -26,7 +26,7 @@ appwrite pull topics # appwrite.json {% #appwritejson %} -After initializing your Appwrite project and pulling your existing topics, your `appwrite.json` file should look similar to the following: +After [initializing](/docs/tooling/command-line/installation#Initialization) your Appwrite project and pulling your existing topics, your `appwrite.json` file should look similar to the following: ```json { From 2bd848f4e15803af7e2688700fe89d70f669a8a5 Mon Sep 17 00:00:00 2001 From: choir27 Date: Mon, 8 Jul 2024 13:46:36 -0400 Subject: [PATCH 50/66] docs: Add uninstall scoop commands --- .../tooling/command-line/installation/+page.markdoc | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/routes/docs/tooling/command-line/installation/+page.markdoc b/src/routes/docs/tooling/command-line/installation/+page.markdoc index 7e49f96b01..e6ba7025a5 100644 --- a/src/routes/docs/tooling/command-line/installation/+page.markdoc +++ b/src/routes/docs/tooling/command-line/installation/+page.markdoc @@ -184,6 +184,12 @@ $APPWRITE_INSTALL_DIR = Join-Path -Path $env:LOCALAPPDATA -ChildPath "Appwrite"; rm -f /usr/local/bin/appwrite | bash ``` {% /tabsitem %} + +{% tabsitem #scoop title="Scoop" %} +```sh +scoop uninstall ./appwrite +``` +{% /tabsitem %} {% /tabs %} You can also remove the configuration, cookies, and API Keys the Appwrite CLI stored. To remove those, run the following command. @@ -206,4 +212,10 @@ $APPWRITE_CONFIG_DIR = Join-Path -Path $env:UserProfile -ChildPath ".appwrite"; rm -rf ~/.appwrite | bash ``` {% /tabsitem %} + +{% tabsitem #scoop title="Scoop" %} +```sh +scoop uninstall ./appwrite +``` +{% /tabsitem %} {% /tabs %} \ No newline at end of file From 7175db6e9dac8dca2e13f7a7662b82c0de911282 Mon Sep 17 00:00:00 2001 From: choir27 Date: Mon, 8 Jul 2024 15:25:09 -0400 Subject: [PATCH 51/66] docs: add redirect url to install cli docs from cli version disclaimer. Update word choice and sentence structure --- .../command-line/commands/+page.markdoc | 36 +------------- .../command-line/installation/+page.markdoc | 48 ++++++++++++++++++- 2 files changed, 47 insertions(+), 37 deletions(-) diff --git a/src/routes/docs/tooling/command-line/commands/+page.markdoc b/src/routes/docs/tooling/command-line/commands/+page.markdoc index 0fbe38861b..572368b25e 100644 --- a/src/routes/docs/tooling/command-line/commands/+page.markdoc +++ b/src/routes/docs/tooling/command-line/commands/+page.markdoc @@ -5,41 +5,7 @@ description: Learn about Appwrites CLI and the powerful, feature complete comman --- {% info title="CLI Version" %} -It is highly recommended that you have the latest version of the CLI. [Update your CLI](https://www.npmjs.com/package/appwrite-cli) by running the following commands in your terminal: - -{% tabs %} -{% tabsitem #npm title="NPM" %} -```sh -npm install -g appwrite-cli -``` -{% /tabsitem %} - -{% tabsitem #linxmacos title="Linux/MacOS" %} -```sh -wget -q https://appwrite.io/cli/install.sh -O - | /bin/bash -``` -{% /tabsitem %} - -{% tabsitem #macos title="MacOS" %} -```sh -brew install appwrite -``` -{% /tabsitem %} - -{% tabsitem #windows title="Windows" %} -```sh -iwr --useb https://appwrite.io/cli/install.ps1 | iex -``` -{% /tabsitem %} - -{% tabsitem #scoop title="Scoop" %} -```sh -scoop install https://raw.githubusercontent.com/appwrite/sdk-for-cli/master/scoop/appwrite.json -``` -{% /tabsitem %} - -{% /tabs %} - +All commands are compatible with the latest version of the CLI. We recommend running the [CLI on its latest version](/docs/tooling/command-line/installation#update-your-cli). {% /info %} diff --git a/src/routes/docs/tooling/command-line/installation/+page.markdoc b/src/routes/docs/tooling/command-line/installation/+page.markdoc index e6ba7025a5..f6b4e979c6 100644 --- a/src/routes/docs/tooling/command-line/installation/+page.markdoc +++ b/src/routes/docs/tooling/command-line/installation/+page.markdoc @@ -60,9 +60,53 @@ scoop install https://raw.githubusercontent.com/appwrite/sdk-for-cli/master/scoo {% /tabs %} +# Update your CLI {% #update-your-cli %} + +{% tabs %} +{% tabsitem #npm title="npm" %} +```sh +npm install -g appwrite-cli +``` +{% /tabsitem %} + +{% tabsitem #macos title="macOS" %} + +Using [Homebrew](https://brew.sh/) + +```sh +brew install appwrite +``` + +or terminal + +```sh +curl -sL https://appwrite.io/cli/install.sh | bash +``` +{% /tabsitem %} + +{% tabsitem #windows title="Windows" %} +```sh +iwr -useb https://appwrite.io/cli/install.ps1 | iex +``` +{% /tabsitem %} + +{% tabsitem #linux title="Linux" %} +```sh +curl -sL https://appwrite.io/cli/install.sh | bash +``` +{% /tabsitem %} + +{% tabsitem #scoop title="Scoop" %} +```sh +scoop install https://raw.githubusercontent.com/appwrite/sdk-for-cli/master/scoop/appwrite.json +``` +{% /tabsitem %} + +{% /tabs %} + ## Verify installation {% #verify-installation %} -After the installation is complete, you can verify the Appwrite CLI is available by checking its version number. +After the installation or the update is complete, you can verify the Appwrite CLI is available by checking its version number. ```sh appwrite -v @@ -215,7 +259,7 @@ rm -rf ~/.appwrite | bash {% tabsitem #scoop title="Scoop" %} ```sh -scoop uninstall ./appwrite +appwrite client --reset ``` {% /tabsitem %} {% /tabs %} \ No newline at end of file From ae2d3343be6589e2f0d483bb7433783682ba6063 Mon Sep 17 00:00:00 2001 From: choir27 Date: Mon, 8 Jul 2024 15:34:10 -0400 Subject: [PATCH 52/66] docs: update wording --- src/routes/docs/products/auth/teams/+page.markdoc | 2 +- src/routes/docs/products/storage/buckets/+page.markdoc | 3 +-- src/routes/docs/tooling/command-line/teams/+page.markdoc | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/routes/docs/products/auth/teams/+page.markdoc b/src/routes/docs/products/auth/teams/+page.markdoc index 70c558cd62..6e04c2c356 100644 --- a/src/routes/docs/products/auth/teams/+page.markdoc +++ b/src/routes/docs/products/auth/teams/+page.markdoc @@ -189,7 +189,7 @@ val response = teams.createMembership( # Using the CLI {% #using-the-CLI %} -Using the CLI, you can invite members as well as create, get, update, and delete a team. You can also accomplish this by changing the content of the [appwrite.json](/docs/tooling/command-line/teams#appwritejson) file. However, you cannot use the CLI to grant permissions to team members. +Using the CLI, you can invite members as well as create, get, update, and delete a team. You can also accomplish this by changing the content of the [appwrite.json](/docs/tooling/command-line/teams#appwritejson) file. However, you cannot use the CLI to configure permissions to team members. {% arrow_link href="/docs/tooling/command-line/teams#commands" %} Learn more about the CLI teams commands diff --git a/src/routes/docs/products/storage/buckets/+page.markdoc b/src/routes/docs/products/storage/buckets/+page.markdoc index 8938f9e4e6..5139dedcbe 100644 --- a/src/routes/docs/products/storage/buckets/+page.markdoc +++ b/src/routes/docs/products/storage/buckets/+page.markdoc @@ -12,8 +12,7 @@ You can create your bucket from the Appwrite Console, a [Server SDK](/docs/sdks# # Using the CLI {% #using-the-cli %} -Using the CLI, you can also create a bucket and get, update, and delete it, which you can also accomplish by updating the `appwrite.json` file. However, you cannot control file access by granting bucket access to users. - +Using the CLI, you can also create a bucket and get, update, and delete it, which you can also accomplish by updating the `appwrite.json` file. However, you cannot control file access by configuring bucket access to users. {% arrow_link href="/docs/tooling/command-line/buckets#commands" %} Learn more about the CLI buckets commands diff --git a/src/routes/docs/tooling/command-line/teams/+page.markdoc b/src/routes/docs/tooling/command-line/teams/+page.markdoc index 90a9a608db..2a665b7bdb 100644 --- a/src/routes/docs/tooling/command-line/teams/+page.markdoc +++ b/src/routes/docs/tooling/command-line/teams/+page.markdoc @@ -6,7 +6,7 @@ description: Efficiently deploy your Appwrite teams using the Command-Line Tool {% partial file="cli-disclaimer.md" /%} -The Appwrite CLI can create teams to organize users. Teams can be used to grant [permissions](https://appwrite.io/docs/products/auth/teams#permissions) to a group of users. +The Appwrite CLI can create teams to organize users. Teams can be used to confgiure [permissions](https://appwrite.io/docs/products/auth/teams#permissions) to a group of users. # Initialize team {% #initialize-team %} From 4cdb6c64e17f84685128beb62e7399136a9414a8 Mon Sep 17 00:00:00 2001 From: choir27 Date: Fri, 19 Jul 2024 16:53:45 -0400 Subject: [PATCH 53/66] docs: update word choice and sentence structure --- src/partials/cli-push-command.md | 2 +- src/routes/docs/products/auth/teams/+page.markdoc | 2 +- src/routes/docs/products/databases/collections/+page.markdoc | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/partials/cli-push-command.md b/src/partials/cli-push-command.md index e415da76de..0889326f6f 100644 --- a/src/partials/cli-push-command.md +++ b/src/partials/cli-push-command.md @@ -1 +1 @@ -Use the `push` command in the folder containing your `appwrite.json` file to push the changes you made inside your `appwrite.json` file. +Use the `push` command in the folder containing your `appwrite.json` file to push the changes you made. diff --git a/src/routes/docs/products/auth/teams/+page.markdoc b/src/routes/docs/products/auth/teams/+page.markdoc index 6e04c2c356..5a75d15e4d 100644 --- a/src/routes/docs/products/auth/teams/+page.markdoc +++ b/src/routes/docs/products/auth/teams/+page.markdoc @@ -189,7 +189,7 @@ val response = teams.createMembership( # Using the CLI {% #using-the-CLI %} -Using the CLI, you can invite members as well as create, get, update, and delete a team. You can also accomplish this by changing the content of the [appwrite.json](/docs/tooling/command-line/teams#appwritejson) file. However, you cannot use the CLI to configure permissions to team members. +Using the CLI, you can invite members and create, get, update, and delete a team. You can also accomplish this by changing the content of the [appwrite.json](/docs/tooling/command-line/teams#appwritejson) file. However, you cannot use the CLI to configure permissions for team members. {% arrow_link href="/docs/tooling/command-line/teams#commands" %} Learn more about the CLI teams commands diff --git a/src/routes/docs/products/databases/collections/+page.markdoc b/src/routes/docs/products/databases/collections/+page.markdoc index a137a67735..7736296535 100644 --- a/src/routes/docs/products/databases/collections/+page.markdoc +++ b/src/routes/docs/products/databases/collections/+page.markdoc @@ -230,7 +230,7 @@ You can also configure **permissions** in the `createCollection` method, learn m ## Using the CLI {% #using-the-cli %} -You can also create your collections and update, get, and delete them using CLI commands. Using the [appwrite.json](/docs/tooling/command-line/collections#appwritejson) file, you can configure your collections attributes; you can also configure the data size limit, toggle if the data is required, and toggle if it's an array of data. Configuring collection-level permissions cannot be done using the CLI but instead through the Appwrite Console. +You can also create your collections and update, get, and delete them using CLI commands. Using the appwrite.json file, you can configure your collections' attributes and data size limit, toggle if the data is required, and toggle if it's an array of data. Configuring collection-level permissions cannot be done using the CLI but instead through the Appwrite Console. {% arrow_link href="/docs/tooling/command-line/collections#commands" %} Learn more about the CLI collections commands From 55a9cb3ce39bf387501a14c4d5bca05ea3afb60b Mon Sep 17 00:00:00 2001 From: choir27 Date: Sat, 20 Jul 2024 15:08:55 -0400 Subject: [PATCH 54/66] docs: update word choice and sentence structure for a better user journey to read the docs --- .../products/functions/deploy-manually/+page.markdoc | 2 +- .../docs/products/messaging/topics/+page.markdoc | 2 +- .../docs/tooling/command-line/buckets/+page.markdoc | 4 ++-- .../docs/tooling/command-line/commands/+page.markdoc | 4 ++-- .../docs/tooling/command-line/functions/+page.markdoc | 4 ++-- .../tooling/command-line/installation/+page.markdoc | 4 ++-- .../docs/tooling/command-line/teams/+page.markdoc | 10 +++++----- .../docs/tooling/command-line/topics/+page.markdoc | 2 +- 8 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/routes/docs/products/functions/deploy-manually/+page.markdoc b/src/routes/docs/products/functions/deploy-manually/+page.markdoc index 5734b14241..f0f9dcf5c6 100644 --- a/src/routes/docs/products/functions/deploy-manually/+page.markdoc +++ b/src/routes/docs/products/functions/deploy-manually/+page.markdoc @@ -12,7 +12,7 @@ you can also create deployments manually or through the Appwrite CLI. # CLI {% #cli %} -Before deploying your function and updating, deleting, or downloading its deployment using the CLI, [**install**](/docs/tooling/command-line/installation#Installation) the CLI, [**log in**](/docs/tooling/command-line/installation#get-started) to your Appwrite account, and [**initialize**](/docs/tooling/command-line/installation#Initialization) your Appwrite project. Use the CLI commands or edit the `appwrite.json` file directly to create, update, list, and delete variables. +Before deploying your function and updating, deleting, or downloading its deployment using the CLI, [**install**](/docs/tooling/command-line/installation#Installation) the CLI, [**log in**](/docs/tooling/command-line/installation#get-started) to your Appwrite account, and [**initialize**](/docs/tooling/command-line/installation#Initialization) your Appwrite project. Use the CLI commands or edit the `appwrite.json` file to create, update, list, and delete variables. {% arrow_link href="/docs/tooling/command-line/functions#commands" %} Learn more about the CLI functions commands diff --git a/src/routes/docs/products/messaging/topics/+page.markdoc b/src/routes/docs/products/messaging/topics/+page.markdoc index d11dceb532..04ac30e476 100644 --- a/src/routes/docs/products/messaging/topics/+page.markdoc +++ b/src/routes/docs/products/messaging/topics/+page.markdoc @@ -268,7 +268,7 @@ let topic = try await messaging.createTopic( # Using the CLI {% #using-the-CLI %} -You can also create a topic using the CLI, along with being able to get, delete, and update a topic. You can also accomplish this by configuring with the `appwrite.json` file, but you cannot set or update any permissions. +You can also create, get, delete, and update a topic using the CLI. You can also accomplish this by configuring with the `appwrite.json` file, but you cannot set or update any permissions. {% arrow_link href="/docs/tooling/command-line/topics#appwritejson" %} Learn more about appwrite.json diff --git a/src/routes/docs/tooling/command-line/buckets/+page.markdoc b/src/routes/docs/tooling/command-line/buckets/+page.markdoc index d24040660e..8372e291b6 100644 --- a/src/routes/docs/tooling/command-line/buckets/+page.markdoc +++ b/src/routes/docs/tooling/command-line/buckets/+page.markdoc @@ -6,7 +6,7 @@ description: Efficiently deploy your Appwrite buckets using the Command-Line Too {% partial file="cli-disclaimer.md" /%} -The Appwrite CLI allows you to configure and deploy buckets across projects. You can also configure with your files using the CLI commands. +The Appwrite CLI allows you to configure and deploy buckets across projects. You can also configure your files using the CLI commands. # Initialize bucket {% #initialize-bucket %} @@ -106,7 +106,7 @@ appwrite storage [COMMAND] [OPTIONS] * Delete a file by its unique ID. Only users with write permissions have access to delete this resource. --- * `getFileDownload [options]` -* Get a file content by its unique ID. The endpoint response return with a 'Content-Disposition: attachment' header that tells the browser to start downloading the file to user downloads directory. +* Get a file content by its unique ID. The endpoint response returns with a 'Content-Disposition: attachment' header that tells the browser to start downloading the file to the user downloads directory. --- * `getFilePreview [options]` * Get a file preview image. Currently, this method supports preview for image files (jpg, png, and gif), other supported formats, like pdf, docs, slides, and spreadsheets, will return the file icon image. You can also pass query string arguments for cutting and resizing your preview image. Preview is supported only for image files smaller than 10MB. diff --git a/src/routes/docs/tooling/command-line/commands/+page.markdoc b/src/routes/docs/tooling/command-line/commands/+page.markdoc index 572368b25e..298e96817b 100644 --- a/src/routes/docs/tooling/command-line/commands/+page.markdoc +++ b/src/routes/docs/tooling/command-line/commands/+page.markdoc @@ -43,7 +43,7 @@ Below is a list of the available commands in the Appwrite CLI. You can get more * The graphql command allows you to query and mutate any resource type on your Appwrite server. --- * `health` -* The health command allows you to both validate and monitor your Appwrite server's health. +* The health command allows you to validate and monitor your Appwrite server's health. --- * `migrations` * The migrations command allows you to migrate data between services. @@ -69,7 +69,7 @@ Below is a list of the available commands in the Appwrite CLI. You can get more * Prints link to register an Appwrite account. --- * `whoami` -* The whomai command gives information about the currently logged in user. +* The whomai command gives information about the currently logged-in user. --- {% /table %} diff --git a/src/routes/docs/tooling/command-line/functions/+page.markdoc b/src/routes/docs/tooling/command-line/functions/+page.markdoc index b664ff2d96..ca82f0358c 100644 --- a/src/routes/docs/tooling/command-line/functions/+page.markdoc +++ b/src/routes/docs/tooling/command-line/functions/+page.markdoc @@ -124,7 +124,7 @@ appwrite functions [COMMAND] [OPTIONS] * Get a list of all the project's functions. You can use the query params to filter your results. --- * `create [options]` -* Create a new function. You can pass a list of [permissions](https://appwrite.io/docs/permissions) to allow different project users or team with access to execute the function using the client API. +* Create a new function. You can pass a list of [permissions](https://appwrite.io/docs/permissions) to allow different project users or teams with access to execute the function using the client API. --- * `listRuntimes` * Get a list of all runtimes that are currently active on your instance. @@ -175,7 +175,7 @@ appwrite functions [COMMAND] [OPTIONS] * Get a variable by its unique ID. --- * `updateVariable [options]` -* Update variable by its unique ID. +* Update a variable by its unique ID. --- * `deleteVariable [options]` * Delete a variable by its unique ID. diff --git a/src/routes/docs/tooling/command-line/installation/+page.markdoc b/src/routes/docs/tooling/command-line/installation/+page.markdoc index f6b4e979c6..2639532e48 100644 --- a/src/routes/docs/tooling/command-line/installation/+page.markdoc +++ b/src/routes/docs/tooling/command-line/installation/+page.markdoc @@ -120,12 +120,12 @@ Before you can use the CLI, you need to login to your Appwrite account using appwrite login ``` -In case of a self-hosted instance, add the `endpoint` flag. This flag is used whenever you want to self-host Appwrite, and it requires you to add the URL string where you're hosting from after the `endpoint` flag. +If you're hosting a self-hosted instance, add the `endpoint` flag. This flag is used whenever you want to self-host Appwrite, and it requires you to add the URL string where you're hosting from after the `endpoint` flag. ```sh appwrite login --endpoint ``` -You can log-in to multiple accounts or change the **current** account by simply running the command again. +You can log in to multiple accounts or change the **current** account by re-running the command. # Initialization {% #Initialization %} diff --git a/src/routes/docs/tooling/command-line/teams/+page.markdoc b/src/routes/docs/tooling/command-line/teams/+page.markdoc index 2a665b7bdb..675f87d285 100644 --- a/src/routes/docs/tooling/command-line/teams/+page.markdoc +++ b/src/routes/docs/tooling/command-line/teams/+page.markdoc @@ -74,10 +74,10 @@ appwrite teams [COMMAND] [OPTIONS] * Get a list of all the teams in which the current user is a member. You can use the parameters to filter your results. --- * `create [options]` -* Create a new team. The user who creates the team will automatically be assigned as the owner of the team. Only the users with the owner role can invite new members, add new owners and delete or update the team. +* Create a new team. The user who creates the team will automatically be assigned as the owner of the team. Only the users with the owner role can invite new members, add new owners, and delete or update the team. --- * `get [options]` -* Get a team by its ID. All team members have read access for this resource. +* Get a team by its ID. All team members have read access to this resource. --- * `updateName [options]` * Update the team's name by its unique ID. @@ -92,10 +92,10 @@ appwrite teams [COMMAND] [OPTIONS] * Use this endpoint to list a team's members using the team's ID. All team members have read access to this endpoint. --- * `createMembership [options]` -* Invite a new member to join your team. Provide an ID for existing users, or invite unregistered users using an email or phone number. If initiated from a Client SDK, Appwrite will send an email or sms with a link to join the team to the invited user, and an account will be created for them if one doesn't exist. If initiated from a Server SDK, the new member will be added automatically to the team. You only need to provide one of a user ID, email, or phone number. Appwrite will prioritize accepting the user ID > email > phone number if you provide more than one of these parameters. Use the 'url' parameter to redirect the user from the invitation email to your app. After the user is redirected, use the [Update Team Membership Status](https://appwrite.io/docs/references/cloud/client-web/teams#updateMembershipStatus) endpoint to allow the user to accept the invitation to the team. Please note that to avoid a [Redirect Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) Appwrite will accept the only redirect URLs under the domains you have added as a platform on the Appwrite Console. +* Invite a new member to join your team. Provide an ID for existing users or invite unregistered users using an email or phone number. If initiated from a Client SDK, Appwrite will send an email or sms with a link to join the team to the invited user, and an account will be created for them if one doesn't exist. If initiated from a Server SDK, the new member will be added automatically to the team. You only need to provide one of a user ID, email, or phone number. Appwrite will prioritize accepting the user ID > email > phone number if you provide more than one of these parameters. Use the 'url' parameter to redirect the user from the invitation email to your app. After the user is redirected, use the [Update Team Membership Status](https://appwrite.io/docs/references/cloud/client-web/teams#updateMembershipStatus) endpoint to allow the user to accept the invitation to the team. Please note that to avoid a [Redirect Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md). Appwrite will accept the only redirect URLs under the domains you have added as a platform on the Appwrite Console. --- * `getMembership [options]` -* Get a team member by the membership unique id. All team members have read access for this resource. +* Get a team member by using the membership unique ID. All team members have read access to this resource. --- * `updateMembership [options]` * Modify the roles of a team member. Only team members with the owner role have access to this endpoint. Learn more about [roles and permissions](https://appwrite.io/docs/permissions). @@ -107,7 +107,7 @@ appwrite teams [COMMAND] [OPTIONS] * Use this endpoint to allow a user to accept an invitation to join a team after being redirected back to your app from the invitation email received by the user. If the request is successful, a session for the user is automatically created. --- * `getPrefs [options]` -* Get the team's shared preferences by its unique ID. If a preference doesn't need to be shared by all team members, prefer storing them in [user preferences](https://appwrite.io/docs/references/cloud/client-web/account#getPrefs). +* Get the team's shared preferences by its unique ID. If a preference doesn't need to be shared by all team members, we prefer storing them in [user preferences](https://appwrite.io/docs/references/cloud/client-web/account#getPrefs). --- * `updatePrefs [options]` * Update the team's preferences by its unique ID. The object you pass is stored as is and replaces any previous value. The maximum allowed prefs size is 64kB and throws an error if exceeded. diff --git a/src/routes/docs/tooling/command-line/topics/+page.markdoc b/src/routes/docs/tooling/command-line/topics/+page.markdoc index bee78622dc..d9ced7419f 100644 --- a/src/routes/docs/tooling/command-line/topics/+page.markdoc +++ b/src/routes/docs/tooling/command-line/topics/+page.markdoc @@ -121,7 +121,7 @@ appwrite messaging [COMMAND] [OPTIONS] * Create a new Apple Push Notification service provider. --- * `updateApnsProvider [options]` -* Update a Apple Push Notification service provider by its unique ID. +* Update an Apple Push Notification service provider by its unique ID. --- * `createFcmProvider [options]` * Create a new Firebase Cloud Messaging provider. From 63ea6c7de991b5d7e69f2994c917ddfd76bd3cee Mon Sep 17 00:00:00 2001 From: Richard <66279068+choir27@users.noreply.github.com> Date: Thu, 25 Jul 2024 10:04:02 -0400 Subject: [PATCH 55/66] Update src/routes/docs/tooling/command-line/installation/+page.markdoc Co-authored-by: Steven Nguyen <1477010+stnguyen90@users.noreply.github.com> --- src/routes/docs/tooling/command-line/installation/+page.markdoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/routes/docs/tooling/command-line/installation/+page.markdoc b/src/routes/docs/tooling/command-line/installation/+page.markdoc index 2639532e48..de75920fa2 100644 --- a/src/routes/docs/tooling/command-line/installation/+page.markdoc +++ b/src/routes/docs/tooling/command-line/installation/+page.markdoc @@ -139,7 +139,7 @@ This will create your `appwrite.json` file, where you will configure your variou ```json { - "projectId": + "projectId": "" } ``` From 1cc5cbefbd7c50cc45051c23678ecb50e3893447 Mon Sep 17 00:00:00 2001 From: Richard <66279068+choir27@users.noreply.github.com> Date: Thu, 25 Jul 2024 10:37:20 -0400 Subject: [PATCH 56/66] Update src/routes/docs/products/functions/functions/+page.markdoc Co-authored-by: Steven Nguyen <1477010+stnguyen90@users.noreply.github.com> --- src/routes/docs/products/functions/functions/+page.markdoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/routes/docs/products/functions/functions/+page.markdoc b/src/routes/docs/products/functions/functions/+page.markdoc index 0721087ea8..0b2fb4a1bd 100644 --- a/src/routes/docs/products/functions/functions/+page.markdoc +++ b/src/routes/docs/products/functions/functions/+page.markdoc @@ -87,7 +87,7 @@ The init command will initialize a folder with a starter function code. To push the generated code, add dependencies, and deploy the function using the following command: ```sh -appwrite push function +appwrite push functions ``` {% /tabsitem %} {% /tabs %} From 0d4ec7510d14605ea1d268156a4cf57e70348e79 Mon Sep 17 00:00:00 2001 From: choir27 Date: Thu, 25 Jul 2024 13:31:02 -0400 Subject: [PATCH 57/66] docs: Move collections, buckets, and topics using with CLI sections to tabs with code snippet examples and update content. Remove console, health, migrations, and vcs from command-line/commands table. Update placeholder variables with arrows and wrap with strings. Replace Cloud for Appwrite functions. Move scoop install and cookie commands to windows tab for more relevancy. Move Providers section to bottom of docs and rename it to CI/CD. Add more detail to messaging command-line/topics commands section. --- .../docs/products/auth/teams/+page.markdoc | 10 ++++- .../databases/collections/+page.markdoc | 27 ++++++++---- .../functions/deploy-manually/+page.markdoc | 22 +++++++++- .../products/messaging/topics/+page.markdoc | 20 +++++++-- .../products/storage/buckets/+page.markdoc | 27 ++++++++---- .../command-line/commands/+page.markdoc | 28 ++++--------- .../command-line/functions/+page.markdoc | 2 +- .../command-line/installation/+page.markdoc | 41 +++++++++++-------- .../non-interactive/+page.markdoc | 14 ++++--- .../tooling/command-line/topics/+page.markdoc | 3 +- 10 files changed, 129 insertions(+), 65 deletions(-) diff --git a/src/routes/docs/products/auth/teams/+page.markdoc b/src/routes/docs/products/auth/teams/+page.markdoc index 5a75d15e4d..09365438cb 100644 --- a/src/routes/docs/products/auth/teams/+page.markdoc +++ b/src/routes/docs/products/auth/teams/+page.markdoc @@ -189,7 +189,15 @@ val response = teams.createMembership( # Using the CLI {% #using-the-CLI %} -Using the CLI, you can invite members and create, get, update, and delete a team. You can also accomplish this by changing the content of the [appwrite.json](/docs/tooling/command-line/teams#appwritejson) file. However, you cannot use the CLI to configure permissions for team members. +{% partial file="cli-disclaimer.md" /%} + +Use the CLI command `appwrite teams createMembership [options]` to invite a new member into your team. + +```sh +appwrite teams createMembership --teamId "" --roles --phone "+12065550100" --name "" --userId "" +``` + +You can also get, update, and delete a user's membership. However, you cannot use the CLI to configure permissions for team members. {% arrow_link href="/docs/tooling/command-line/teams#commands" %} Learn more about the CLI teams commands diff --git a/src/routes/docs/products/databases/collections/+page.markdoc b/src/routes/docs/products/databases/collections/+page.markdoc index 7736296535..7ef47e20b4 100644 --- a/src/routes/docs/products/databases/collections/+page.markdoc +++ b/src/routes/docs/products/databases/collections/+page.markdoc @@ -225,17 +225,30 @@ let collection = try await databases.createCollection( You can also configure **permissions** in the `createCollection` method, learn more about the `createCollection` in the [API references](/docs/references). {% /tabsitem %} -{% /tabs %} - - -## Using the CLI {% #using-the-cli %} - -You can also create your collections and update, get, and delete them using CLI commands. Using the appwrite.json file, you can configure your collections' attributes and data size limit, toggle if the data is required, and toggle if it's an array of data. Configuring collection-level permissions cannot be done using the CLI but instead through the Appwrite Console. - +{% tabsitem #cli title="CLI" %} + +{% partial file="cli-disclaimer.md" /%} + +You can create your collections using the CLI command `appwrite init collections`. + +```sh +appwrite init collections +? What would you like to name your database? My Awesome Database +? What ID would you like to have for your database? unique() +? What would you like to name your collection? My Awesome Collection +? What ID would you like to have for your collection? unique() +? Enable Document-Security for configuring permissions for individual +documents No +✓ Success: +ℹ Info: Next you can use 'appwrite push collection' to deploy the changes. +``` {% arrow_link href="/docs/tooling/command-line/collections#commands" %} Learn more about the CLI collections commands {% /arrow_link %} +{% /tabsitem %} + +{% /tabs %} # Permissions {% #permissions %} Appwrite uses permissions to control data access. diff --git a/src/routes/docs/products/functions/deploy-manually/+page.markdoc b/src/routes/docs/products/functions/deploy-manually/+page.markdoc index f0f9dcf5c6..ff37b8e618 100644 --- a/src/routes/docs/products/functions/deploy-manually/+page.markdoc +++ b/src/routes/docs/products/functions/deploy-manually/+page.markdoc @@ -12,8 +12,28 @@ you can also create deployments manually or through the Appwrite CLI. # CLI {% #cli %} -Before deploying your function and updating, deleting, or downloading its deployment using the CLI, [**install**](/docs/tooling/command-line/installation#Installation) the CLI, [**log in**](/docs/tooling/command-line/installation#get-started) to your Appwrite account, and [**initialize**](/docs/tooling/command-line/installation#Initialization) your Appwrite project. Use the CLI commands or edit the `appwrite.json` file to create, update, list, and delete variables. +{% info title="CLI setup" %} +Before deploying your function with the Appwrite CLI, [**install**](/docs/tooling/command-line/installation#Installation) the CLI, [**log in**](/docs/tooling/command-line/installation#get-started) to your Appwrite account, and [**initialize**](/docs/tooling/command-line/installation#Initialization) your Appwrite project. +{% /info %} +Your function must be added to `appwrite.json` to deploy with the Appwrite CLI. +You can pull an existing function: + +```sh +appwrite pull functions +``` + +Or you can create a function: + +```sh +appwrite init functions +``` + +Edit the generated code, add dependencies, and push the function using the following command: + +```sh +appwrite push functions +``` {% arrow_link href="/docs/tooling/command-line/functions#commands" %} Learn more about the CLI functions commands {% /arrow_link %} diff --git a/src/routes/docs/products/messaging/topics/+page.markdoc b/src/routes/docs/products/messaging/topics/+page.markdoc index 04ac30e476..4f7fb8b1cf 100644 --- a/src/routes/docs/products/messaging/topics/+page.markdoc +++ b/src/routes/docs/products/messaging/topics/+page.markdoc @@ -264,11 +264,25 @@ let topic = try await messaging.createTopic( ``` {% /multicode %} {% /tabsitem %} -{% /tabs %} -# Using the CLI {% #using-the-CLI %} +{% tabsitem #cli title="CLI" %} + +You can create a topic using the CLI command `appwrite init topics`. + +```sh +appwrite init topics +? What would you like to name your messaging topic? My Awesome Topic +? What ID would you like to have for your messaging topic? unique() +✓ Success: +ℹ Info: Next you can use 'appwrite push topic' to deploy the changes. +``` + +{% arrow_link href="/docs/tooling/command-line/topics#commands" %} +Learn more about the CLI topics commands +{% /arrow_link %} -You can also create, get, delete, and update a topic using the CLI. You can also accomplish this by configuring with the `appwrite.json` file, but you cannot set or update any permissions. +{% /tabsitem %} +{% /tabs %} {% arrow_link href="/docs/tooling/command-line/topics#appwritejson" %} Learn more about appwrite.json diff --git a/src/routes/docs/products/storage/buckets/+page.markdoc b/src/routes/docs/products/storage/buckets/+page.markdoc index 5139dedcbe..d3175c57a7 100644 --- a/src/routes/docs/products/storage/buckets/+page.markdoc +++ b/src/routes/docs/products/storage/buckets/+page.markdoc @@ -10,14 +10,6 @@ Buckets let you limit file size and extensions, whether or not to encrypt the fi # Create Bucket {% #create-bucket %} You can create your bucket from the Appwrite Console, a [Server SDK](/docs/sdks#server), or the [CLI](/docs/tooling/command-line/buckets). -# Using the CLI {% #using-the-cli %} - -Using the CLI, you can also create a bucket and get, update, and delete it, which you can also accomplish by updating the `appwrite.json` file. However, you cannot control file access by configuring bucket access to users. - -{% arrow_link href="/docs/tooling/command-line/buckets#commands" %} -Learn more about the CLI buckets commands -{% /arrow_link %} - {% tabs %} {% tabsitem #console title="Console" %} You can create a bucket by heading to the **Storage** page and clicking **Create bucket**. @@ -232,6 +224,25 @@ let bucket = try await storage.createBucket( {% /multicode %} You can also configure permission, file size and extension restrictions, and more in the `createBucket` method, learn more about the `createBucket` in the [API references](/docs/references/cloud/server-nodejs/storage#createBucket). +{% /tabsitem %} + +{% tabsitem #cli title="CLI" %} + +Create a bucket using the CLI command `appwrite init buckets`. + +```sh +appwrite init buckets +? What would you like to name your bucket? My Awesome Bucket +? What ID would you like to have for your bucket? unique() +? Enable File-Security configuring permissions for individual file No +✓ Success: +ℹ Info: Next you can use 'appwrite push bucket' to deploy the changes. +``` + +{% arrow_link href="/docs/tooling/command-line/buckets#commands" %} +Learn more about the CLI buckets commands +{% /arrow_link %} + {% /tabsitem %} {% /tabs %} diff --git a/src/routes/docs/tooling/command-line/commands/+page.markdoc b/src/routes/docs/tooling/command-line/commands/+page.markdoc index 298e96817b..efa7b3961c 100644 --- a/src/routes/docs/tooling/command-line/commands/+page.markdoc +++ b/src/routes/docs/tooling/command-line/commands/+page.markdoc @@ -36,21 +36,9 @@ Below is a list of the available commands in the Appwrite CLI. You can get more * `locale` * The locale command allows you to customize your app based on your users' location. --- -* `console` -* The console command gives you access to the APIs used by the Appwrite console. ---- * `graphql` * The graphql command allows you to query and mutate any resource type on your Appwrite server. --- -* `health` -* The health command allows you to validate and monitor your Appwrite server's health. ---- -* `migrations` -* The migrations command allows you to migrate data between services. ---- -* `vcs` -* The vcs command allows you to interact with VCS providers and manage your code repositories. ---- {% /table %} ## Account commands {% #account-commands %} @@ -113,7 +101,7 @@ Below is a list of the available commands in the Appwrite CLI. You can get more * The databases command allows you to create structured collections of documents and query and filter lists of documents. --- * `functions` -* The functions command allows you to view, create, and manage your Cloud Functions. +* The functions command allows you to view, create, and manage your Appwrite Functions. --- * `messaging` * The messaging command allows you to send, create, edit, and delete messages. @@ -199,9 +187,9 @@ Many resources support the option to view them in the console. Use the `--consol ```sh appwrite databases getDocument \ - --databaseId DATABASE_ID \ - --collectionId COLLECTION_ID \ - --documentId DOCUMENT_ID \ + --databaseId "" \ + --collectionId "" \ + --documentId "" \ --console --open ``` @@ -230,13 +218,13 @@ appwrite users list To get a list of all your [collections](/docs/tooling/command-line/collections), you can use the `listCollections` command. ```sh -appwrite databases listCollections --databaseId [DATABASE_ID] +appwrite databases listCollections --databaseId "" ``` If you wish to parse the output from the CLI, you can request the CLI output in JSON format using the `--json` flag ```sh -appwrite databases listCollections --databaseId [DATABASE_ID]--json +appwrite databases listCollections --databaseId "" --json ``` ## Get collection {% #get-collection %} @@ -244,7 +232,7 @@ appwrite databases listCollections --databaseId [DATABASE_ID]--json To get more information on a particular collection, you can make use of the `getCollection` command and pass in the collectionId. ```sh -appwrite databases getCollection --databaseId [DATABASE_ID] --collectionId [COLLECTION_ID] +appwrite databases getCollection --databaseId "" --collectionId "" ``` ## Create document {% #create-document %} @@ -253,7 +241,7 @@ To create a new document in an existing collection, use the `createDocument` com ```sh appwrite databases createDocument \ - --databaseId [DATABASE_ID] --collectionId [COLLECTION_ID] \ + --databaseId "" --collectionId "" \ --documentId 'unique()' --data '{ "Name": "Iron Man" }' \ --permissions 'read("any")' 'write("team:abc")' ``` \ No newline at end of file diff --git a/src/routes/docs/tooling/command-line/functions/+page.markdoc b/src/routes/docs/tooling/command-line/functions/+page.markdoc index ca82f0358c..b4db8dce4a 100644 --- a/src/routes/docs/tooling/command-line/functions/+page.markdoc +++ b/src/routes/docs/tooling/command-line/functions/+page.markdoc @@ -110,7 +110,7 @@ appwrite push functions # Commands {% #commands %} -The functions command lets you view, create, and manage your Cloud Functions. Appwrite functions CLI commands generally follow the following syntax: +The functions command lets you view, create, and manage your Appwrite Functions. Appwrite functions CLI commands generally follow the following syntax: ```sh appwrite functions [COMMAND] [OPTIONS] diff --git a/src/routes/docs/tooling/command-line/installation/+page.markdoc b/src/routes/docs/tooling/command-line/installation/+page.markdoc index de75920fa2..9c1057284b 100644 --- a/src/routes/docs/tooling/command-line/installation/+page.markdoc +++ b/src/routes/docs/tooling/command-line/installation/+page.markdoc @@ -44,17 +44,15 @@ curl -sL https://appwrite.io/cli/install.sh | bash ```sh iwr -useb https://appwrite.io/cli/install.ps1 | iex ``` -{% /tabsitem %} -{% tabsitem #linux title="Linux" %} ```sh -curl -sL https://appwrite.io/cli/install.sh | bash +scoop install https://raw.githubusercontent.com/appwrite/sdk-for-cli/master/scoop/appwrite.json ``` {% /tabsitem %} -{% tabsitem #scoop title="Scoop" %} +{% tabsitem #linux title="Linux" %} ```sh -scoop install https://raw.githubusercontent.com/appwrite/sdk-for-cli/master/scoop/appwrite.json +curl -sL https://appwrite.io/cli/install.sh | bash ``` {% /tabsitem %} @@ -120,14 +118,14 @@ Before you can use the CLI, you need to login to your Appwrite account using appwrite login ``` -If you're hosting a self-hosted instance, add the `endpoint` flag. This flag is used whenever you want to self-host Appwrite, and it requires you to add the URL string where you're hosting from after the `endpoint` flag. +Add the' endpoint' flag if you're using a self-hosted instance of Appwrite. This flag requires you to add the URL string where you're using for your self-hosted instance after the `endpoint` flag. ```sh appwrite login --endpoint ``` You can log in to multiple accounts or change the **current** account by re-running the command. -# Initialization {% #Initialization %} +# Initialization {% #initialization %} After you're logged in, the CLI needs to be initialized with your Appwrite project. You can initialize the CLI using: @@ -218,22 +216,26 @@ rm -f /usr/local/bin/appwrite | bash {% /tabsitem %} {% tabsitem #windows title="Windows" %} + +Using [powershell](https://learn.microsoft.com/en-us/powershell/) + ```sh $APPWRITE_INSTALL_DIR = Join-Path -Path $env:LOCALAPPDATA -ChildPath "Appwrite"; Remove-Item -Force -Path $APPWRITE_INSTALL_DIR ``` -{% /tabsitem %} -{% tabsitem #linux title="Linux" %} +or [Scoop](https://scoop.sh/) + ```sh -rm -f /usr/local/bin/appwrite | bash +scoop uninstall appwrite ``` {% /tabsitem %} -{% tabsitem #scoop title="Scoop" %} +{% tabsitem #linux title="Linux" %} ```sh -scoop uninstall ./appwrite +rm -f /usr/local/bin/appwrite | bash ``` {% /tabsitem %} + {% /tabs %} You can also remove the configuration, cookies, and API Keys the Appwrite CLI stored. To remove those, run the following command. @@ -246,20 +248,25 @@ rm -rf ~/.appwrite | bash {% /tabsitem %} {% tabsitem #windows title="Windows" %} + +Using [powershell](https://learn.microsoft.com/en-us/powershell/) + ```sh $APPWRITE_CONFIG_DIR = Join-Path -Path $env:UserProfile -ChildPath ".appwrite"; Remove-Item -Recurse -Force -Path $APPWRITE_CONFIG_DIR ``` -{% /tabsitem %} -{% tabsitem #linux title="Linux" %} +or [Scoop](https://scoop.sh/) + ```sh -rm -rf ~/.appwrite | bash +appwrite client --reset ``` + {% /tabsitem %} -{% tabsitem #scoop title="Scoop" %} +{% tabsitem #linux title="Linux" %} ```sh -appwrite client --reset +rm -rf ~/.appwrite | bash ``` {% /tabsitem %} + {% /tabs %} \ No newline at end of file diff --git a/src/routes/docs/tooling/command-line/non-interactive/+page.markdoc b/src/routes/docs/tooling/command-line/non-interactive/+page.markdoc index c7fee23786..2b00d00668 100644 --- a/src/routes/docs/tooling/command-line/non-interactive/+page.markdoc +++ b/src/routes/docs/tooling/command-line/non-interactive/+page.markdoc @@ -19,10 +19,6 @@ In this mode, the CLI can only interact with one project at a time. # API Keys {% #api-keys %} In non-interactive mode, the CLI uses an API key to authenticate. Your API key must have sufficient permissions to execute the commands you plan to use. [Learn more about API Keys](/docs/advanced/platform/api-keys). -# Providers {% #providers %} - -In non-interactive mode, you can use providers like [Github actions](https://github.com/appwrite/setup-for-actions/tree/feat-cli-g2?tab=readme-ov-file#introduction) to automate your Appwrite CLI commands, allowing you to use the CLI commands even in non-interactive mode. - # Deployment {% #deployment %} Appwrite's `push` commands can also be executed in a non-interactive mode. This applies to the following resources: functions, collections, buckets, teams, and messaging topics. @@ -63,4 +59,12 @@ Push all buckets: ```sh appwrite push buckets --all --force -``` \ No newline at end of file +``` + +# CI/CD integrations {% #ci-cd-integrations %} + +Use providers like Github actions to create continuous integrations and continuous delivery or deployment (CI/CD). + +## Github + +You can use [Github actions](https://github.com/appwrite/setup-for-actions/tree/feat-cli-g2?tab=readme-ov-file#introduction) to automate your Appwrite CLI commands, allowing you to use them even in non-interactive mode. \ No newline at end of file diff --git a/src/routes/docs/tooling/command-line/topics/+page.markdoc b/src/routes/docs/tooling/command-line/topics/+page.markdoc index d9ced7419f..0604f4bb34 100644 --- a/src/routes/docs/tooling/command-line/topics/+page.markdoc +++ b/src/routes/docs/tooling/command-line/topics/+page.markdoc @@ -71,8 +71,7 @@ appwrite push topics # Commands {% #commands %} -The messaging command allows you to send, get, update, and delete messages. Appwrite messaging CLI commands generally follow the following syntax: - +The messaging command allows you to send, get, update, and delete push notifications, SMS text messages, and emails. You can create a new provider like Mailgun and SendGrid and create, update, get, and delete topics and subscribers. Appwrite messaging CLI commands generally follow the following syntax: ```sh appwrite messaging [COMMAND] [OPTIONS] ``` From 6f0cd94d3abf0865cddec9363edf45e6894dd6d3 Mon Sep 17 00:00:00 2001 From: choir27 Date: Fri, 26 Jul 2024 10:08:58 -0400 Subject: [PATCH 58/66] docs: Create partial for duplicate content for function CLI section. Update content CLI sections in topics, buckets, and collections. Update Windows install tab with transition texs. Update placeholders variables with <> and quotes. --- src/partials/cli-disclaimer.md | 2 +- src/partials/cli-function.md | 18 +++++++++++++ src/partials/cli-push-command.md | 2 +- .../databases/collections/+page.markdoc | 19 +++++++------- .../functions/deploy-manually/+page.markdoc | 26 +------------------ .../functions/functions/+page.markdoc | 22 +--------------- .../products/messaging/topics/+page.markdoc | 21 ++++++++------- .../products/storage/buckets/+page.markdoc | 13 ++++++---- .../command-line/installation/+page.markdoc | 15 +++++++---- 9 files changed, 61 insertions(+), 77 deletions(-) create mode 100644 src/partials/cli-function.md diff --git a/src/partials/cli-disclaimer.md b/src/partials/cli-disclaimer.md index 305675b9e6..8104cfc8a5 100644 --- a/src/partials/cli-disclaimer.md +++ b/src/partials/cli-disclaimer.md @@ -1,3 +1,3 @@ {% info title="Before proceeding" %} -Ensure you [**install**](/docs/tooling/command-line/installation#Installation) the CLI, [**log in**](/docs/tooling/command-line/installation#get-started) to your Appwrite account, and [**initialize**](/docs/tooling/command-line/installation#Initialization) your Appwrite project. +Ensure you [**install**](/docs/tooling/command-line/installation#installation) the CLI, [**log in**](/docs/tooling/command-line/installation#get-started) to your Appwrite account, and [**initialize**](/docs/tooling/command-line/installation#initialization) your Appwrite project. {% /info %} diff --git a/src/partials/cli-function.md b/src/partials/cli-function.md new file mode 100644 index 0000000000..97d85026cf --- /dev/null +++ b/src/partials/cli-function.md @@ -0,0 +1,18 @@ +You can create functions using the CLI without needing to access the Console. + +{% partial file="cli-disclaimer.md" /%} + +To deploy your function with the Appwrite CLI, use the `appwrite init functions` command to create a starter function and paste your code into the generated file and folder. + +```sh +appwrite init functions +``` +To deploy the generated code, add any dependencies and push the function using the following command: + +```sh +appwrite push functions +``` + +{% arrow_link href="/docs/tooling/command-line/functions#commands" %} +Learn more about the CLI functions commands +{% /arrow_link %} diff --git a/src/partials/cli-push-command.md b/src/partials/cli-push-command.md index 0889326f6f..67c033abf4 100644 --- a/src/partials/cli-push-command.md +++ b/src/partials/cli-push-command.md @@ -1 +1 @@ -Use the `push` command in the folder containing your `appwrite.json` file to push the changes you made. +Use the `push` command in the folder containing your `appwrite.json` file to push the changes you made. \ No newline at end of file diff --git a/src/routes/docs/products/databases/collections/+page.markdoc b/src/routes/docs/products/databases/collections/+page.markdoc index 7ef47e20b4..6020db4226 100644 --- a/src/routes/docs/products/databases/collections/+page.markdoc +++ b/src/routes/docs/products/databases/collections/+page.markdoc @@ -229,19 +229,20 @@ You can also configure **permissions** in the `createCollection` method, learn m {% partial file="cli-disclaimer.md" /%} -You can create your collections using the CLI command `appwrite init collections`. +To create your collection using the CLI, first use the `appwrite init collections` command to initialize your collection. ```sh appwrite init collections -? What would you like to name your database? My Awesome Database -? What ID would you like to have for your database? unique() -? What would you like to name your collection? My Awesome Collection -? What ID would you like to have for your collection? unique() -? Enable Document-Security for configuring permissions for individual -documents No -✓ Success: -ℹ Info: Next you can use 'appwrite push collection' to deploy the changes. ``` + +Then push your collection using the `appwrite push collections` command. + +```sh +appwrite push collections +``` + +This will create your collection in the Console with all of your `appwrite.json` configurations. + {% arrow_link href="/docs/tooling/command-line/collections#commands" %} Learn more about the CLI collections commands {% /arrow_link %} diff --git a/src/routes/docs/products/functions/deploy-manually/+page.markdoc b/src/routes/docs/products/functions/deploy-manually/+page.markdoc index ff37b8e618..581b24a390 100644 --- a/src/routes/docs/products/functions/deploy-manually/+page.markdoc +++ b/src/routes/docs/products/functions/deploy-manually/+page.markdoc @@ -12,31 +12,7 @@ you can also create deployments manually or through the Appwrite CLI. # CLI {% #cli %} -{% info title="CLI setup" %} -Before deploying your function with the Appwrite CLI, [**install**](/docs/tooling/command-line/installation#Installation) the CLI, [**log in**](/docs/tooling/command-line/installation#get-started) to your Appwrite account, and [**initialize**](/docs/tooling/command-line/installation#Initialization) your Appwrite project. -{% /info %} - -Your function must be added to `appwrite.json` to deploy with the Appwrite CLI. -You can pull an existing function: - -```sh -appwrite pull functions -``` - -Or you can create a function: - -```sh -appwrite init functions -``` - -Edit the generated code, add dependencies, and push the function using the following command: - -```sh -appwrite push functions -``` -{% arrow_link href="/docs/tooling/command-line/functions#commands" %} -Learn more about the CLI functions commands -{% /arrow_link %} +{% partial file="cli-function.md" /%} ## Configure CLI deployments {% #configure-cli-deployments %} If you need to target a different project, API endpoint, change the path or entry point of your function, or update any of the other configuration options, diff --git a/src/routes/docs/products/functions/functions/+page.markdoc b/src/routes/docs/products/functions/functions/+page.markdoc index 0b2fb4a1bd..29d47fb17c 100644 --- a/src/routes/docs/products/functions/functions/+page.markdoc +++ b/src/routes/docs/products/functions/functions/+page.markdoc @@ -66,29 +66,9 @@ Remember to specify the build commands for your function to install dependencies {% /tabsitem %} {% tabsitem #cli title="CLI" %} -You can create functions using the CLI without needing to access the Console. -Before you can deploy with the Appwrite CLI, make sure you [**install**](/docs/tooling/command-line/installation#Installation) the CLI, [**log in**](/docs/tooling/command-line/installation#get-started) to your Appwrite account, and [**initialize**](/docs/tooling/command-line/installation#Initialization) your Appwrite project. -Your function must be added to `appwrite.json` to deploy with the Appwrite CLI. +{% partial file="cli-function.md" /%} -You can pull existing functions: - -```sh -appwrite pull functions -``` - -Or you can create a function: - -```sh -appwrite init function -``` - -The init command will initialize a folder with a starter function code. -To push the generated code, add dependencies, and deploy the function using the following command: - -```sh -appwrite push functions -``` {% /tabsitem %} {% /tabs %} diff --git a/src/routes/docs/products/messaging/topics/+page.markdoc b/src/routes/docs/products/messaging/topics/+page.markdoc index 4f7fb8b1cf..85a0e4942b 100644 --- a/src/routes/docs/products/messaging/topics/+page.markdoc +++ b/src/routes/docs/products/messaging/topics/+page.markdoc @@ -267,16 +267,22 @@ let topic = try await messaging.createTopic( {% tabsitem #cli title="CLI" %} -You can create a topic using the CLI command `appwrite init topics`. +{% partial file="cli-disclaimer.md" /%} + +You can create a topic using the CLI command `appwrite init topics` to initialize a topic. ```sh appwrite init topics -? What would you like to name your messaging topic? My Awesome Topic -? What ID would you like to have for your messaging topic? unique() -✓ Success: -ℹ Info: Next you can use 'appwrite push topic' to deploy the changes. ``` +You can now push your topics with the following command: + +```sh +appwrite push topics +``` + +This will create your topic in the Console with all of your `appwrite.json` configurations. + {% arrow_link href="/docs/tooling/command-line/topics#commands" %} Learn more about the CLI topics commands {% /arrow_link %} @@ -284,11 +290,6 @@ Learn more about the CLI topics commands {% /tabsitem %} {% /tabs %} -{% arrow_link href="/docs/tooling/command-line/topics#appwritejson" %} -Learn more about appwrite.json -{% /arrow_link %} - - # Permissions {% #permissions %} Before you can subscribe to a topic, a user needs the appropriate permission. You can set permission by navigating to **Messaging** > **Topics** > select a topic to configure > **Subscription access**. diff --git a/src/routes/docs/products/storage/buckets/+page.markdoc b/src/routes/docs/products/storage/buckets/+page.markdoc index d3175c57a7..d61a619227 100644 --- a/src/routes/docs/products/storage/buckets/+page.markdoc +++ b/src/routes/docs/products/storage/buckets/+page.markdoc @@ -232,13 +232,16 @@ Create a bucket using the CLI command `appwrite init buckets`. ```sh appwrite init buckets -? What would you like to name your bucket? My Awesome Bucket -? What ID would you like to have for your bucket? unique() -? Enable File-Security configuring permissions for individual file No -✓ Success: -ℹ Info: Next you can use 'appwrite push bucket' to deploy the changes. ``` +This will initialize your bucket in your `appwrite.json` file. To push your initialized bucket, use the `appwrite push buckets`. + +```sh +appwrite push buckets +``` + +This will create your bucket in the Console with all of your `appwrite.json` configurations. + {% arrow_link href="/docs/tooling/command-line/buckets#commands" %} Learn more about the CLI buckets commands {% /arrow_link %} diff --git a/src/routes/docs/tooling/command-line/installation/+page.markdoc b/src/routes/docs/tooling/command-line/installation/+page.markdoc index 9c1057284b..cc85317c15 100644 --- a/src/routes/docs/tooling/command-line/installation/+page.markdoc +++ b/src/routes/docs/tooling/command-line/installation/+page.markdoc @@ -41,10 +41,15 @@ curl -sL https://appwrite.io/cli/install.sh | bash {% /tabsitem %} {% tabsitem #windows title="Windows" %} + +Using [Powershell](https://learn.microsoft.com/en-us/powershell/) + ```sh iwr -useb https://appwrite.io/cli/install.ps1 | iex ``` +or [Scoop](https://scoop.sh/) + ```sh scoop install https://raw.githubusercontent.com/appwrite/sdk-for-cli/master/scoop/appwrite.json ``` @@ -118,10 +123,10 @@ Before you can use the CLI, you need to login to your Appwrite account using appwrite login ``` -Add the' endpoint' flag if you're using a self-hosted instance of Appwrite. This flag requires you to add the URL string where you're using for your self-hosted instance after the `endpoint` flag. +Add the `--endpoint` flag if you're using a self-hosted instance of Appwrite. This flag requires you to add the URL string you're using for your self-hosted instance after the `--endpoint` flag. ```sh -appwrite login --endpoint +appwrite login --endpoint "" ``` You can log in to multiple accounts or change the **current** account by re-running the command. @@ -144,7 +149,7 @@ This will create your `appwrite.json` file, where you will configure your variou You can run your first CLI command after logging in. Try fetching information about your Appwrite project. ```sh -appwrite projects get --projectId [PROJECT_ID] +appwrite projects get --projectId "" ``` {% info title="Self-signed certificates" %} @@ -217,7 +222,7 @@ rm -f /usr/local/bin/appwrite | bash {% tabsitem #windows title="Windows" %} -Using [powershell](https://learn.microsoft.com/en-us/powershell/) +Using [Powershell](https://learn.microsoft.com/en-us/powershell/) ```sh $APPWRITE_INSTALL_DIR = Join-Path -Path $env:LOCALAPPDATA -ChildPath "Appwrite"; Remove-Item -Force -Path $APPWRITE_INSTALL_DIR @@ -249,7 +254,7 @@ rm -rf ~/.appwrite | bash {% tabsitem #windows title="Windows" %} -Using [powershell](https://learn.microsoft.com/en-us/powershell/) +Using [Powershell](https://learn.microsoft.com/en-us/powershell/) ```sh $APPWRITE_CONFIG_DIR = Join-Path -Path $env:UserProfile -ChildPath ".appwrite"; Remove-Item -Recurse -Force -Path $APPWRITE_CONFIG_DIR From 7c677736ac644639f4192c5775684433fbcb70a1 Mon Sep 17 00:00:00 2001 From: choir27 Date: Fri, 26 Jul 2024 10:17:47 -0400 Subject: [PATCH 59/66] update appwrite.json placeholder variables with <> and quotes --- .../tooling/command-line/collections/+page.markdoc | 2 +- .../docs/tooling/command-line/functions/+page.markdoc | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/routes/docs/tooling/command-line/collections/+page.markdoc b/src/routes/docs/tooling/command-line/collections/+page.markdoc index 3769cc1cf1..39f7085ec2 100644 --- a/src/routes/docs/tooling/command-line/collections/+page.markdoc +++ b/src/routes/docs/tooling/command-line/collections/+page.markdoc @@ -42,7 +42,7 @@ After [initializing](/docs/tooling/command-line/installation#Initialization) you ], "collections": [ { - "$id": "COLLECTION_ID", + "$id": "", "$permissions": [ "create(\"any\")", "read(\"any\")", diff --git a/src/routes/docs/tooling/command-line/functions/+page.markdoc b/src/routes/docs/tooling/command-line/functions/+page.markdoc index b4db8dce4a..f01f81df3a 100644 --- a/src/routes/docs/tooling/command-line/functions/+page.markdoc +++ b/src/routes/docs/tooling/command-line/functions/+page.markdoc @@ -30,7 +30,7 @@ After [initializing](/docs/tooling/command-line/installation#Initialization) you ```json { - "projectId": , + "projectId": "", "functions": [ { "$id": "", @@ -50,7 +50,7 @@ After [initializing](/docs/tooling/command-line/installation#Initialization) you "$id": "eyJhbGciOiJIUzI1N", "$createdAt": "2024-04-22T22:51:51.745+00:00", "$updatedAt": "2024-04-23T00:13:10.886+00:00", - "key": "X_Appwrite_Key", + "key": "", "value": "", "resourceType": "function", "resourceId": "eyJhbGciOiJIUzI1N" @@ -59,7 +59,7 @@ After [initializing](/docs/tooling/command-line/installation#Initialization) you "$id": "N1IzUIJiOicGbhJye", "$createdAt": "2024-04-22T23:32:12.901+00:00", "$updatedAt": "2024-04-22T23:32:12.901+00:00", - "key": "DATABASE_ID", + "key": "", "value": "", "resourceType": "function", "resourceId": "N1IzUIJiOicGbhJye" @@ -68,7 +68,7 @@ After [initializing](/docs/tooling/command-line/installation#Initialization) you "$id": "OicGbhJyeN1IzUIJi", "$createdAt": "2024-04-22T23:32:12.910+00:00", "$updatedAt": "2024-04-22T23:32:12.910+00:00", - "key": "PROJECT_ID", + "key": "", "value": "", "resourceType": "function", "resourceId": "OicGbhJyeN1IzUIJi" @@ -77,7 +77,7 @@ After [initializing](/docs/tooling/command-line/installation#Initialization) you "$id": "bhJyIJiON1IzUicGe", "$createdAt": "2024-04-22T23:32:12.912+00:00", "$updatedAt": "2024-04-22T23:32:12.912+00:00", - "key": "COLLECTION_USERS_ID", + "key": "", "value": "", "resourceType": "function", "resourceId": "bhJyIJiON1IzUicGe" From e891621c728ad05fe2053930ce0e67fc61c3a500 Mon Sep 17 00:00:00 2001 From: choir27 Date: Mon, 5 Aug 2024 12:50:24 -0400 Subject: [PATCH 60/66] docs: quick fix to lowercase given IDs --- src/routes/docs/tooling/command-line/installation/+page.markdoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/routes/docs/tooling/command-line/installation/+page.markdoc b/src/routes/docs/tooling/command-line/installation/+page.markdoc index cc85317c15..a0d19b32e3 100644 --- a/src/routes/docs/tooling/command-line/installation/+page.markdoc +++ b/src/routes/docs/tooling/command-line/installation/+page.markdoc @@ -6,7 +6,7 @@ description: Get started with the Appwrite CLI by following the installation gui The [Appwrite CLI](https://github.com/appwrite/sdk-for-cli) is a command-line application that allows you to interact with Appwrite to perform server-side tasks using your terminal. This includes creating and managing projects, managing resources (documents, files, users), creating and deploying Appwrite Functions, and other operations available through Appwrite's API. -# Installation {% #Installation %} +# Installation {% #installation %} The CLI is packaged both as an [npm module](https://www.npmjs.com/package/appwrite-cli) as well as a [standalone binary](https://github.com/appwrite/sdk-for-cli/releases/latest) for your operating system, making it completely dependency free, platform independent, and language agnostic. From 48cee9d23976f4d1b1b0adb6ff7e30692d9d1ec9 Mon Sep 17 00:00:00 2001 From: choir27 Date: Mon, 5 Aug 2024 13:03:33 -0400 Subject: [PATCH 61/66] docs: quick fix to update links for /docs/tooling/command-line/installation#Initialization --- src/routes/docs/tooling/command-line/buckets/+page.markdoc | 2 +- src/routes/docs/tooling/command-line/collections/+page.markdoc | 2 +- src/routes/docs/tooling/command-line/functions/+page.markdoc | 2 +- src/routes/docs/tooling/command-line/teams/+page.markdoc | 2 +- src/routes/docs/tooling/command-line/topics/+page.markdoc | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/routes/docs/tooling/command-line/buckets/+page.markdoc b/src/routes/docs/tooling/command-line/buckets/+page.markdoc index 8372e291b6..9c6b5269d2 100644 --- a/src/routes/docs/tooling/command-line/buckets/+page.markdoc +++ b/src/routes/docs/tooling/command-line/buckets/+page.markdoc @@ -26,7 +26,7 @@ appwrite pull buckets # appwrite.json {% #appwritejson %} -After [initializing](/docs/tooling/command-line/installation#Initialization) your Appwrite project and pulling your existing buckets, your `appwrite.json` file should look similar to the following: +After [initializing](/docs/tooling/command-line/installation#initialization) your Appwrite project and pulling your existing buckets, your `appwrite.json` file should look similar to the following: ```json { diff --git a/src/routes/docs/tooling/command-line/collections/+page.markdoc b/src/routes/docs/tooling/command-line/collections/+page.markdoc index 39f7085ec2..ce9346af2d 100644 --- a/src/routes/docs/tooling/command-line/collections/+page.markdoc +++ b/src/routes/docs/tooling/command-line/collections/+page.markdoc @@ -26,7 +26,7 @@ appwrite pull collections # appwrite.json {% #appwritejson %} -After [initializing](/docs/tooling/command-line/installation#Initialization) your Appwrite project and pulling your existing buckets, your `appwrite.json` file should look similar to the following: +After [initializing](/docs/tooling/command-line/installation#initialization) your Appwrite project and pulling your existing buckets, your `appwrite.json` file should look similar to the following: ```json { diff --git a/src/routes/docs/tooling/command-line/functions/+page.markdoc b/src/routes/docs/tooling/command-line/functions/+page.markdoc index f01f81df3a..01feeb9278 100644 --- a/src/routes/docs/tooling/command-line/functions/+page.markdoc +++ b/src/routes/docs/tooling/command-line/functions/+page.markdoc @@ -26,7 +26,7 @@ appwrite pull functions # appwrite.json {% #appwritejson %} -After [initializing](/docs/tooling/command-line/installation#Initialization) your Appwrite project and pulling your existing buckets, your `appwrite.json` file should look similar to the following: +After [initializing](/docs/tooling/command-line/installation#initialization) your Appwrite project and pulling your existing buckets, your `appwrite.json` file should look similar to the following: ```json { diff --git a/src/routes/docs/tooling/command-line/teams/+page.markdoc b/src/routes/docs/tooling/command-line/teams/+page.markdoc index 675f87d285..b7a2785063 100644 --- a/src/routes/docs/tooling/command-line/teams/+page.markdoc +++ b/src/routes/docs/tooling/command-line/teams/+page.markdoc @@ -25,7 +25,7 @@ appwrite pull teams ``` # appwrite.json {% #appwritejson %} -After [initializing](/docs/tooling/command-line/installation#Initialization) your Appwrite project and pulling your existing buckets, your `appwrite.json` file should look similar to the following: +After [initializing](/docs/tooling/command-line/installation#initialization) your Appwrite project and pulling your existing buckets, your `appwrite.json` file should look similar to the following: ```json { diff --git a/src/routes/docs/tooling/command-line/topics/+page.markdoc b/src/routes/docs/tooling/command-line/topics/+page.markdoc index 0604f4bb34..8cc258ecd9 100644 --- a/src/routes/docs/tooling/command-line/topics/+page.markdoc +++ b/src/routes/docs/tooling/command-line/topics/+page.markdoc @@ -26,7 +26,7 @@ appwrite pull topics # appwrite.json {% #appwritejson %} -After [initializing](/docs/tooling/command-line/installation#Initialization) your Appwrite project and pulling your existing topics, your `appwrite.json` file should look similar to the following: +After [initializing](/docs/tooling/command-line/installation#initialization) your Appwrite project and pulling your existing topics, your `appwrite.json` file should look similar to the following: ```json { From 74641213832da3f1ceebe183fff40c714a74928c Mon Sep 17 00:00:00 2001 From: Richard <66279068+choir27@users.noreply.github.com> Date: Mon, 5 Aug 2024 14:25:51 -0400 Subject: [PATCH 62/66] Update src/routes/docs/tooling/command-line/teams/+page.markdoc Co-authored-by: Steven Nguyen <1477010+stnguyen90@users.noreply.github.com> --- src/routes/docs/tooling/command-line/teams/+page.markdoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/routes/docs/tooling/command-line/teams/+page.markdoc b/src/routes/docs/tooling/command-line/teams/+page.markdoc index b7a2785063..58618c5555 100644 --- a/src/routes/docs/tooling/command-line/teams/+page.markdoc +++ b/src/routes/docs/tooling/command-line/teams/+page.markdoc @@ -6,7 +6,7 @@ description: Efficiently deploy your Appwrite teams using the Command-Line Tool {% partial file="cli-disclaimer.md" /%} -The Appwrite CLI can create teams to organize users. Teams can be used to confgiure [permissions](https://appwrite.io/docs/products/auth/teams#permissions) to a group of users. +The Appwrite CLI can create teams to organize users. Teams can be used to configure [permissions](https://appwrite.io/docs/products/auth/teams#permissions) for a group of users. # Initialize team {% #initialize-team %} From 9a21976750e40621102e878a32c482c6df50a212 Mon Sep 17 00:00:00 2001 From: choir27 Date: Mon, 5 Aug 2024 14:52:05 -0400 Subject: [PATCH 63/66] docs: Change Command line interface (CLI) to Installation and update partial url link. Change installation h2 to Getting started to avoide heading clash. Change The Appwrite ClI is a command-line application to The Appwrite Command Line Interface (CLI) is an application to explain what CLI is. Change title from Deploy with CLI to to match navigation. --- src/partials/cli-disclaimer.md | 2 +- src/routes/docs/tooling/command-line/buckets/+page.markdoc | 2 +- .../docs/tooling/command-line/collections/+page.markdoc | 2 +- .../docs/tooling/command-line/functions/+page.markdoc | 2 +- .../docs/tooling/command-line/installation/+page.markdoc | 6 +++--- src/routes/docs/tooling/command-line/teams/+page.markdoc | 2 +- src/routes/docs/tooling/command-line/topics/+page.markdoc | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/partials/cli-disclaimer.md b/src/partials/cli-disclaimer.md index 8104cfc8a5..1892087fee 100644 --- a/src/partials/cli-disclaimer.md +++ b/src/partials/cli-disclaimer.md @@ -1,3 +1,3 @@ {% info title="Before proceeding" %} -Ensure you [**install**](/docs/tooling/command-line/installation#installation) the CLI, [**log in**](/docs/tooling/command-line/installation#get-started) to your Appwrite account, and [**initialize**](/docs/tooling/command-line/installation#initialization) your Appwrite project. +Ensure you [**install**](/docs/tooling/command-line/installation#getting-started) the CLI, [**log in**](/docs/tooling/command-line/installation#get-started) to your Appwrite account, and [**initialize**](/docs/tooling/command-line/installation#initialization) your Appwrite project. {% /info %} diff --git a/src/routes/docs/tooling/command-line/buckets/+page.markdoc b/src/routes/docs/tooling/command-line/buckets/+page.markdoc index 9c6b5269d2..7157baca8b 100644 --- a/src/routes/docs/tooling/command-line/buckets/+page.markdoc +++ b/src/routes/docs/tooling/command-line/buckets/+page.markdoc @@ -1,6 +1,6 @@ --- layout: article -title: Deploy buckets with CLI +title: Buckets description: Efficiently deploy your Appwrite buckets using the Command-Line Tool (CLI). --- diff --git a/src/routes/docs/tooling/command-line/collections/+page.markdoc b/src/routes/docs/tooling/command-line/collections/+page.markdoc index ce9346af2d..d7abe6fec1 100644 --- a/src/routes/docs/tooling/command-line/collections/+page.markdoc +++ b/src/routes/docs/tooling/command-line/collections/+page.markdoc @@ -1,6 +1,6 @@ --- layout: article -title: Deploy collections with CLI +title: Collections description: Efficiently deploy your Appwrite collections using the Command-Line Tool (CLI). --- diff --git a/src/routes/docs/tooling/command-line/functions/+page.markdoc b/src/routes/docs/tooling/command-line/functions/+page.markdoc index 01feeb9278..dbf3af6ffe 100644 --- a/src/routes/docs/tooling/command-line/functions/+page.markdoc +++ b/src/routes/docs/tooling/command-line/functions/+page.markdoc @@ -1,6 +1,6 @@ --- layout: article -title: Deploy functions with CLI +title: Functions description: Efficiently deploy your Appwrite functions using the Command-Line Tool (CLI). --- diff --git a/src/routes/docs/tooling/command-line/installation/+page.markdoc b/src/routes/docs/tooling/command-line/installation/+page.markdoc index a0d19b32e3..34bb910b4a 100644 --- a/src/routes/docs/tooling/command-line/installation/+page.markdoc +++ b/src/routes/docs/tooling/command-line/installation/+page.markdoc @@ -1,12 +1,12 @@ --- layout: article -title: Command line interface (CLI) +title: Installation description: Get started with the Appwrite CLI by following the installation guide. Learn how to set up and configure the CLI on your development environment. --- -The [Appwrite CLI](https://github.com/appwrite/sdk-for-cli) is a command-line application that allows you to interact with Appwrite to perform server-side tasks using your terminal. This includes creating and managing projects, managing resources (documents, files, users), creating and deploying Appwrite Functions, and other operations available through Appwrite's API. +The [Appwrite Command Line Interface (CLI)](https://github.com/appwrite/sdk-for-cli) is an application that allows you to interact with Appwrite to perform server-side tasks using your terminal. This includes creating and managing projects, managing resources (documents, files, users), creating and deploying Appwrite Functions, and other operations available through Appwrite's API. -# Installation {% #installation %} +# Getting started {% #getting-started %} The CLI is packaged both as an [npm module](https://www.npmjs.com/package/appwrite-cli) as well as a [standalone binary](https://github.com/appwrite/sdk-for-cli/releases/latest) for your operating system, making it completely dependency free, platform independent, and language agnostic. diff --git a/src/routes/docs/tooling/command-line/teams/+page.markdoc b/src/routes/docs/tooling/command-line/teams/+page.markdoc index b7a2785063..6bd55117d2 100644 --- a/src/routes/docs/tooling/command-line/teams/+page.markdoc +++ b/src/routes/docs/tooling/command-line/teams/+page.markdoc @@ -1,6 +1,6 @@ --- layout: article -title: Deploy teams with CLI +title: Teams description: Efficiently deploy your Appwrite teams using the Command-Line Tool (CLI). --- diff --git a/src/routes/docs/tooling/command-line/topics/+page.markdoc b/src/routes/docs/tooling/command-line/topics/+page.markdoc index 8cc258ecd9..0a0b73b8d1 100644 --- a/src/routes/docs/tooling/command-line/topics/+page.markdoc +++ b/src/routes/docs/tooling/command-line/topics/+page.markdoc @@ -1,6 +1,6 @@ --- layout: article -title: Deploy topics with CLI +title: Topics description: Efficiently deploy your Appwrite topics using the Command-Line Tool (CLI). --- From c6d391232ad42f908db516021b113192774c119a Mon Sep 17 00:00:00 2001 From: choir27 Date: Mon, 5 Aug 2024 15:20:06 -0400 Subject: [PATCH 64/66] docs: quick update to change Getting started section to login, and update IDs --- src/routes/docs/tooling/command-line/installation/+page.markdoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/routes/docs/tooling/command-line/installation/+page.markdoc b/src/routes/docs/tooling/command-line/installation/+page.markdoc index 34bb910b4a..24d9e29bb3 100644 --- a/src/routes/docs/tooling/command-line/installation/+page.markdoc +++ b/src/routes/docs/tooling/command-line/installation/+page.markdoc @@ -115,7 +115,7 @@ After the installation or the update is complete, you can verify the Appwrite CL appwrite -v ``` -# Get started {% #get-started %} +# Login {% #login %} Before you can use the CLI, you need to login to your Appwrite account using From ef267e2b68daca8d6eebfa047cdd8568414c3199 Mon Sep 17 00:00:00 2001 From: choir27 Date: Mon, 5 Aug 2024 15:30:44 -0400 Subject: [PATCH 65/66] docs: update url link in partial --- src/partials/cli-disclaimer.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/partials/cli-disclaimer.md b/src/partials/cli-disclaimer.md index 1892087fee..2afcac6365 100644 --- a/src/partials/cli-disclaimer.md +++ b/src/partials/cli-disclaimer.md @@ -1,3 +1,3 @@ {% info title="Before proceeding" %} -Ensure you [**install**](/docs/tooling/command-line/installation#getting-started) the CLI, [**log in**](/docs/tooling/command-line/installation#get-started) to your Appwrite account, and [**initialize**](/docs/tooling/command-line/installation#initialization) your Appwrite project. +Ensure you [**install**](/docs/tooling/command-line/installation#getting-started) the CLI, [**log in**](/docs/tooling/command-line/installation#getting-started) to your Appwrite account, and [**initialize**](/docs/tooling/command-line/installation#initialization) your Appwrite project. {% /info %} From 6888c8c26f305613411515ad0f486b06066b6de1 Mon Sep 17 00:00:00 2001 From: Richard <66279068+choir27@users.noreply.github.com> Date: Mon, 5 Aug 2024 15:46:57 -0400 Subject: [PATCH 66/66] Update src/partials/cli-disclaimer.md Co-authored-by: Steven Nguyen <1477010+stnguyen90@users.noreply.github.com> --- src/partials/cli-disclaimer.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/partials/cli-disclaimer.md b/src/partials/cli-disclaimer.md index 2afcac6365..bd45a5c284 100644 --- a/src/partials/cli-disclaimer.md +++ b/src/partials/cli-disclaimer.md @@ -1,3 +1,3 @@ {% info title="Before proceeding" %} -Ensure you [**install**](/docs/tooling/command-line/installation#getting-started) the CLI, [**log in**](/docs/tooling/command-line/installation#getting-started) to your Appwrite account, and [**initialize**](/docs/tooling/command-line/installation#initialization) your Appwrite project. +Ensure you [**install**](/docs/tooling/command-line/installation#getting-started) the CLI, [**log in**](/docs/tooling/command-line/installation#login) to your Appwrite account, and [**initialize**](/docs/tooling/command-line/installation#initialization) your Appwrite project. {% /info %}