AgentStack
SKILL unreviewed BSD-3-Clause Self-run

Appwrite Cli

skill-appwrite-agent-skills-appwrite-cli · by appwrite

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.

No reviews yet
0 installs
7 views
0.0% view→install

Install

$ agentstack add skill-appwrite-agent-skills-appwrite-cli

Open-source listing — not yet scanned by AgentStack. Follow the source repository for install instructions.

Security review

⚠ Flagged

1 finding(s); flagged for manual review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures
  • high Pipes remote content directly into a shell (remote code execution).

What it can access

  • Network access Used
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets Used
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

Are you the author of Appwrite Cli? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

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 ""

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://.cloud.appwrite.io/v1.

Configuration

# Switch endpoint/project for scripted use
appwrite client --endpoint "https://.cloud.appwrite.io/v1"
appwrite client --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": "",
    "projectName": "Production",
    "endpoint": "https://.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": "",
        "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": "",
            "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:

| Field | Description | |-------|-------------| | enabled | Enables or disables the function. Disabled functions cannot be executed. | | logging | Stores execution logs for debugging and observability. | | runtime | Runtime used to execute the function, such as node-22. | | buildSpecification | Compute specification used while building the deployment. | | runtimeSpecification | Compute specification used while running executions. | | deploymentRetention | Number of days to retain old deployments before they are automatically deleted. | | scopes | API scopes granted to the function's generated execution key. | | events | Event patterns that trigger the function. | | schedule | Cron expression for scheduled execution. Empty string disables scheduling. | | timeout | Maximum execution duration in seconds. | | entrypoint | File inside path that starts the function. | | commands | Build/install command run before deployment. | | ignore | Extra newline-separated ignore rules used when packaging code. .gitignore is read automatically. | | path | Local function source directory. If configured through includes, this is resolved relative to the include file. |

Function commands

| Command | Description | |---------|-------------| | appwrite functions list | List all functions | | appwrite functions create | Create 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-runtimes | List 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  \
    --limit 5 \
    --cursor-after 

Trigger a function with body

appwrite functions create-execution \
    --function-id  \
    --body '{"key": "value"}'

Local development

appwrite run functions

Deployment activation

# Deploy and activate the deployment
appwrite push functions --function-id  --activate

# Deploy without switching live traffic
appwrite push functions --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  --with-variables

# Push code without changing saved variables
appwrite push functions --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": "",
            "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:

| Field | Description | |-------|-------------| | logging | Stores site request and build logs. | | framework | Framework preset used for build and deployment defaults. | | timeout | Maximum request or function duration in seconds for server-rendered sites. | | installCommand | Command used to install dependencies. | | buildCommand | Command used to build the site. | | outputDirectory | Directory containing static build output. | | buildSpecification | Compute specification used while building the deployment. | | runtimeSpecification | Compute specification used while serving runtime workloads. | | buildRuntime | Runtime used to build the site, such as node-22. | | adapter | Deployment adapter, such as static or SSR behavior. | | fallbackFile | Fallback file for SPA routing or missing routes. | | startCommand | Command used to start server-rendered output. | | deploymentRetention | Number of days to retain old deployments before they are automatically deleted. | | path | Local site source directory. If configured through includes, this is resolved relative to the include file. |

Site commands

| Command | Description | |---------|-------------| | appwrite sites list | List all sites | | appwrite sites create | Create 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-frameworks | List available frameworks | | appwrite sites list-specifications | List allowed specs | | appwrite sites list-templates | List 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  --with-variables

# Push code without changing saved variables
appwrite push sites --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": "",
            "name": "songs",
            "enabled": true
        }
    ],
    "tables": [
        {
            "$id": "",
            "$permissions": ["create(\"any\")", "read(\"any\")"],
            "databaseId": "",
            "name": "music",
            "enabled": true,
            "rowSecurity": false,
            "columns": [
                {
                    "key": "title",
                    "type": "varchar",
                    "required": true,
                    "size": 255
                }
            ],
            "indexes": []
        }
    ]
}

Database commands (TablesDB)

| Command | Description | |---------|-------------| | 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.

| Command | Description | |---------|-------------| | create-varchar-column | Varchar column — inline storage, fully indexable (max 16,383 chars, size ≤ 768 for full index) | | create-text-column | Text column — off-page storage, prefix index only (max 16,383 chars) | | create-mediumtext-column | Mediumtext column — off-page storage (max ~4M chars) | | create-longtext-column | Longtext column — off-page storage (max ~1B chars) | | create-boolean-column | Boolean column | | create-integer-column | Integer column (optional min/max) | | create-float-column | Float column (optional min/max) | | create-email-column | Email column | | create-url-column | URL column | | create-ip-column | IP address column | | create-datetime-column | Datetime column (ISO 8601) | | create-enum-column | Enum column (whitelist of accepted values) | | create-relationship-column | Relationship column |

All column commands use `appwrite tables-db --database-id --tabl

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet — be the first.

Versions

  • v0.1.0 Imported from the upstream source.