appwrite-cli

Appwrite CLI skill. Use when managing Appwrite projects from the command line. Covers installation, login, project initialization, multi-file project…

INSTALLATION
npx skills add https://github.com/appwrite/agent-skills --skill appwrite-cli
Run in your project or agent environment. Adjust flags if your CLI version differs.

SKILL.md

Appwrite CLI

Installation

# npm

npm install -g appwrite-cli

# macOS (Homebrew native binary)

brew tap appwrite/appwrite

brew install appwrite/appwrite/appwrite

# macOS / Linux (script)

curl -sL https://appwrite.io/cli/install.sh | bash

# Windows (Scoop)

scoop install https://raw.githubusercontent.com/appwrite/sdk-for-cli/master/scoop/appwrite.config.json

Verify installation:

appwrite -v

Login & Initialization

# Login to your account

appwrite login

# Login to a self-hosted instance

appwrite login --endpoint "https://your-instance.com/v1"

# Switch to a different saved account

appwrite login --switch

# Initialize a project (creates appwrite.config.json)

appwrite init project

# Verify by fetching project info

appwrite projects get --project-id "<PROJECT_ID>"

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.

Configuration

# Switch endpoint/project for scripted use

appwrite client --endpoint "https://<REGION>.cloud.appwrite.io/v1"

appwrite client --project-id "<PROJECT_ID>"

For the full list of CLI commands, see CLI Commands.

For headless / CI/CD usage, see Non-Interactive Mode.

appwrite.config.json

Resources can be configured inline in appwrite.config.json or split into separate JSON array files using includes.

{

    "projectId": "<PROJECT_ID>",

    "projectName": "Production",

    "endpoint": "https://<REGION>.cloud.appwrite.io/v1",

    "includes": {

        "functions": "appwrite/functions.json",

        "sites": "appwrite/sites.json",

        "webhooks": "appwrite/webhooks.json"

    },

    "settings": {

        "services": {

            "account": true,

            "databases": true,

            "functions": true,

            "sites": true,

            "messaging": true

        },

        "protocols": {

            "rest": true,

            "graphql": true,

            "websocket": true

        },

        "auth": {

            "methods": {

                "email-password": true,

                "magic-url": true

            },

            "security": {

                "sessionsLimit": 10,

                "passwordDictionary": true

            }

        }

    },

    "tablesDB": [],

    "tables": [],

    "buckets": [],

    "teams": [],

    "topics": []

}

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

Example appwrite/functions.json:

[

    {

        "$id": "<FUNCTION_ID>",

        "name": "userAuth",

        "enabled": true,

        "logging": true,

        "runtime": "node-22",

        "buildSpecification": "s-1vcpu-512mb",

        "runtimeSpecification": "s-1vcpu-512mb",

        "deploymentRetention": 7,

        "events": [],

        "schedule": "",

        "timeout": 15,

        "entrypoint": "src/main.js",

        "commands": "npm install",

        "ignore": "node_modules\n.tmp",

        "path": "../functions/userAuth"

    }

]

Pull and push project configuration

# Pull or push everything

appwrite pull all --all

appwrite push all --all

# Pull or push individual resource groups

appwrite pull settings

appwrite push settings

appwrite pull webhooks

appwrite push webhooks

appwrite pull functions

appwrite push functions

Deploying Functions

# Create a new function

appwrite init functions

# Pull existing functions from Console

appwrite pull functions

# Deploy functions

appwrite push functions

Function configuration in appwrite.config.json

{

    "functions": [

        {

            "$id": "<FUNCTION_ID>",

            "name": "userAuth",

            "enabled": true,

            "logging": true,

            "runtime": "node-22",

            "buildSpecification": "s-1vcpu-512mb",

            "runtimeSpecification": "s-1vcpu-512mb",

            "deploymentRetention": 7,

            "scopes": [],

            "events": [],

            "schedule": "",

            "timeout": 15,

            "entrypoint": "src/main.js",

            "commands": "npm install",

            "ignore": "node_modules\n.tmp",

            "path": "functions/userAuth"

        }

    ]

}

Key function config fields:

