KosmoKrator

other

Appwrite CLI for AI Agents

Use the Appwrite CLI from KosmoKrator to call Appwrite tools headlessly, return JSON, inspect schemas, and automate workflows from coding agents, scripts, and CI.

7 functions 6 read 1 write API key auth

Appwrite CLI Setup

Appwrite can be configured headlessly with `kosmokrator integrations:configure appwrite`.

# Install KosmoKrator first if it is not available on PATH.
curl -fsSL https://raw.githubusercontent.com/OpenCompanyApp/kosmokrator/main/install.sh | bash

# Configure and verify this integration.
kosmokrator integrations:configure appwrite --set api_key="$APPWRITE_API_KEY" --set project_id="$APPWRITE_PROJECT_ID" --enable --read allow --write ask --json
kosmokrator integrations:doctor appwrite --json
kosmokrator integrations:status --json

Credentials

Authentication type: API key api_key. Configure credentials once, then use the same stored profile from scripts, coding CLIs, Lua code mode, and the MCP gateway.

KeyEnv varTypeRequiredLabel
api_key APPWRITE_API_KEY Secret secret yes API Key
project_id APPWRITE_PROJECT_ID Text text yes Project ID
url APPWRITE_URL URL url no Server URL

Call Appwrite Headlessly

Use the generic call form when another coding CLI or script needs a stable universal interface.

kosmo integrations:call appwrite.appwrite_list_databases '{
  "limit": 1,
  "offset": 1,
  "search": "example_search"
}' --json

Use the provider shortcut form for shorter human-facing commands.

kosmo integrations:appwrite appwrite_list_databases '{
  "limit": 1,
  "offset": 1,
  "search": "example_search"
}' --json

Agent Discovery Commands

These commands return structured output for coding agents that need to inspect capabilities before choosing a function.

kosmo integrations:docs appwrite --json
kosmo integrations:docs appwrite.appwrite_list_databases --json
kosmo integrations:schema appwrite.appwrite_list_databases --json
kosmo integrations:search "Appwrite" --json
kosmo integrations:list --json

All CLI Functions

Every function below can be called headlessly. The generic form is stable across all integrations; the provider shortcut is shorter but specific to Appwrite.

appwrite.appwrite_list_databases

Read read

List all databases in the Appwrite project. Returns database IDs and names.

Parameters
limit, offset, search

Generic CLI call

kosmo integrations:call appwrite.appwrite_list_databases '{"limit":1,"offset":1,"search":"example_search"}' --json

Provider shortcut

kosmo integrations:appwrite appwrite_list_databases '{"limit":1,"offset":1,"search":"example_search"}' --json

appwrite.appwrite_get_database

Read read

Get details of a specific Appwrite database by its ID.

Parameters
id

Generic CLI call

kosmo integrations:call appwrite.appwrite_get_database '{"id":"example_id"}' --json

Provider shortcut

kosmo integrations:appwrite appwrite_get_database '{"id":"example_id"}' --json

appwrite.appwrite_list_collections

Read read

List all collections in an Appwrite database. Returns collection IDs and names.

Parameters
database_id, limit, offset

Generic CLI call

kosmo integrations:call appwrite.appwrite_list_collections '{"database_id":"example_database_id","limit":1,"offset":1}' --json

Provider shortcut

kosmo integrations:appwrite appwrite_list_collections '{"database_id":"example_database_id","limit":1,"offset":1}' --json

appwrite.appwrite_list_documents

Read read

List documents in an Appwrite collection. Returns document data and metadata.

Parameters
database_id, collection_id, limit, offset

Generic CLI call

kosmo integrations:call appwrite.appwrite_list_documents '{"database_id":"example_database_id","collection_id":"example_collection_id","limit":1,"offset":1}' --json

Provider shortcut

kosmo integrations:appwrite appwrite_list_documents '{"database_id":"example_database_id","collection_id":"example_collection_id","limit":1,"offset":1}' --json

appwrite.appwrite_get_document

