We're having lots of fun on Discord! Come and join us! 💬
Docs

CI Mode

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 CI server.

CI Mode

You can enable CI mode for the Appwrite CLI by setting the project ID, endpoint, and API Key:

appwrite client \
    --endpoint https://[HOSTNAME_OR_IP]/v1 \
    --projectId [YOUR_PROJECT_ID] \
    --key YOUR_API_KEY

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.

In this mode, the CLI can only interact with one project at a time.

API Keys

In CI 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.

Non-interactive Deployment

Appwrite's deploy commands can also be executed in a non-interactive mode. This applies to both function and collection deployment.

You can deploy a function non-interactively by using the --yes option to skip all warnings and specifying which functions you want to deploy.

Deploy a single function by ID:

appwrite deploy function --functionId [FUNCTION ID] --yes

Deploy all functions:

appwrite deploy function --all --yes

You can deploy collections and teams non-interactively in a similar way by using the --yes option.

Deploy all collections:

appwrite deploy collection --all --yes

Deploy all teams:

appwrite deploy team --all --yes