Loading...
Loading...
Appwrite CLI skill. Use when managing Appwrite projects from the command line. Covers installation, login, project initialization, deploying functions/sites/tables/buckets/teams/topics, managing resources, non-interactive CI/CD mode, and generating type-safe SDKs.
npx skill4agent add appwrite/agent-skills appwrite-cli# npm
npm install -g appwrite-cli
# macOS (Homebrew)
brew install 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.jsonappwrite -v# Login to your account
appwrite login
# Login to a self-hosted instance
appwrite login --endpoint "https://your-instance.com/v1"
# Initialize a project (creates appwrite.config.json)
appwrite init project
# Verify by fetching project info
appwrite projects get --project-id "<PROJECT_ID>"# Authenticate with Appwrite
appwrite loginFor the full list of CLI commands, see CLI Commands. For headless / CI/CD usage, see Non-Interactive Mode.
appwrite.config.json{
"projectId": "<PROJECT_ID>",
"endpoint": "https://<REGION>.cloud.appwrite.io/v1",
"functions": [],
"sites": [],
"tablesDB": [],
"tables": [],
"buckets": [],
"teams": [],
"topics": []
}# Create a new function
appwrite init functions
# Pull existing functions from Console
appwrite pull functions
# Deploy functions
appwrite push functions{
"functions": [
{
"$id": "<FUNCTION_ID>",
"name": "userAuth",
"enabled": true,
"live": true,
"logging": true,
"runtime": "node-18.0",
"deployment": "<DEPLOYMENT_ID>",
"vars": [],
"events": [],
"schedule": "",
"timeout": 15,
"entrypoint": "userAuth.js",
"commands": "npm install",
"version": "v3",
"path": "functions/userAuth"
}
]
}| Command | Description |
|---|---|
| List all functions |
| Create a new function |
| Get a function by ID |
| Update a function |
| Delete a function |
| List all active runtimes |
| List deployments |
| Upload a new deployment |
| Set active deployment |
| Delete a deployment |
| Download deployment |
| Trigger execution |
| List execution logs |
| Get execution log |
| List variables |
| Create variable |
| Update variable |
| Delete variable |
appwrite functions create-execution \
--function-id <FUNCTION_ID> \
--body '{"key": "value"}'appwrite run functions# Create a new site
appwrite init sites
# Pull existing sites from Console
appwrite pull sites
# Deploy sites
appwrite push sites{
"sites": [
{
"$id": "<SITE_ID>",
"name": "Documentation template",
"enabled": true,
"logging": true,
"framework": "astro",
"timeout": 30,
"installCommand": "npm install",
"buildCommand": "npm run build",
"outputDirectory": "./dist",
"specification": "s-1vcpu-512mb",
"buildRuntime": "node-22",
"adapter": "ssr",
"fallbackFile": "",
"path": "sites/documentation-template"
}
]
}| Command | Description |
|---|---|
| List all sites |
| Create a new site |
| Get a site by ID |
| Update a site |
| Delete a site |
| List available frameworks |
| List allowed specs |
| List available templates |
| Get template details |
| List deployments |
| Create deployment |
| Get deployment |
| Delete deployment |
| Set active deployment |
| Cancel ongoing build |
| List variables |
| Create variable |
| Update variable |
| Delete variable |
| List request logs |
| Get a log |
| Delete a log |
# Create a new table
appwrite init tables
# Pull existing tables from Console
appwrite pull tables
# Deploy tables
appwrite push tables{
"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": []
}
]
}| Command | Description |
|---|---|
| List tables |
| Create table |
| Get table |
| Update table |
| Delete table |
| List columns |
| Get column |
| Delete column |
| List indexes |
| Create index |
| Delete index |
Note: The legacytype is deprecated. Use explicit string column types instead.string
| Command | Description |
|---|---|
| Varchar column — inline storage, fully indexable (max 16,383 chars, size ≤ 768 for full index) |
| Text column — off-page storage, prefix index only (max 16,383 chars) |
| Mediumtext column — off-page storage (max ~4M chars) |
| Longtext column — off-page storage (max ~1B chars) |
| Boolean column |
| Integer column (optional min/max) |
| Float column (optional min/max) |
| Email column |
| URL column |
| IP address column |
| Datetime column (ISO 8601) |
| Enum column (whitelist of accepted values) |
| Relationship column |
appwrite tables-db <command> --database-id <ID> --table-id <ID># 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>"# Create a new bucket
appwrite init buckets
# Pull existing buckets from Console
appwrite pull buckets
# Deploy buckets
appwrite push buckets| Command | Description |
|---|---|
| List all buckets |
| Create a bucket |
| Get a bucket |
| Update a bucket |
| Delete a bucket |
| List files |
| Upload a file |
| Get file metadata |
| Delete a file |
| Download a file |
| Get image preview |
| View file in browser |
# Create a new team
appwrite init teams
# Pull existing teams from Console
appwrite pull teams
# Deploy teams
appwrite push teams| Command | Description |
|---|---|
| List all teams |
| Create a team |
| Get a team |
| Update team name |
| Delete a team |
| List members |
| Invite a member |
| Update member roles |
| Remove a member |
| Get team preferences |
| Update team preferences |
# Create a new topic
appwrite init topics
# Pull existing topics from Console
appwrite pull topics
# Deploy topics
appwrite push topics| Command | Description |
|---|---|
| List all messages |
| Create email message |
| Create push notification |
| Create SMS message |
| Get a message |
| Delete a message |
| List all topics |
| Create a topic |
| Get a topic |
| Update a topic |
| Delete a topic |
| List subscribers |
| Add subscriber |
| Remove subscriber |
# 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>"# Auto-detect language and generate
appwrite generate
# Specify output directory
appwrite generate --output ./src/generated
# Specify language
appwrite generate --language typescript| File | Description |
|---|---|
| Type definitions from your database schema |
| Typed database helpers for querying and mutating rows |
| Configuration constants (endpoint, project ID) |
| Entry point that exports all helpers |
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" }
]);# 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 topics --all --force| Option | Description |
|---|---|
| Output version number |
| Show complete error log |
| Output in JSON format |
| Confirm all warnings |
| Select all resources |
| Pass a list of IDs |
| Generate GitHub error report link |
| Get direct link to Console |
| Open Console link in browser |
| Display help |
# 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