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 update cli 2.0 #1250

Open
wants to merge 28 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
22d8169
docs: add section to talk about running tests in non-interactive mode
choir241 Aug 21, 2024
c1a548a
docs: remove placeholder title heading and add cli example for login …
choir241 Aug 21, 2024
7a5f58a
docs: tentavely remove github actions example. Add note for api keys …
choir241 Aug 21, 2024
f18334c
remove extra space
choir241 Aug 21, 2024
dc3fe80
add missing punctuation
choir241 Aug 21, 2024
dd6720a
add Appwrite for more clarity.
choir241 Aug 21, 2024
6bdbcac
update wording for better flow
choir241 Aug 21, 2024
08cc972
Merge branch 'main' into docs-update-cli-2.0
choir241 Aug 23, 2024
b403b12
add transition sentence from paragraph to API keys section
choir241 Aug 23, 2024
681a788
Merge branch 'main' into docs-update-cli-2.0
choir241 Aug 23, 2024
2b79622
Merge branch 'main' into docs-update-cli-2.0
choir241 Aug 24, 2024
61fdb3d
Merge branch 'main' into docs-update-cli-2.0
choir241 Aug 24, 2024
1b4e3b5
Merge branch 'main' into docs-update-cli-2.0
choir241 Aug 27, 2024
c3a0729
Update src/routes/docs/tooling/command-line/installation/+page.markdoc
choir241 Aug 27, 2024
cf14cbf
Update src/routes/docs/tooling/command-line/non-interactive/+page.mar…
choir241 Aug 27, 2024
2591273
add authentication section with intro section for sub-sections. Add s…
choir241 Aug 27, 2024
db688dd
Merge branch 'main' into docs-update-cli-2.0
choir241 Aug 27, 2024
6c3e556
Merge branch 'main' into docs-update-cli-2.0
choir241 Aug 28, 2024
7bfdb03
remove whole introduction and reword for better structure/concise nature
choir241 Aug 28, 2024
edaa8be
Merge branch 'main' into docs-update-cli-2.0
choir241 Aug 29, 2024
9b69872
update API keys to singular for accuracy. Change link to arrow link.
choir241 Aug 29, 2024
1f5af17
Merge branch 'main' into docs-update-cli-2.0
choir241 Aug 30, 2024
c10089c
remove your users for accuracy. undo delete of API key method text co…
choir241 Aug 30, 2024
537d3ad
Merge branch 'main' into docs-update-cli-2.0
choir241 Sep 3, 2024
0e6a144
Update src/routes/docs/tooling/command-line/non-interactive/+page.mar…
choir241 Sep 3, 2024
1507a0f
remove headless for cli accuracy. Update sentence strcture for better…
choir241 Sep 3, 2024
309ee2f
Merge: merge with suggested changes
choir241 Sep 3, 2024
472e4c6
remove headless for cli accuracy since cli is implicitly always headless
choir241 Sep 3, 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: 4 additions & 0 deletions src/routes/docs/products/functions/executions/+page.markdoc
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ Each time an Appwrite Function runs, an **execution** is created.
Each execution has a unique ID. If [you enable execution logs](/docs/products/functions/functions#execution-logs) in your function,
you can find function executions logged in the **Executions** tab.

# Synchronous executions {% #synchronous-executions %}

# Asynchronous executions {% #asynchronous-executions %}

# Execution table {% #execution-table %}

In your function's **Executions** tab, you will see a table of your recent executions.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,10 +146,10 @@ 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.
You can run your first CLI command after logging in. Try fetching the users from your Appwrite project.

```sh
appwrite projects get --project-id "<PROJECT_ID>"
appwrite users list --json
```

{% info title="Self-signed certificates" %}
Expand Down
33 changes: 24 additions & 9 deletions src/routes/docs/tooling/command-line/non-interactive/+page.markdoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,36 @@ layout: article
title: Non-interactive
description: Deploy changes to Appwrite projects to migrate databases and collections schema, functions, teams, buckets, and more.
---
The Appwrite CLI can be used in a non-interactive and headless manner, without saving configuration or sessions. This is especially useful when you want to automate tasks on a continuous integration server. You can enable the non-interactive mode for the Appwrite CLI by setting the `project ID`, `endpoint`, and `API Key`:

The [Appwrite CLI](/docs/tooling/command-line/installation) can be used in a non-interactive manner. This is especially useful when you want to automate tasks on a continuous integration server.

# Authentication {% #authentication %}

In non-interactive mode, you can authenticate using two methods: email and password or API keys. While using an [API key](/docs/advanced/platform/api-keys) does not require an email and password to authenticate, the API key needs to have its [scopes](/docs/advanced/platform/api-keys#scopes) configured. The API key does not work for administrative operations like changing organization billing, deleting projects, or creating a new project.

## Email and password {% #email-and-password %}

Use `appwrite login` with your email and password to log in.

```sh
appwrite client \
--endpoint https://cloud.appwrite.io/v1 \
--project-id [YOUR_PROJECT_ID] \
--key YOUR_API_KEY
appwrite login --email "<EMAIL>" --password "<PASSWORD>"
```

When you set the global configuration parameters using the `appwrite client` command, they take precedence over the local configuration parameters in your `appwrite.json` thereby switching the CLI to non-interactive mode.
## API Key {% #api-key %}

In this mode, the CLI can only interact with one project at a time.
{% info title="Using API key with CLI" %}
Some CLI commands won't work with an API key, like the `projects` commands.
{% /info %}

stnguyen90 marked this conversation as resolved.
Show resolved Hide resolved
In non-interactive mode, the CLI also uses an API key to authenticate. Your API key must have sufficient permissions to execute the commands you plan to use.

```sh
appwrite client --project-id "<PROJECT_ID>" --key "<API_KEY>"
```

# 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).
{% arrow_link href="/docs/advanced/platform/api-keys" %}
Learn more about API Keys
{% /arrow_link %}

# 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.
Expand Down
Loading