FieldDescription
enabledEnables or disables the function. Disabled functions cannot be executed.
loggingStores execution logs for debugging and observability.
runtimeRuntime used to execute the function, such as node-22.
buildSpecificationCompute specification used while building the deployment.
runtimeSpecificationCompute specification used while running executions.
deploymentRetentionNumber of days to retain old deployments before they are automatically deleted.
scopesAPI scopes granted to the function's generated execution key.
eventsEvent patterns that trigger the function.
scheduleCron expression for scheduled execution. Empty string disables scheduling.
timeoutMaximum execution duration in seconds.
entrypointFile inside path that starts the function.
commandsBuild/install command run before deployment.
ignoreExtra newline-separated ignore rules used when packaging code. .gitignore is read automatically.
pathLocal function source directory. If configured through includes, this is resolved relative to the include file.

Function commands

CommandDescription
appwrite functions listList all functions
appwrite functions createCreate a new function
appwrite functions get --function-id Get a function by ID
appwrite functions update --function-id Update a function
appwrite functions delete --function-id Delete a function
appwrite functions list-runtimesList all active runtimes
appwrite functions list-deployments --function-id List deployments
appwrite functions create-deployment --function-id Upload a new deployment
appwrite functions update-deployment --function-id --deployment-id Set active deployment
appwrite functions delete-deployment --function-id --deployment-id Delete a deployment
appwrite functions download-deployment --function-id --deployment-id Download deployment
appwrite functions create-execution --function-id Trigger execution
appwrite functions list-executions --function-id List execution logs
appwrite functions get-execution --function-id --execution-id Get execution log
appwrite functions list-variables --function-id List variables
appwrite functions create-variable --function-id --key --value Create variable
appwrite functions update-variable --function-id --variable-id --key --value Update variable
appwrite functions delete-variable --function-id --variable-id Delete variable

List functions with flag-based queries

Prefer the query flags for common filtering, sorting, and pagination. Use --queries only for raw Appwrite JSON query strings or advanced automation.

appwrite functions list \

    --where 'name=api' \

    --sort-desc '$createdAt' \

    --limit 10 \

    --offset 0 \

    --json

appwrite functions list-deployments \

    --function-id <FUNCTION_ID> \

    --limit 5 \

    --cursor-after <DEPLOYMENT_ID>

Trigger a function with body

appwrite functions create-execution \

    --function-id <FUNCTION_ID> \

    --body '{"key": "value"}'

Local development

appwrite run functions

Deployment activation

# Deploy and activate the deployment

appwrite push functions --function-id <FUNCTION_ID> --activate

# Deploy without switching live traffic

appwrite push functions --function-id <FUNCTION_ID> --activate=false

Function variables

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

# functions/userAuth/.env

PUBLIC_FLAG=enabled

SECRET_TOKEN=replace-me

# Sync function variables from .env

appwrite push functions --function-id <FUNCTION_ID> --with-variables

# Push code without changing saved variables

appwrite push functions --function-id <FUNCTION_ID>

# Run locally with variables fetched from function settings

appwrite run functions --with-variables

Deploying Sites

# Create a new site

appwrite init sites

# Pull existing sites from Console

appwrite pull sites

# Deploy sites

appwrite push sites

Site configuration in appwrite.config.json

{

    "sites": [

        {

            "$id": "<SITE_ID>",

            "name": "Documentation template",

            "logging": true,

            "framework": "astro",

            "timeout": 30,

            "installCommand": "npm install",

            "buildCommand": "npm run build",

            "outputDirectory": "./dist",

            "buildSpecification": "s-1vcpu-512mb",

            "runtimeSpecification": "s-1vcpu-512mb",

            "buildRuntime": "node-22",

            "adapter": "ssr",

            "fallbackFile": "",

            "startCommand": "npm run start",

            "deploymentRetention": 7,

            "path": "sites/documentation-template"

        }

    ]

}

Key site config fields:

FieldDescription
loggingStores site request and build logs.
frameworkFramework preset used for build and deployment defaults.
timeoutMaximum request or function duration in seconds for server-rendered sites.
installCommandCommand used to install dependencies.
buildCommandCommand used to build the site.
outputDirectoryDirectory containing static build output.
buildSpecificationCompute specification used while building the deployment.
runtimeSpecificationCompute specification used while serving runtime workloads.
buildRuntimeRuntime used to build the site, such as node-22.
adapterDeployment adapter, such as static or SSR behavior.
fallbackFileFallback file for SPA routing or missing routes.
startCommandCommand used to start server-rendered output.
deploymentRetentionNumber of days to retain old deployments before they are automatically deleted.
pathLocal site source directory. If configured through includes, this is resolved relative to the include file.

