Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs cli 2.0 #1079

Merged
merged 70 commits into from
Aug 5, 2024
Merged
Show file tree
Hide file tree
Changes from 32 commits
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
581e850
docs: document all appwrite command-line commands and params
choir241 Jun 24, 2024
1f7002f
docs: add reminder for correct CLI version and link
choir241 Jun 24, 2024
f2fbc78
docs: add deploy collections with overview, init, pull, push and comm…
choir241 Jun 24, 2024
4eee250
docs: add overview collection paragraph, update word choice and sente…
choir241 Jun 25, 2024
5447c05
docs: deploy database using CLI 2.0 with overview, init, login, pull,…
choir241 Jun 25, 2024
62deb67
docs: add commands for authentication CLI 2.0
choir241 Jun 25, 2024
d9fa43e
docs: update commands for auth CLI 2.0
choir241 Jun 25, 2024
17d554f
docs: add create, login, get current account, and logout for CLI auth…
choir241 Jun 26, 2024
6f758e3
add functions page for CLI with push, pull and init, and remove authe…
choir241 Jun 26, 2024
71b185a
add teams page for CLI with push, pull and init, and remove authentic…
choir241 Jun 26, 2024
cdd8abf
remove commands outside of command table that are not push, pull or init
choir241 Jun 26, 2024
410486b
docs: add command table to buckets page
choir241 Jun 26, 2024
f6c0e50
add topics CLI page and update commands table to use code syntax
choir241 Jun 27, 2024
f541230
docs: add project docs and update side bar navigation
choir241 Jun 27, 2024
f34a68d
docs: delete deployment page to remove redundancy from deployment doc…
choir241 Jun 28, 2024
5cf3f9f
docs: update non-interactive page with github actions
choir241 Jun 28, 2024
fb29220
docs: add table of CLI option commands to commands page
choir241 Jun 28, 2024
4c8d3ee
docs: add CLI links to collections, functions, topics, buckets, and t…
choir241 Jun 28, 2024
3079558
chore: delete appwrite.json file
choir241 Jun 28, 2024
12af27c
docs: add clarification on previous version of CLI compatability, rem…
choir241 Jun 28, 2024
f64620b
move appwrite.json after pull, move init project appwrite.json to ins…
choir241 Jun 28, 2024
69fb895
docs: udpate appwrite.json content and placement for buckets, teams a…
choir241 Jul 1, 2024
2059a99
remove CLI link from functions/deployment to reduce redundancy from f…
choir241 Jul 1, 2024
8bf2ab6
docs: expand on detail for CLI links from services
choir241 Jul 1, 2024
fb41640
docs: update href links
choir241 Jul 1, 2024
31a2048
docs: update overview word choice and sentence structure
choir241 Jul 1, 2024
a214bca
docs: update overview word choice and sentence structure
choir241 Jul 2, 2024
91692f5
docs: remove 2.0 from CLI, reword introduction so the word here is no…
choir241 Jul 2, 2024
e9fe993
docs: update CLI code snippet syntax highlighting for consistency. Mo…
choir241 Jul 3, 2024
bc5f28a
docs: add init sections, remove projects cli docs, apply some changes…
choir241 Jul 3, 2024
be7b04a
docs: remove two spaces, update word choice for overwrite warning and…
choir241 Jul 3, 2024
1f3c302
docs: update overview for CLI docs to include disclaimer for install/…
choir241 Jul 3, 2024
9d8387e
Update src/routes/docs/products/auth/teams/+page.markdoc
choir241 Jul 5, 2024
cf666f5
Update src/routes/docs/products/functions/functions/+page.markdoc
choir241 Jul 5, 2024
9572abd
Update src/routes/docs/tooling/command-line/installation/+page.markdoc
choir241 Jul 5, 2024
3581a76
Update src/routes/docs/tooling/command-line/commands/+page.markdoc
choir241 Jul 5, 2024
ac55a0b
Update src/routes/docs/tooling/command-line/commands/+page.markdoc
choir241 Jul 5, 2024
6e1aea0
Update src/routes/docs/tooling/command-line/commands/+page.markdoc
choir241 Jul 5, 2024
4fb6543
Update src/routes/docs/tooling/command-line/commands/+page.markdoc
choir241 Jul 5, 2024
bb6cc0c
docs: move comma outside of code syntax appwrite.json, start working …
choir241 Jul 5, 2024
cf66cca
Update src/routes/docs/tooling/command-line/topics/+page.markdoc
choir241 Jul 5, 2024
5aed0b0
Update src/routes/docs/tooling/command-line/buckets/+page.markdoc
choir241 Jul 5, 2024
ca9ad30
Update src/routes/docs/tooling/command-line/buckets/+page.markdoc
choir241 Jul 5, 2024
1e8e5ef
Update src/routes/docs/tooling/command-line/buckets/+page.markdoc
choir241 Jul 5, 2024
772c661
Update src/routes/docs/tooling/command-line/topics/+page.markdoc
choir241 Jul 5, 2024
7302602
docs: update CLI sections in product/service docs to transition bette…
choir241 Jul 6, 2024
486d81c
docs: create partial for duplicate content in CLI docs, update cli co…
choir241 Jul 6, 2024
862b81c
docs: create partials for duplicate code, update word choices and sen…
choir241 Jul 6, 2024
92bb19d
docs: remove table for non-interactive table for paragraph, update wo…
choir241 Jul 6, 2024
2bd848f
docs: Add uninstall scoop commands
choir241 Jul 8, 2024
20957e2
Merge branch '1.6.x' into docs-CLI-2.0
choir241 Jul 8, 2024
7175db6
docs: add redirect url to install cli docs from cli version disclaime…
choir241 Jul 8, 2024
ae2d334
docs: update wording
choir241 Jul 8, 2024
4cdb6c6
docs: update word choice and sentence structure
choir241 Jul 19, 2024
55a9cb3
docs: update word choice and sentence structure for a better user jou…
choir241 Jul 20, 2024
63ea6c7
Update src/routes/docs/tooling/command-line/installation/+page.markdoc
choir241 Jul 25, 2024
1cc5cbe
Update src/routes/docs/products/functions/functions/+page.markdoc
choir241 Jul 25, 2024
0d4ec75
docs: Move collections, buckets, and topics using with CLI sections t…
choir241 Jul 25, 2024
6f0cd94
docs: Create partial for duplicate content for function CLI section. …
choir241 Jul 26, 2024
ae4bd7c
Merge branch '1.6.x' into docs-CLI-2.0
choir241 Jul 26, 2024
7c67773
update appwrite.json placeholder variables with <> and quotes
choir241 Jul 26, 2024
e891621
docs: quick fix to lowercase given IDs
choir241 Aug 5, 2024
48cee9d
docs: quick fix to update links for /docs/tooling/command-line/instal…
choir241 Aug 5, 2024
36499cf
Merge branch '1.6.x' into docs-CLI-2.0
choir241 Aug 5, 2024
7464121
Update src/routes/docs/tooling/command-line/teams/+page.markdoc
choir241 Aug 5, 2024
9a21976
docs: Change Command line interface (CLI) to Installation and update …
choir241 Aug 5, 2024
4ab8597
Merge branch 'docs-CLI-2.0' of https://github.com/appwrite/website in…
choir241 Aug 5, 2024
c6d3912
docs: quick update to change Getting started section to login, and up…
choir241 Aug 5, 2024
ef267e2
docs: update url link in partial
choir241 Aug 5, 2024
6888c8c
Update src/partials/cli-disclaimer.md
choir241 Aug 5, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions src/redirects.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
29 changes: 29 additions & 0 deletions src/routes/docs/products/auth/teams/+page.markdoc
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,35 @@ val response = teams.createMembership(

{% /multicode %}

# 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.
choir241 marked this conversation as resolved.
Show resolved Hide resolved
{% /info %}

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
{% /arrow_link %}

Copy link
Contributor

Choose a reason for hiding this comment

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

@eldadfux, I'm concerned about having all this content here as it's a lot of duplicate content. How about a small paragraph that mentions the CLI and then links to the relevant page?

# Permissions {% #permissions %}

You can grant permissions to all members of a team using the `Role.team(<TEAM_ID>)` role or
Expand Down
28 changes: 28 additions & 0 deletions src/routes/docs/products/databases/collections/+page.markdoc
Original file line number Diff line number Diff line change
Expand Up @@ -274,3 +274,31 @@ 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 %}

