← AppwriteCONTENT HISTORYWHAT CHANGED · RULE-BASED ANALYSIS
Update to Appwrite
Snapshot Sep 30, 2026 · 23:07 UTC · version 1.0.0
Collection source: not recorded for this historical snapshot.
First saved snapshot
No earlier snapshot is available to establish a change.
Compare saved observations
Download comparison JSONFull technical diff · 0 changed fields
Full snapshot data
{
"name": "appwrite-cli",
"description": "Appwrite CLI skill. Use when managing Appwrite projects from the command line. Covers installation, login, project initialization, multi-file project configuration, deploying functions/sites/tables/buckets/teams/webhooks/topics, flag-based list queries, non-interactive CI/CD mode, and generating type-safe SDKs.",
"included_files": [],
"skill_md_contents": "---\r\nname: appwrite-cli\r\ndescription: Appwrite CLI skill. Use when managing Appwrite projects from the command line. Covers installation, login, project initialization, multi-file project configuration, deploying functions/sites/tables/buckets/teams/webhooks/topics, flag-based list queries, non-interactive CI/CD mode, and generating type-safe SDKs.\r\n---\r\n\r\n\r\n# Appwrite CLI\r\n\r\n## Installation\r\n\r\n```bash\r\n# npm\r\nnpm install -g appwrite-cli\r\n\r\n# macOS (Homebrew native binary)\r\nbrew tap appwrite/appwrite\r\nbrew install appwrite/appwrite/appwrite\r\n\r\n# macOS / Linux (script)\r\ncurl -sL https://appwrite.io/cli/install.sh | bash\r\n\r\n# Windows (Scoop)\r\nscoop install https://raw.githubusercontent.com/appwrite/sdk-for-cli/master/scoop/appwrite.config.json\r\n```\r\n\r\nVerify installation:\r\n\r\n```bash\r\nappwrite -v\r\n```\r\n\r\n## Login & Initialization\r\n\r\n```bash\r\n# Login to your account\r\nappwrite login\r\n\r\n# Login to a self-hosted instance\r\nappwrite login --endpoint \"https://your-instance.com/v1\"\r\n\r\n# Switch to a different saved account\r\nappwrite login --switch\r\n\r\n# Initialize a project (creates appwrite.config.json)\r\nappwrite init project\r\n\r\n# Verify by fetching project info\r\nappwrite projects get --project-id \"<PROJECT_ID>\"\r\n```\r\n\r\n`appwrite whoami` can show `https://cloud.appwrite.io/v1` as the account login endpoint. That is expected for Appwrite Cloud login. Do not rewrite it to a regional endpoint. Only project configuration and project-scoped API calls use the region endpoint, such as `https://<REGION>.cloud.appwrite.io/v1`.\r\n\r\n## Configuration\r\n\r\n```bash\r\n# Switch endpoint/project for scripted use\r\nappwrite client --endpoint \"https://<REGION>.cloud.appwrite.io/v1\"\r\nappwrite client --project-id \"<PROJECT_ID>\"\r\n```\r\n\r\n> For the full list of CLI commands, see [CLI Commands](https://appwrite.io/docs/tooling/command-line/commands).\r\n> For headless / CI/CD usage, see [Non-Interactive Mode](https://appwrite.io/docs/tooling/command-line/non-interactive).\r\n\r\n## appwrite.config.json\r\n\r\nResources can be configured inline in `appwrite.config.json` or split into separate JSON array files using `includes`.\r\n\r\n```json\r\n{\r\n \"projectId\": \"<PROJECT_ID>\",\r\n \"projectName\": \"Production\",\r\n \"endpoint\": \"https://<REGION>.cloud.appwrite.io/v1\",\r\n \"includes\": {\r\n \"functions\": \"appwrite/functions.json\",\r\n \"sites\": \"appwrite/sites.json\",\r\n \"webhooks\": \"appwrite/webhooks.json\"\r\n },\r\n \"settings\": {\r\n \"services\": {\r\n \"account\": true,\r\n \"databases\": true,\r\n \"functions\": true,\r\n \"sites\": true,\r\n \"messaging\": true\r\n },\r\n \"protocols\": {\r\n \"rest\": true,\r\n \"graphql\": true,\r\n \"websocket\": true\r\n },\r\n \"auth\": {\r\n \"methods\": {\r\n \"email-password\": true,\r\n \"magic-url\": true\r\n },\r\n \"security\": {\r\n \"sessionsLimit\": 10,\r\n \"passwordDictionary\": true\r\n }\r\n }\r\n },\r\n \"tablesDB\": [],\r\n \"tables\": [],\r\n \"buckets\": [],\r\n \"teams\": [],\r\n \"topics\": []\r\n}\r\n```\r\n\r\nEach `includes` value must be a relative `.json` path inside the project directory and must point to a JSON array. A resource cannot be defined both inline and in `includes`. When functions or sites are included, their `path` values are resolved relative to the include file directory.\r\n\r\nExample `appwrite/functions.json`:\r\n\r\n```json\r\n[\r\n {\r\n \"$id\": \"<FUNCTION_ID>\",\r\n \"name\": \"userAuth\",\r\n \"enabled\": true,\r\n \"logging\": true,\r\n \"runtime\": \"node-22\",\r\n \"buildSpecification\": \"s-1vcpu-512mb\",\r\n \"runtimeSpecification\": \"s-1vcpu-512mb\",\r\n \"deploymentRetention\": 7,\r\n \"events\": [],\r\n \"schedule\": \"\",\r\n \"timeout\": 15,\r\n \"entrypoint\": \"src/main.js\",\r\n \"commands\": \"npm install\",\r\n \"ignore\": \"node_modules\\n.tmp\",\r\n \"path\": \"../functions/userAuth\"\r\n }\r\n]\r\n```\r\n\r\n### Pull and push project configuration\r\n\r\n```bash\r\n# Pull or push everything\r\nappwrite pull all --all\r\nappwrite push all --all\r\n\r\n# Pull or push individual resource groups\r\nappwrite pull settings\r\nappwrite push settings\r\nappwrite pull webhooks\r\nappwrite push webhooks\r\nappwrite pull functions\r\nappwrite push functions\r\n```\r\n\r\n## Deploying Functions\r\n\r\n```bash\r\n# Create a new function\r\nappwrite init functions\r\n\r\n# Pull existing functions from Console\r\nappwrite pull functions\r\n\r\n# Deploy functions\r\nappwrite push functions\r\n```\r\n\r\n### Function configuration in appwrite.config.json\r\n\r\n```json\r\n{\r\n \"functions\": [\r\n {\r\n \"$id\": \"<FUNCTION_ID>\",\r\n \"name\": \"userAuth\",\r\n \"enabled\": true,\r\n \"logging\": true,\r\n \"runtime\": \"node-22\",\r\n \"buildSpecification\": \"s-1vcpu-512mb\",\r\n \"runtimeSpecification\": \"s-1vcpu-512mb\",\r\n \"deploymentRetention\": 7,\r\n \"scopes\": [],\r\n \"events\": [],\r\n \"schedule\": \"\",\r\n \"timeout\": 15,\r\n \"entrypoint\": \"src/main.js\",\r\n \"commands\": \"npm install\",\r\n \"ignore\": \"node_modules\\n.tmp\",\r\n \"path\": \"functions/userAuth\"\r\n }\r\n ]\r\n}\r\n```\r\n\r\nKey function config fields:\r\n\r\n| Field | Description |\r\n|-------|-------------|\r\n| `enabled` | Enables or disables the function. Disabled functions cannot be executed. |\r\n| `logging` | Stores execution logs for debugging and observability. |\r\n| `runtime` | Runtime used to execute the function, such as `node-22`. |\r\n| `buildSpecification` | Compute specification used while building the deployment. |\r\n| `runtimeSpecification` | Compute specification used while running executions. |\r\n| `deploymentRetention` | Number of days to retain old deployments before they are automatically deleted. |\r\n| `scopes` | API scopes granted to the function's generated execution key. |\r\n| `events` | Event patterns that trigger the function. |\r\n| `schedule` | Cron expression for scheduled execution. Empty string disables scheduling. |\r\n| `timeout` | Maximum execution duration in seconds. |\r\n| `entrypoint` | File inside `path` that starts the function. |\r\n| `commands` | Build/install command run before deployment. |\r\n| `ignore` | Extra newline-separated ignore rules used when packaging code. `.gitignore` is read automatically. |\r\n| `path` | Local function source directory. If configured through `includes`, this is resolved relative to the include file. |\r\n\r\n### Function commands\r\n\r\n| Command | Description |\r\n|---------|-------------|\r\n| `appwrite functions list` | List all functions |\r\n| `appwrite functions create` | Create a new function |\r\n| `appwrite functions get --function-id <ID>` | Get a function by ID |\r\n| `appwrite functions update --function-id <ID>` | Update a function |\r\n| `appwrite functions delete --function-id <ID>` | Delete a function |\r\n| `appwrite functions list-runtimes` | List all active runtimes |\r\n| `appwrite functions list-deployments --function-id <ID>` | List deployments |\r\n| `appwrite functions create-deployment --function-id <ID>` | Upload a new deployment |\r\n| `appwrite functions update-deployment --function-id <ID> --deployment-id <ID>` | Set active deployment |\r\n| `appwrite functions delete-deployment --function-id <ID> --deployment-id <ID>` | Delete a deployment |\r\n| `appwrite functions download-deployment --function-id <ID> --deployment-id <ID>` | Download deployment |\r\n| `appwrite functions create-execution --function-id <ID>` | Trigger execution |\r\n| `appwrite functions list-executions --function-id <ID>` | List execution logs |\r\n| `appwrite functions get-execution --function-id <ID> --execution-id <ID>` | Get execution log |\r\n| `appwrite functions list-variables --function-id <ID>` | List variables |\r\n| `appwrite functions create-variable --function-id <ID> --key <KEY> --value <VALUE>` | Create variable |\r\n| `appwrite functions update-variable --function-id <ID> --variable-id <ID> --key <KEY> --value <VALUE>` | Update variable |\r\n| `appwrite functions delete-variable --function-id <ID> --variable-id <ID>` | Delete variable |\r\n\r\n### List functions with flag-based queries\r\n\r\nPrefer the query flags for common filtering, sorting, and pagination. Use `--queries` only for raw Appwrite JSON query strings or advanced automation.\r\n\r\n```bash\r\nappwrite functions list \\\r\n --where 'name=api' \\\r\n --sort-desc '$createdAt' \\\r\n --limit 10 \\\r\n --offset 0 \\\r\n --json\r\n\r\nappwrite functions list-deployments \\\r\n --function-id <FUNCTION_ID> \\\r\n --limit 5 \\\r\n --cursor-after <DEPLOYMENT_ID>\r\n```\r\n\r\n### Trigger a function with body\r\n\r\n```bash\r\nappwrite functions create-execution \\\r\n --function-id <FUNCTION_ID> \\\r\n --body '{\"key\": \"value\"}'\r\n```\r\n\r\n### Local development\r\n\r\n```bash\r\nappwrite run functions\r\n```\r\n\r\n### Deployment activation\r\n\r\n```bash\r\n# Deploy and activate the deployment\r\nappwrite push functions --function-id <FUNCTION_ID> --activate\r\n\r\n# Deploy without switching live traffic\r\nappwrite push functions --function-id <FUNCTION_ID> --activate=false\r\n```\r\n\r\n### Function variables\r\n\r\nDo not define function variables in `appwrite.config.json`. Put them in a `.env` file inside the configured function `path`. Variables are saved after they are pushed, so use `--with-variables` only when you want to create, replace, or remove the remote variables from the local `.env` file.\r\n\r\n```bash\r\n# functions/userAuth/.env\r\nPUBLIC_FLAG=enabled\r\nSECRET_TOKEN=replace-me\r\n\r\n# Sync function variables from .env\r\nappwrite push functions --function-id <FUNCTION_ID> --with-variables\r\n\r\n# Push code without changing saved variables\r\nappwrite push functions --function-id <FUNCTION_ID>\r\n\r\n# Run locally with variables fetched from function settings\r\nappwrite run functions --with-variables\r\n```\r\n\r\n## Deploying Sites\r\n\r\n```bash\r\n# Create a new site\r\nappwrite init sites\r\n\r\n# Pull existing sites from Console\r\nappwrite pull sites\r\n\r\n# Deploy sites\r\nappwrite push sites\r\n```\r\n\r\n### Site configuration in appwrite.config.json\r\n\r\n```json\r\n{\r\n \"sites\": [\r\n {\r\n \"$id\": \"<SITE_ID>\",\r\n \"name\": \"Documentation template\",\r\n \"logging\": true,\r\n \"framework\": \"astro\",\r\n \"timeout\": 30,\r\n \"installCommand\": \"npm install\",\r\n \"buildCommand\": \"npm run build\",\r\n \"outputDirectory\": \"./dist\",\r\n \"buildSpecification\": \"s-1vcpu-512mb\",\r\n \"runtimeSpecification\": \"s-1vcpu-512mb\",\r\n \"buildRuntime\": \"node-22\",\r\n \"adapter\": \"ssr\",\r\n \"fallbackFile\": \"\",\r\n \"startCommand\": \"npm run start\",\r\n \"deploymentRetention\": 7,\r\n \"path\": \"sites/documentation-template\"\r\n }\r\n ]\r\n}\r\n```\r\n\r\nKey site config fields:\r\n\r\n| Field | Description |\r\n|-------|-------------|\r\n| `logging` | Stores site request and build logs. |\r\n| `framework` | Framework preset used for build and deployment defaults. |\r\n| `timeout` | Maximum request or function duration in seconds for server-rendered sites. |\r\n| `installCommand` | Command used to install dependencies. |\r\n| `buildCommand` | Command used to build the site. |\r\n| `outputDirectory` | Directory containing static build output. |\r\n| `buildSpecification` | Compute specification used while building the deployment. |\r\n| `runtimeSpecification` | Compute specification used while serving runtime workloads. |\r\n| `buildRuntime` | Runtime used to build the site, such as `node-22`. |\r\n| `adapter` | Deployment adapter, such as static or SSR behavior. |\r\n| `fallbackFile` | Fallback file for SPA routing or missing routes. |\r\n| `startCommand` | Command used to start server-rendered output. |\r\n| `deploymentRetention` | Number of days to retain old deployments before they are automatically deleted. |\r\n| `path` | Local site source directory. If configured through `includes`, this is resolved relative to the include file. |\r\n\r\n### Site commands\r\n\r\n| Command | Description |\r\n|---------|-------------|\r\n| `appwrite sites list` | List all sites |\r\n| `appwrite sites create` | Create a new site |\r\n| `appwrite sites get --site-id <ID>` | Get a site by ID |\r\n| `appwrite sites update --site-id <ID>` | Update a site |\r\n| `appwrite sites delete --site-id <ID>` | Delete a site |\r\n| `appwrite sites list-frameworks` | List available frameworks |\r\n| `appwrite sites list-specifications` | List allowed specs |\r\n| `appwrite sites list-templates` | List available templates |\r\n| `appwrite sites get-template --template-id <ID>` | Get template details |\r\n| `appwrite sites list-deployments --site-id <ID>` | List deployments |\r\n| `appwrite sites create-deployment --site-id <ID>` | Create deployment |\r\n| `appwrite sites get-deployment --site-id <ID> --deployment-id <ID>` | Get deployment |\r\n| `appwrite sites delete-deployment --site-id <ID> --deployment-id <ID>` | Delete deployment |\r\n| `appwrite sites update-site-deployment --site-id <ID> --deployment-id <ID>` | Set active deployment |\r\n| `appwrite sites update-deployment-status --site-id <ID> --deployment-id <ID>` | Cancel ongoing build |\r\n| `appwrite sites list-variables --site-id <ID>` | List variables |\r\n| `appwrite sites create-variable --site-id <ID> --key <KEY> --value <VALUE>` | Create variable |\r\n| `appwrite sites update-variable --site-id <ID> --variable-id <ID> --key <KEY> --value <VALUE>` | Update variable |\r\n| `appwrite sites delete-variable --site-id <ID> --variable-id <ID>` | Delete variable |\r\n| `appwrite sites list-logs --site-id <ID>` | List request logs |\r\n| `appwrite sites get-log --site-id <ID> --log-id <ID>` | Get a log |\r\n| `appwrite sites delete-log --site-id <ID> --log-id <ID>` | Delete a log |\r\n\r\n### Site variables\r\n\r\nDo not define site variables in `appwrite.config.json`. Put them in a `.env` file inside the configured site `path`. Variables are saved after they are pushed, so use `--with-variables` only when you want to create, replace, or remove the remote variables from the local `.env` file.\r\n\r\n```bash\r\n# sites/documentation-template/.env\r\nPUBLIC_SITE_NAME=docs\r\n\r\nappwrite push sites --site-id <SITE_ID> --with-variables\r\n\r\n# Push code without changing saved variables\r\nappwrite push sites --site-id <SITE_ID>\r\n```\r\n\r\n## Managing Tables (Databases)\r\n\r\n```bash\r\n# Create a new table\r\nappwrite init tables\r\n\r\n# Pull existing tables from Console\r\nappwrite pull tables\r\n\r\n# Deploy tables\r\nappwrite push tables\r\n```\r\n\r\n### Table configuration in appwrite.config.json\r\n\r\n```json\r\n{\r\n \"tablesDB\": [\r\n {\r\n \"$id\": \"<DATABASE_ID>\",\r\n \"name\": \"songs\",\r\n \"enabled\": true\r\n }\r\n ],\r\n \"tables\": [\r\n {\r\n \"$id\": \"<TABLE_ID>\",\r\n \"$permissions\": [\"create(\\\"any\\\")\", \"read(\\\"any\\\")\"],\r\n \"databaseId\": \"<DATABASE_ID>\",\r\n \"name\": \"music\",\r\n \"enabled\": true,\r\n \"rowSecurity\": false,\r\n \"columns\": [\r\n {\r\n \"key\": \"title\",\r\n \"type\": \"varchar\",\r\n \"required\": true,\r\n \"size\": 255\r\n }\r\n ],\r\n \"indexes\": []\r\n }\r\n ]\r\n}\r\n```\r\n\r\n### Database commands (TablesDB)\r\n\r\n| Command | Description |\r\n|---------|-------------|\r\n| `appwrite tablesdb list-tables --database-id <ID>` | List tables |\r\n| `appwrite tablesdb create-table --database-id <ID>` | Create table |\r\n| `appwrite tablesdb get-table --database-id <ID> --table-id <ID>` | Get table |\r\n| `appwrite tablesdb update-table --database-id <ID> --table-id <ID>` | Update table |\r\n| `appwrite tablesdb delete-table --database-id <ID> --table-id <ID>` | Delete table |\r\n| `appwrite tablesdb list-columns --database-id <ID> --table-id <ID>` | List columns |\r\n| `appwrite tablesdb get-column --database-id <ID> --table-id <ID> --key <KEY>` | Get column |\r\n| `appwrite tablesdb delete-column --database-id <ID> --table-id <ID> --key <KEY>` | Delete column |\r\n| `appwrite tablesdb list-column-indexes --database-id <ID> --table-id <ID>` | List indexes |\r\n| `appwrite tablesdb create-column-index --database-id <ID> --table-id <ID>` | Create index |\r\n| `appwrite tablesdb delete-column-index --database-id <ID> --table-id <ID> --key <KEY>` | Delete index |\r\n\r\n### Column type commands\r\n\r\n> **Note:** The legacy `string` type is deprecated. Use explicit string column types instead.\r\n\r\n| Command | Description |\r\n|---------|-------------|\r\n| `create-varchar-column` | Varchar column — inline storage, fully indexable (max 16,383 chars, size ≤ 768 for full index) |\r\n| `create-text-column` | Text column — off-page storage, prefix index only (max 16,383 chars) |\r\n| `create-mediumtext-column` | Mediumtext column — off-page storage (max ~4M chars) |\r\n| `create-longtext-column` | Longtext column — off-page storage (max ~1B chars) |\r\n| `create-boolean-column` | Boolean column |\r\n| `create-integer-column` | Integer column (optional min/max) |\r\n| `create-float-column` | Float column (optional min/max) |\r\n| `create-email-column` | Email column |\r\n| `create-url-column` | URL column |\r\n| `create-ip-column` | IP address column |\r\n| `create-datetime-column` | Datetime column (ISO 8601) |\r\n| `create-enum-column` | Enum column (whitelist of accepted values) |\r\n| `create-relationship-column` | Relationship column |\r\n\r\nAll column commands use `appwrite tablesdb <command> --database-id <ID> --table-id <ID>`.\r\n\r\n### Row operations\r\n\r\n```bash\r\n# Create a row\r\nappwrite tablesdb create-row \\\r\n --database-id \"<DATABASE_ID>\" --table-id \"<TABLE_ID>\" \\\r\n --row-id 'unique()' --data '{ \"title\": \"Hello World\" }' \\\r\n --permissions 'read(\"any\")' 'write(\"team:abc\")'\r\n\r\n# List rows (JSON output)\r\nappwrite tablesdb list-rows \\\r\n --database-id \"<DATABASE_ID>\" --table-id \"<TABLE_ID>\" --json\r\n\r\n# Get a row\r\nappwrite tablesdb get-row \\\r\n --database-id \"<DATABASE_ID>\" --table-id \"<TABLE_ID>\" --row-id \"<ROW_ID>\"\r\n```\r\n\r\n### List rows and documents with query flags\r\n\r\nUse `--where`, `--sort-asc`, `--sort-desc`, `--limit`, `--offset`, `--cursor-after`, and `--cursor-before` on list commands. Row and document list/get commands also support repeated `--select` flags.\r\n\r\n```bash\r\nappwrite tablesdb list-rows \\\r\n --database-id \"<DATABASE_ID>\" \\\r\n --table-id \"<TABLE_ID>\" \\\r\n --where 'status=active' \\\r\n --where 'score>=10' \\\r\n --sort-asc 'name' \\\r\n --select '$id' \\\r\n --select 'name' \\\r\n --limit 25 \\\r\n --json\r\n\r\nappwrite databases list-documents \\\r\n --database-id \"<DATABASE_ID>\" \\\r\n --collection-id \"<COLLECTION_ID>\" \\\r\n --where 'email!=null' \\\r\n --cursor-before \"<DOCUMENT_ID>\"\r\n```\r\n\r\n`--where` parses strings, numbers, booleans, `null`, and JSON arrays. Supported operators are `=`, `!=`, `>`, `>=`, `<`, and `<=`.\r\n\r\n## Managing Buckets (Storage)\r\n\r\n```bash\r\n# Create a new bucket\r\nappwrite init buckets\r\n\r\n# Pull existing buckets from Console\r\nappwrite pull buckets\r\n\r\n# Deploy buckets\r\nappwrite push buckets\r\n```\r\n\r\n### Storage commands\r\n\r\n| Command | Description |\r\n|---------|-------------|\r\n| `appwrite storage list-buckets` | List all buckets |\r\n| `appwrite storage create-bucket` | Create a bucket |\r\n| `appwrite storage get-bucket --bucket-id <ID>` | Get a bucket |\r\n| `appwrite storage update-bucket --bucket-id <ID>` | Update a bucket |\r\n| `appwrite storage delete-bucket --bucket-id <ID>` | Delete a bucket |\r\n| `appwrite storage list-files --bucket-id <ID>` | List files |\r\n| `appwrite storage create-file --bucket-id <ID>` | Upload a file |\r\n| `appwrite storage get-file --bucket-id <ID> --file-id <ID>` | Get file metadata |\r\n| `appwrite storage delete-file --bucket-id <ID> --file-id <ID>` | Delete a file |\r\n| `appwrite storage get-file-download --bucket-id <ID> --file-id <ID>` | Download a file |\r\n| `appwrite storage get-file-preview --bucket-id <ID> --file-id <ID>` | Get image preview |\r\n| `appwrite storage get-file-view --bucket-id <ID> --file-id <ID>` | View file in browser |\r\n\r\n## Managing Teams\r\n\r\n```bash\r\n# Create a new team\r\nappwrite init teams\r\n\r\n# Pull existing teams from Console\r\nappwrite pull teams\r\n\r\n# Deploy teams\r\nappwrite push teams\r\n```\r\n\r\n### Team commands\r\n\r\n| Command | Description |\r\n|---------|-------------|\r\n| `appwrite teams list` | List all teams |\r\n| `appwrite teams create` | Create a team |\r\n| `appwrite teams get --team-id <ID>` | Get a team |\r\n| `appwrite teams update-name --team-id <ID>` | Update team name |\r\n| `appwrite teams delete --team-id <ID>` | Delete a team |\r\n| `appwrite teams list-memberships --team-id <ID>` | List members |\r\n| `appwrite teams create-membership --team-id <ID>` | Invite a member |\r\n| `appwrite teams update-membership --team-id <ID> --membership-id <ID>` | Update member roles |\r\n| `appwrite teams delete-membership --team-id <ID> --membership-id <ID>` | Remove a member |\r\n| `appwrite teams get-prefs --team-id <ID>` | Get team preferences |\r\n| `appwrite teams update-prefs --team-id <ID>` | Update team preferences |\r\n\r\n## Managing Webhooks\r\n\r\n```bash\r\n# Pull existing webhooks from Console\r\nappwrite pull webhooks\r\n\r\n# Deploy configured webhooks\r\nappwrite push webhooks\r\n```\r\n\r\n### Webhook configuration in `appwrite/webhooks.json`\r\n\r\n```json\r\n[\r\n {\r\n \"$id\": \"<WEBHOOK_ID>\",\r\n \"name\": \"Deploy events\",\r\n \"url\": \"https://example.com/appwrite/webhook\",\r\n \"events\": [\"functions.*.deployments.*.create\"],\r\n \"enabled\": true,\r\n \"tls\": true\r\n }\r\n]\r\n```\r\n\r\n### Webhook commands\r\n\r\n| Command | Description |\r\n|---------|-------------|\r\n| `appwrite webhooks list` | List webhooks |\r\n| `appwrite webhooks create` | Create a webhook |\r\n| `appwrite webhooks get --webhook-id <ID>` | Get a webhook |\r\n| `appwrite webhooks update --webhook-id <ID>` | Update a webhook |\r\n| `appwrite webhooks delete --webhook-id <ID>` | Delete a webhook |\r\n\r\n## Managing Topics (Messaging)\r\n\r\n```bash\r\n# Create a new topic\r\nappwrite init topics\r\n\r\n# Pull existing topics from Console\r\nappwrite pull topics\r\n\r\n# Deploy topics\r\nappwrite push topics\r\n```\r\n\r\n### Messaging commands\r\n\r\n| Command | Description |\r\n|---------|-------------|\r\n| `appwrite messaging list-messages` | List all messages |\r\n| `appwrite messaging create-email` | Create email message |\r\n| `appwrite messaging create-push` | Create push notification |\r\n| `appwrite messaging create-sms` | Create SMS message |\r\n| `appwrite messaging get-message --message-id <ID>` | Get a message |\r\n| `appwrite messaging delete --message-id <ID>` | Delete a message |\r\n| `appwrite messaging list-topics` | List all topics |\r\n| `appwrite messaging create-topic` | Create a topic |\r\n| `appwrite messaging get-topic --topic-id <ID>` | Get a topic |\r\n| `appwrite messaging update-topic --topic-id <ID>` | Update a topic |\r\n| `appwrite messaging delete-topic --topic-id <ID>` | Delete a topic |\r\n| `appwrite messaging list-subscribers --topic-id <ID>` | List subscribers |\r\n| `appwrite messaging create-subscriber --topic-id <ID>` | Add subscriber |\r\n| `appwrite messaging delete-subscriber --topic-id <ID> --subscriber-id <ID>` | Remove subscriber |\r\n\r\n## User Management\r\n\r\n```bash\r\n# Create a user\r\nappwrite users create --user-id \"unique()\" \\\r\n --email hello@appwrite.io\r\n\r\n# List users\r\nappwrite users list\r\n\r\n# Get a user\r\nappwrite users get --user-id \"<USER_ID>\"\r\n\r\n# Delete a user\r\nappwrite users delete --user-id \"<USER_ID>\"\r\n```\r\n\r\n## Project Management\r\n\r\nProject-level commands use the singular `project` service for current-project operations that do not need `--project-id`.\r\n\r\n```bash\r\n# Project settings and policies\r\nappwrite project update-service --service-id functions --enabled true\r\nappwrite project update-protocol --protocol-id rest --enabled true\r\nappwrite project list-policies\r\nappwrite project get-policy --policy-id \"<POLICY_ID>\"\r\n\r\n# OAuth2 providers\r\nappwrite project list-o-auth-2-providers\r\nappwrite project get-o-auth-2-provider --provider github\r\nappwrite project update-o-auth-2-git-hub --enabled true\r\n\r\n# Mock phones and short-lived API keys\r\nappwrite project create-mock-phone --phone \"+12025550123\" --otp \"123456\"\r\nappwrite project list-mock-phones\r\nappwrite project create-ephemeral-key\r\n```\r\n\r\n## Generate Type-Safe SDK\r\n\r\n```bash\r\n# Auto-detect language and generate\r\nappwrite generate\r\n\r\n# Specify output directory\r\nappwrite generate --output ./src/generated\r\n\r\n# Specify language\r\nappwrite generate --language typescript\r\n\r\n# Override generated import settings\r\nappwrite generate --appwrite-import-source node-appwrite --import-extension .js\r\n```\r\n\r\nGenerated files:\r\n\r\n| File | Description |\r\n|------|-------------|\r\n| `types.ts` | Type definitions from your database schema |\r\n| `databases.ts` | Typed database helpers for querying and mutating rows |\r\n| `constants.ts` | Configuration constants (endpoint, project ID) |\r\n| `index.ts` | Entry point that exports all helpers |\r\n\r\nUsage:\r\n\r\n```typescript\r\nimport { databases } from \"./generated/appwrite\";\r\n\r\nconst customers = databases.use(\"main\").use(\"customers\");\r\n\r\n// Create\r\nconst customer = await customers.create({\r\n name: \"Walter O' Brian\",\r\n email: \"walter@example.com\"\r\n});\r\n\r\n// List with typed queries\r\nconst results = await customers.list({\r\n queries: (q) => [\r\n q.equal(\"name\", \"Walter O' Brian\"),\r\n q.orderDesc(\"$createdAt\"),\r\n q.limit(10)\r\n ]\r\n});\r\n\r\n// Update\r\nawait customers.update(\"customer-id-123\", {\r\n email: \"walter@scorpion.com\"\r\n});\r\n\r\n// Delete\r\nawait customers.delete(\"customer-id-123\");\r\n\r\n// Bulk create\r\nawait customers.createMany([\r\n { name: \"Walter O' Brian\", email: \"walter@example.com\" },\r\n { name: \"Paige Dineen\", email: \"paige@example.com\" }\r\n]);\r\n```\r\n\r\n## Non-Interactive / CI/CD Mode\r\n\r\nFor headless automation, see the [Non-Interactive Mode docs](https://appwrite.io/docs/tooling/command-line/non-interactive).\r\n\r\n### Deploy non-interactively\r\n\r\n```bash\r\n# Push everything\r\nappwrite push all --all --force\r\n\r\n# Push specific resources\r\nappwrite push functions --all --force\r\nappwrite push functions --function-id <FUNCTION_ID> --force\r\nappwrite push sites --all --force\r\nappwrite push tables --all --force\r\nappwrite push teams --all --force\r\nappwrite push buckets --all --force\r\nappwrite push webhooks --all --force\r\nappwrite push topics --all --force\r\n```\r\n\r\n## Global Command Options\r\n\r\n| Option | Description |\r\n|--------|-------------|\r\n| `-v, --version` | Output version number |\r\n| `-V, --verbose` | Show complete error log |\r\n| `-j, --json` | Output in JSON format |\r\n| `-f, --force` | Confirm all warnings |\r\n| `-a, --all` | Select all resources |\r\n| `--id [id...]` | Pass a list of IDs |\r\n| `--report` | Generate GitHub error report link |\r\n| `--console` | Get direct link to Console |\r\n| `--open` | Open Console link in browser |\r\n| `-h, --help` | Display help |\r\n\r\n## Maintenance Commands\r\n\r\n```bash\r\n# Update CLI using the detected install method\r\nappwrite update\r\n\r\n# Show manual update instructions\r\nappwrite update --manual\r\n\r\n# Install shell completions\r\nappwrite completion install\r\n```\r\n\r\n## Examples\r\n\r\n```bash\r\n# List users with JSON output\r\nappwrite users list --json\r\n\r\n# Get verbose error output\r\nappwrite users list --verbose\r\n\r\n# View a row in the Console\r\nappwrite tablesdb get-row \\\r\n --database-id \"<DATABASE_ID>\" \\\r\n --table-id \"<TABLE_ID>\" \\\r\n --row-id \"<ROW_ID>\" \\\r\n --console --open\r\n\r\n# Generate error report\r\nappwrite login --report\r\n```\r\n"
}SHA-256: 1e6570ed8553a77b7a09d9945dbc6604740560946b132fe137604f49c5b371f3