Site commands

CommandDescription
appwrite sites listList all sites
appwrite sites createCreate a new site
appwrite sites get --site-id Get a site by ID
appwrite sites update --site-id Update a site
appwrite sites delete --site-id Delete a site
appwrite sites list-frameworksList available frameworks
appwrite sites list-specificationsList allowed specs
appwrite sites list-templatesList available templates
appwrite sites get-template --template-id Get template details
appwrite sites list-deployments --site-id List deployments
appwrite sites create-deployment --site-id Create deployment
appwrite sites get-deployment --site-id --deployment-id Get deployment
appwrite sites delete-deployment --site-id --deployment-id Delete deployment
appwrite sites update-site-deployment --site-id --deployment-id Set active deployment
appwrite sites update-deployment-status --site-id --deployment-id Cancel ongoing build
appwrite sites list-variables --site-id List variables
appwrite sites create-variable --site-id --key --value Create variable
appwrite sites update-variable --site-id --variable-id --key --value Update variable
appwrite sites delete-variable --site-id --variable-id Delete variable
appwrite sites list-logs --site-id List request logs
appwrite sites get-log --site-id --log-id Get a log
appwrite sites delete-log --site-id --log-id Delete a log

Site variables

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

# sites/documentation-template/.env

PUBLIC_SITE_NAME=docs

appwrite push sites --site-id <SITE_ID> --with-variables

# Push code without changing saved variables

appwrite push sites --site-id <SITE_ID>

Managing Tables (Databases)

# Create a new table

appwrite init tables

# Pull existing tables from Console

appwrite pull tables

# Deploy tables

appwrite push tables

Table configuration in appwrite.config.json

{

    "tablesDB": [

        {

            "$id": "<DATABASE_ID>",

            "name": "songs",

            "enabled": true

        }

    ],

    "tables": [

        {

            "$id": "<TABLE_ID>",

            "$permissions": ["create(\"any\")", "read(\"any\")"],

            "databaseId": "<DATABASE_ID>",

            "name": "music",

            "enabled": true,

            "rowSecurity": false,

            "columns": [

                {

                    "key": "title",

                    "type": "varchar",

                    "required": true,

                    "size": 255

                }

            ],

            "indexes": []

        }

    ]

}

Database commands (TablesDB)

CommandDescription
appwrite tables-db list-tables --database-id List tables
appwrite tables-db create-table --database-id Create table
appwrite tables-db get-table --database-id --table-id Get table
appwrite tables-db update-table --database-id --table-id Update table
appwrite tables-db delete-table --database-id --table-id Delete table
appwrite tables-db list-columns --database-id --table-id List columns
appwrite tables-db get-column --database-id --table-id --key Get column
appwrite tables-db delete-column --database-id --table-id --key Delete column
appwrite tables-db list-column-indexes --database-id --table-id List indexes
appwrite tables-db create-column-index --database-id --table-id Create index
appwrite tables-db delete-column-index --database-id --table-id --key Delete index

Column type commands

Note: The legacy string type is deprecated. Use explicit string column types instead.

CommandDescription
create-varchar-columnVarchar column — inline storage, fully indexable (max 16,383 chars, size ≤ 768 for full index)
create-text-columnText column — off-page storage, prefix index only (max 16,383 chars)
create-mediumtext-columnMediumtext column — off-page storage (max ~4M chars)
create-longtext-columnLongtext column — off-page storage (max ~1B chars)
create-boolean-columnBoolean column
create-integer-columnInteger column (optional min/max)
create-float-columnFloat column (optional min/max)
create-email-columnEmail column
create-url-columnURL column
create-ip-columnIP address column
create-datetime-columnDatetime column (ISO 8601)
create-enum-columnEnum column (whitelist of accepted values)
create-relationship-columnRelationship column

All column commands use appwrite tables-db <command> --database-id <ID> --table-id <ID>.