Read read

Get a single document from an Appwrite collection by its ID.

Parameters
database_id, collection_id, doc_id

Generic CLI call

kosmo integrations:call appwrite.appwrite_get_document '{"database_id":"example_database_id","collection_id":"example_collection_id","doc_id":"example_doc_id"}' --json

Provider shortcut

kosmo integrations:appwrite appwrite_get_document '{"database_id":"example_database_id","collection_id":"example_collection_id","doc_id":"example_doc_id"}' --json

appwrite.appwrite_create_document

Write write

Create a new document in an Appwrite collection.

Parameters
database_id, collection_id, document_id, data

Generic CLI call

kosmo integrations:call appwrite.appwrite_create_document '{"database_id":"example_database_id","collection_id":"example_collection_id","document_id":"example_document_id","data":"example_data"}' --json

Provider shortcut

kosmo integrations:appwrite appwrite_create_document '{"database_id":"example_database_id","collection_id":"example_collection_id","document_id":"example_document_id","data":"example_data"}' --json

appwrite.appwrite_get_current_user

Read read

Get the currently authenticated Appwrite user account information.

Parameters
none

Generic CLI call

kosmo integrations:call appwrite.appwrite_get_current_user '{}' --json

Provider shortcut

kosmo integrations:appwrite appwrite_get_current_user '{}' --json

Function Schemas

Use these parameter tables when building CLI payloads without calling integrations:schema first.

appwrite.appwrite_list_databases

List all databases in the Appwrite project. Returns database IDs and names.

Operation
Read read
Schema command
kosmo integrations:schema appwrite.appwrite_list_databases --json
ParameterTypeRequiredDescription
limit integer no Maximum number of databases to return (default: 25).
offset integer no Offset for pagination (default: 0).
search string no Search term to filter databases by name.

appwrite.appwrite_get_database

Get details of a specific Appwrite database by its ID.

Operation
Read read
Schema command
kosmo integrations:schema appwrite.appwrite_get_database --json
ParameterTypeRequiredDescription
id string yes The database ID.

appwrite.appwrite_list_collections

List all collections in an Appwrite database. Returns collection IDs and names.

Operation
Read read
Schema command
kosmo integrations:schema appwrite.appwrite_list_collections --json
ParameterTypeRequiredDescription
database_id string yes The database ID to list collections from.
limit integer no Maximum number of collections to return (default: 25).
offset integer no Offset for pagination (default: 0).

appwrite.appwrite_list_documents

List documents in an Appwrite collection. Returns document data and metadata.

Operation
Read read
Schema command
kosmo integrations:schema appwrite.appwrite_list_documents --json
ParameterTypeRequiredDescription
database_id string yes The database ID.
collection_id string yes The collection ID.
limit integer no Maximum number of documents to return (default: 25).
offset integer no Offset for pagination (default: 0).

appwrite.appwrite_get_document

Get a single document from an Appwrite collection by its ID.

Operation
Read read
Schema command
kosmo integrations:schema appwrite.appwrite_get_document --json
ParameterTypeRequiredDescription
database_id string yes The database ID.
collection_id string yes The collection ID.
doc_id string yes The document ID.

appwrite.appwrite_create_document

Create a new document in an Appwrite collection.

Operation
Write write
Schema command
kosmo integrations:schema appwrite.appwrite_create_document --json
ParameterTypeRequiredDescription
database_id string yes The database ID.
collection_id string yes The collection ID.
document_id string yes A unique ID for the document (use "unique()" to auto-generate).
data object yes The document data as key-value pairs matching the collection attributes.

appwrite.appwrite_get_current_user

Get the currently authenticated Appwrite user account information.

Operation
Read read
Schema command
kosmo integrations:schema appwrite.appwrite_get_current_user --json
ParameterTypeRequiredDescription
No parameters.

Permissions

Headless calls still follow the integration read/write permission policy. Configure read/write defaults with integrations:configure. Add --force only for trusted automation that should bypass that policy.