{% 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
```
stnguyen90 marked this conversation as resolved.
Show resolved Hide resolved

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 %}
25 changes: 17 additions & 8 deletions src/routes/docs/products/functions/deploy-manually/+page.markdoc
Original file line number Diff line number Diff line change
Expand Up @@ -16,28 +16,37 @@ 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`.
Use the `appwrite init function` method to create a starter function, then paste in your function code.
Your function must be added to `appwrite.json` to deploy with the Appwrite CLI.
You can pull an existing function:

```bash
```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:

```bash
appwrite deploy function
```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.
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.
stnguyen90 marked this conversation as resolved.
Show resolved Hide resolved

## 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.

{% arrow_link href="/docs/tooling/command-line/deployment#function-options" %}
{% arrow_link href="/docs/tooling/command-line/functions#appwritejson" %}
Learn more about appwrite.json
{% /arrow_link %}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +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.
Redeployment behavior varies depending on how the initial deployment was created.
21 changes: 14 additions & 7 deletions src/routes/docs/products/functions/functions/+page.markdoc
Original file line number Diff line number Diff line change
Expand Up @@ -66,21 +66,28 @@ 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.
Use the `appwrite init function` method to create a starter function, then paste in your function code.
Your function must be added to `appwrite.json` to deploy with the Appwrite CLI.

```bash
You can pull an existing function:
choir241 marked this conversation as resolved.
Show resolved Hide resolved

```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
choir241 marked this conversation as resolved.
Show resolved Hide resolved
```
{% /tabsitem %}
{% /tabs %}
Expand Down
30 changes: 30 additions & 0 deletions src/routes/docs/products/messaging/topics/+page.markdoc
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,36 @@ let topic = try await messaging.createTopic(
{% /tabsitem %}
{% /tabs %}

# 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 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.

{% arrow_link href="/docs/tooling/command-line/topics#appwritejson" %}
Learn more about appwrite.json
{% /arrow_link %}


stnguyen90 marked this conversation as resolved.
Show resolved Hide resolved
# 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**.
Expand Down
32 changes: 31 additions & 1 deletion src/routes/docs/products/storage/buckets/+page.markdoc
Original file line number Diff line number Diff line change
Expand Up @@ -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).
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.
stnguyen90 marked this conversation as resolved.
Show resolved Hide resolved

# 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:

```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 %}

## 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" %}
Learn more about appwrite.json
{% /arrow_link %}
stnguyen90 marked this conversation as resolved.
Show resolved Hide resolved


{% tabs %}
{% tabsitem #console title="Console" %}
Expand Down
29 changes: 25 additions & 4 deletions src/routes/docs/tooling/command-line/+layout.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,36 @@
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'
}
]
},
{
label: 'Deployments',
items: [
{
label: 'Collections',
href: '/docs/tooling/command-line/collections'
},
{
label: 'Functions',
href: '/docs/tooling/command-line/functions'
},
{
label: 'Teams',
href: '/docs/tooling/command-line/teams'
},
{
label: 'Topics',
href: '/docs/tooling/command-line/topics'
},
{
label: 'Buckets',
href: '/docs/tooling/command-line/buckets'
}
]
}
];
</script>
Expand Down
Loading
Loading