Row operations

# Create a row

appwrite tables-db create-row \

    --database-id "<DATABASE_ID>" --table-id "<TABLE_ID>" \

    --row-id 'unique()' --data '{ "title": "Hello World" }' \

    --permissions 'read("any")' 'write("team:abc")'

# List rows (JSON output)

appwrite tables-db list-rows \

    --database-id "<DATABASE_ID>" --table-id "<TABLE_ID>" --json

# Get a row

appwrite tables-db get-row \

    --database-id "<DATABASE_ID>" --table-id "<TABLE_ID>" --row-id "<ROW_ID>"

List rows and documents with query flags

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

appwrite tables-db list-rows \

    --database-id "<DATABASE_ID>" \

    --table-id "<TABLE_ID>" \

    --where 'status=active' \

    --where 'score>=10' \

    --sort-asc 'name' \

    --select '$id' \

    --select 'name' \

    --limit 25 \

    --json

appwrite databases list-documents \

    --database-id "<DATABASE_ID>" \

    --collection-id "<COLLECTION_ID>" \

    --where 'email!=null' \

    --cursor-before "<DOCUMENT_ID>"

--where parses strings, numbers, booleans, null, and JSON arrays. Supported operators are =, !=, >, >=, <, and <=.

Managing Buckets (Storage)

# Create a new bucket

appwrite init buckets

# Pull existing buckets from Console

appwrite pull buckets

# Deploy buckets

appwrite push buckets

Storage commands

CommandDescription
appwrite storage list-bucketsList all buckets
appwrite storage create-bucketCreate a bucket
appwrite storage get-bucket --bucket-id Get a bucket
appwrite storage update-bucket --bucket-id Update a bucket
appwrite storage delete-bucket --bucket-id Delete a bucket
appwrite storage list-files --bucket-id List files
appwrite storage create-file --bucket-id Upload a file
appwrite storage get-file --bucket-id --file-id Get file metadata
appwrite storage delete-file --bucket-id --file-id Delete a file
appwrite storage get-file-download --bucket-id --file-id Download a file
appwrite storage get-file-preview --bucket-id --file-id Get image preview
appwrite storage get-file-view --bucket-id --file-id View file in browser

Managing Teams

# Create a new team

appwrite init teams

# Pull existing teams from Console

appwrite pull teams

# Deploy teams

appwrite push teams

Team commands

CommandDescription
appwrite teams listList all teams
appwrite teams createCreate a team
appwrite teams get --team-id Get a team
appwrite teams update-name --team-id Update team name
appwrite teams delete --team-id Delete a team
appwrite teams list-memberships --team-id List members
appwrite teams create-membership --team-id Invite a member
appwrite teams update-membership --team-id --membership-id Update member roles
appwrite teams delete-membership --team-id --membership-id Remove a member
appwrite teams get-prefs --team-id Get team preferences
appwrite teams update-prefs --team-id Update team preferences

Managing Webhooks

# Pull existing webhooks from Console

appwrite pull webhooks

# Deploy configured webhooks

appwrite push webhooks

Webhook configuration in appwrite/webhooks.json

[

    {

        "$id": "<WEBHOOK_ID>",

        "name": "Deploy events",

        "url": "https://example.com/appwrite/webhook",

        "events": ["functions.*.deployments.*.create"],

        "enabled": true,

        "tls": true

    }

]

Webhook commands

CommandDescription
appwrite webhooks listList webhooks
appwrite webhooks createCreate a webhook
appwrite webhooks get --webhook-id Get a webhook
appwrite webhooks update --webhook-id Update a webhook
appwrite webhooks delete --webhook-id Delete a webhook

Managing Topics (Messaging)

# Create a new topic

appwrite init topics

# Pull existing topics from Console

appwrite pull topics

# Deploy topics

appwrite push topics

Messaging commands

CommandDescription
appwrite messaging list-messagesList all messages
appwrite messaging create-emailCreate email message
appwrite messaging create-pushCreate push notification
appwrite messaging create-smsCreate SMS message
appwrite messaging get-message --message-id Get a message
appwrite messaging delete --message-id Delete a message
appwrite messaging list-topicsList all topics
appwrite messaging create-topicCreate a topic
appwrite messaging get-topic --topic-id Get a topic
appwrite messaging update-topic --topic-id Update a topic
appwrite messaging delete-topic --topic-id Delete a topic
appwrite messaging list-subscribers --topic-id List subscribers
appwrite messaging create-subscriber --topic-id Add subscriber
appwrite messaging delete-subscriber --topic-id --subscriber-id Remove subscriber

User Management

# Create a user

appwrite users create --user-id "unique()" \

    --email hello@appwrite.io

# List users

appwrite users list

# Get a user

appwrite users get --user-id "<USER_ID>"

# Delete a user

appwrite users delete --user-id "<USER_ID>"

Project Management

Project-level commands use the singular project service for current-project operations that do not need --project-id.

# Project settings and policies

appwrite project update-service --service-id functions --enabled true

appwrite project update-protocol --protocol-id rest --enabled true

appwrite project list-policies

appwrite project get-policy --policy-id "<POLICY_ID>"

# OAuth2 providers

appwrite project list-o-auth-2-providers

appwrite project get-o-auth-2-provider --provider github

appwrite project update-o-auth-2-git-hub --enabled true

# Mock phones and short-lived API keys

appwrite project create-mock-phone --phone "+12025550123" --otp "123456"

appwrite project list-mock-phones

appwrite project create-ephemeral-key

Generate Type-Safe SDK

# Auto-detect language and generate

appwrite generate

# Specify output directory

appwrite generate --output ./src/generated

# Specify language

appwrite generate --language typescript

# Override generated import settings

appwrite generate --appwrite-import-source node-appwrite --import-extension .js

Generated files:

FileDescription
types.tsType definitions from your database schema
databases.tsTyped database helpers for querying and mutating rows
constants.tsConfiguration constants (endpoint, project ID)
index.tsEntry point that exports all helpers

Usage:

import { databases } from "./generated/appwrite";

const customers = databases.use("main").use("customers");

// Create

const customer = await customers.create({

    name: "Walter O' Brian",

    email: "walter@example.com"

});

// List with typed queries

const results = await customers.list({

    queries: (q) => [

        q.equal("name", "Walter O' Brian"),

        q.orderDesc("$createdAt"),

        q.limit(10)

    ]

});

// Update

await customers.update("customer-id-123", {

    email: "walter@scorpion.com"

});

// Delete

await customers.delete("customer-id-123");

// Bulk create

await customers.createMany([

    { name: "Walter O' Brian", email: "walter@example.com" },

    { name: "Paige Dineen", email: "paige@example.com" }

]);

Non-Interactive / CI/CD Mode

For headless automation, see the Non-Interactive Mode docs.

Deploy non-interactively

# Push everything

appwrite push all --all --force

# Push specific resources

appwrite push functions --all --force

appwrite push functions --function-id <FUNCTION_ID> --force

appwrite push sites --all --force

appwrite push tables --all --force

appwrite push teams --all --force

appwrite push buckets --all --force

appwrite push webhooks --all --force

appwrite push topics --all --force

Global Command Options

OptionDescription
-v, --versionOutput version number
-V, --verboseShow complete error log
-j, --jsonOutput in JSON format
-f, --forceConfirm all warnings
-a, --allSelect all resources
--id [id...]Pass a list of IDs
--reportGenerate GitHub error report link
--consoleGet direct link to Console
--openOpen Console link in browser
-h, --helpDisplay help

Maintenance Commands

# Update CLI using the detected install method

appwrite update

# Show manual update instructions

appwrite update --manual

# Install shell completions

appwrite completion install

Examples

# List users with JSON output

appwrite users list --json

# Get verbose error output

appwrite users list --verbose

# View a row in the Console

appwrite tables-db get-row \

    --database-id "<DATABASE_ID>" \

    --table-id "<TABLE_ID>" \

    --row-id "<ROW_ID>" \

    --console --open

# Generate error report

appwrite login --report
BrowserAct

Let your agent run on any real-world website

Bypass CAPTCHA & anti-bot for free. Start local, scale to cloud.

Explore BrowserAct Skills →

Stop writing automation&scrapers

Install the CLI. Run your first Skill in 30 seconds. Scale when you're ready.

Start free
free · no credit card