Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .cursor-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"name": "appwrite-plugin",
"version": "0.1.0",
"description": "The Appwrite plugin for Cursor includes skills and MCP servers, allowing AI agents to access your projects and correctly integrate with your projects.",
"author": {
"name": "Appwrite",
"email": "team@appwrite.io"
},
"repository": "https://github.com/appwrite/cursor-plugin",
"logo": "https://appwrite.io/images/logos/logo.svg"
}
17 changes: 17 additions & 0 deletions .mcp.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"mcpServers": {
"appwrite-api": {
"command": "uvx",
"args": ["mcp-server-appwrite", "--users"],
"env": {
"APPWRITE_API_KEY": "your-api-key",
"APPWRITE_PROJECT_ID": "your-project-id",
"APPWRITE_ENDPOINT": "https://<REGION>.cloud.appwrite.io/v1"
}
},
"appwrite-docs": {
"command": "npx",
"args": ["mcp-remote", "https://mcp-for-docs.appwrite.io"]
}
}
}
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Change Log
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
SOFTWARE.
84 changes: 83 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,83 @@
# cursor-plugin
# Appwrite Cursor Plugin

![License](https://img.shields.io/github/license/appwrite/cursor-plugin.svg?style=flat-square)
![Version](https://img.shields.io/badge/api%20version-1.8.1-blue.svg?style=flat-square)
[![Twitter Account](https://img.shields.io/twitter/follow/appwrite?color=00acee&label=twitter&style=flat-square)](https://twitter.com/appwrite)
[![Discord](https://img.shields.io/discord/564160730845151244?label=discord&style=flat-square)](https://appwrite.io/discord)

**This SDK is compatible with Appwrite server version latest. For older versions, please check [previous releases](https://github.com/appwrite/cursor-plugin.git/releases).**
Comment on lines +4 to +8
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Version string "latest" is inconsistent with the badge (1.8.1).

Line 8 says "compatible with Appwrite server version latest" while the badge on line 4 pins api%20version-1.8.1. Use the concrete version number for consistency.

✏️ Proposed fix
-**This SDK is compatible with Appwrite server version latest. For older versions, please check [previous releases](https://github.com/appwrite/cursor-plugin.git/releases).**
+**This SDK is compatible with Appwrite server version 1.8.1. For older versions, please check [previous releases](https://github.com/appwrite/cursor-plugin/releases).**
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
![Version](https://img.shields.io/badge/api%20version-1.8.1-blue.svg?style=flat-square)
[![Twitter Account](https://img.shields.io/twitter/follow/appwrite?color=00acee&label=twitter&style=flat-square)](https://twitter.com/appwrite)
[![Discord](https://img.shields.io/discord/564160730845151244?label=discord&style=flat-square)](https://appwrite.io/discord)
**This SDK is compatible with Appwrite server version latest. For older versions, please check [previous releases](https://github.com/appwrite/cursor-plugin.git/releases).**
![Version](https://img.shields.io/badge/api%20version-1.8.1-blue.svg?style=flat-square)
[![Twitter Account](https://img.shields.io/twitter/follow/appwrite?color=00acee&label=twitter&style=flat-square)](https://twitter.com/appwrite)
[![Discord](https://img.shields.io/discord/564160730845151244?label=discord&style=flat-square)](https://appwrite.io/discord)
**This SDK is compatible with Appwrite server version 1.8.1. For older versions, please check [previous releases](https://github.com/appwrite/cursor-plugin/releases).**
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@README.md` around lines 4 - 8, The README states compatibility with "Appwrite
server version latest" while the version badge pins 1.8.1; update the
compatibility sentence to the concrete version used in the badge (e.g., replace
"latest" with "1.8.1") so the badge and text are consistent—edit the README.md
compatibility sentence that references "Appwrite server version latest" to match
the badge value "1.8.1".


Appwrite is an open-source backend as a service server that abstracts and simplifies complex and repetitive development tasks behind a very simple to use REST API. Appwrite aims to help you develop your apps faster and in a more secure way. Use the CursorPlugin SDK to integrate your app with the Appwrite server to easily start interacting with all of Appwrite backend APIs and tools. For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs)

## Installation

Install this plugin in Cursor by adding the plugin directory to your project or Cursor plugins folder.

## Structure

```
.cursor-plugin/
└── plugin.json # Plugin manifest
skills/ # Agent skills (per language)
├── appwrite-typescript/
│ └── SKILL.md
├── appwrite-dart/
│ └── SKILL.md
├── appwrite-kotlin/
│ └── SKILL.md
├── appwrite-swift/
│ └── SKILL.md
├── appwrite-php/
│ └── SKILL.md
├── appwrite-python/
│ └── SKILL.md
├── appwrite-ruby/
│ └── SKILL.md
├── appwrite-go/
│ └── SKILL.md
├── appwrite-dotnet/
│ └── SKILL.md
commands/ # Agent-executable commands
├── deploy-site.md
└── deploy-function.md
.mcp.json # MCP server definitions
```
Comment on lines +18 to +44
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Add a language tag to the fenced code block (markdownlint MD040).

The structure tree uses a bare ``` fence without a language specifier, which triggers a markdownlint warning.

🔧 Proposed fix
-```
+```text
 .cursor-plugin/
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
```
.cursor-plugin/
└── plugin.json # Plugin manifest
skills/ # Agent skills (per language)
├── appwrite-typescript/
│ └── SKILL.md
├── appwrite-dart/
│ └── SKILL.md
├── appwrite-kotlin/
│ └── SKILL.md
├── appwrite-swift/
│ └── SKILL.md
├── appwrite-php/
│ └── SKILL.md
├── appwrite-python/
│ └── SKILL.md
├── appwrite-ruby/
│ └── SKILL.md
├── appwrite-go/
│ └── SKILL.md
├── appwrite-dotnet/
│ └── SKILL.md
commands/ # Agent-executable commands
├── deploy-site.md
└── deploy-function.md
.mcp.json # MCP server definitions
```
🧰 Tools
🪛 markdownlint-cli2 (0.21.0)

[warning] 18-18: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@README.md` around lines 18 - 44, The fenced code block showing the repository
tree (the block starting with ".cursor-plugin/") lacks a language tag; update
the README.md by changing the opening fence from ``` to ```text (or another
appropriate language like ```bash) so the block is explicitly marked and
satisfies markdownlint MD040.


## Skills

This plugin includes Appwrite SDK skills for the following languages:

- **Typescript** — `skills/appwrite-typescript/SKILL.md`
- **Dart** — `skills/appwrite-dart/SKILL.md`
- **Kotlin** — `skills/appwrite-kotlin/SKILL.md`
- **Swift** — `skills/appwrite-swift/SKILL.md`
- **Php** — `skills/appwrite-php/SKILL.md`
- **Python** — `skills/appwrite-python/SKILL.md`
- **Ruby** — `skills/appwrite-ruby/SKILL.md`
- **Go** — `skills/appwrite-go/SKILL.md`
- **Dotnet** — `skills/appwrite-dotnet/SKILL.md`
Comment on lines +50 to +58
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Fix language name capitalizations in the Skills list.

  • Line 50: **Typescript****TypeScript**
  • Line 54: **Php****PHP**
  • Line 58: **Dotnet****.NET**
🔧 Proposed fix
-  - **Typescript** — `skills/appwrite-typescript/SKILL.md`
+  - **TypeScript** — `skills/appwrite-typescript/SKILL.md`
   - **Dart** — `skills/appwrite-dart/SKILL.md`
   - **Kotlin** — `skills/appwrite-kotlin/SKILL.md`
   - **Swift** — `skills/appwrite-swift/SKILL.md`
-  - **Php** — `skills/appwrite-php/SKILL.md`
+  - **PHP** — `skills/appwrite-php/SKILL.md`
   - **Python** — `skills/appwrite-python/SKILL.md`
   - **Ruby** — `skills/appwrite-ruby/SKILL.md`
   - **Go** — `skills/appwrite-go/SKILL.md`
-  - **Dotnet** — `skills/appwrite-dotnet/SKILL.md`
+  - **.NET** — `skills/appwrite-dotnet/SKILL.md`
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- **Typescript**`skills/appwrite-typescript/SKILL.md`
- **Dart**`skills/appwrite-dart/SKILL.md`
- **Kotlin**`skills/appwrite-kotlin/SKILL.md`
- **Swift**`skills/appwrite-swift/SKILL.md`
- **Php**`skills/appwrite-php/SKILL.md`
- **Python**`skills/appwrite-python/SKILL.md`
- **Ruby**`skills/appwrite-ruby/SKILL.md`
- **Go**`skills/appwrite-go/SKILL.md`
- **Dotnet**`skills/appwrite-dotnet/SKILL.md`
- **TypeScript**`skills/appwrite-typescript/SKILL.md`
- **Dart**`skills/appwrite-dart/SKILL.md`
- **Kotlin**`skills/appwrite-kotlin/SKILL.md`
- **Swift**`skills/appwrite-swift/SKILL.md`
- **PHP**`skills/appwrite-php/SKILL.md`
- **Python**`skills/appwrite-python/SKILL.md`
- **Ruby**`skills/appwrite-ruby/SKILL.md`
- **Go**`skills/appwrite-go/SKILL.md`
- **.NET**`skills/appwrite-dotnet/SKILL.md`
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@README.md` around lines 50 - 58, Update the language name capitalizations in
the Skills list entries: change the markdown list item text "**Typescript**" to
"**TypeScript**", "**Php**" to "**PHP**", and "**Dotnet**" to "**.NET**" (these
appear in the bullets for TypeScript / PHP / .NET in the README skills list).


Each skill provides comprehensive SDK usage examples including authentication, database operations, file storage, real-time subscriptions, and more.

## MCP Servers

This plugin comes with two MCP (Model Context Protocol) servers pre-configured in `.mcp.json`:

- **Appwrite API MCP** — Lets AI agents access the Appwrite API to manage users, databases, storage, and more.
- **Appwrite Docs MCP** — Access Appwrite documentation inline for quick reference while coding.

## Commands

Agent-executable commands for deploying directly from your editor:

- **deploy-site** — Deploy an Appwrite site using the CLI. Covers init, push, CI/CD non-interactive mode, site management, variables, and logs.
- **deploy-function** — Deploy an Appwrite function using the CLI. Covers init, push, CI/CD non-interactive mode, function management, executions, variables, and local development.


## Contribution

This library is auto-generated by Appwrite custom [SDK Generator](https://github.com/appwrite/sdk-generator). To learn more about how you can help us improve this SDK, please check the [contribution guide](https://github.com/appwrite/sdk-generator/blob/master/CONTRIBUTING.md) before sending a pull-request.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Misleading "auto-generated" boilerplate in the Contribution section.

This plugin is not auto-generated by the Appwrite SDK Generator, so directing contributors to the sdk-generator repo for contribution guidance is incorrect and may discourage contributions to this repo.

✏️ Proposed fix
-This library is auto-generated by Appwrite custom [SDK Generator](https://github.com/appwrite/sdk-generator). To learn more about how you can help us improve this SDK, please check the [contribution guide](https://github.com/appwrite/sdk-generator/blob/master/CONTRIBUTING.md) before sending a pull-request.
+Contributions are welcome! Please open an issue or pull-request in this repository. For general Appwrite contribution guidelines, see the [contribution guide](https://github.com/appwrite/appwrite/blob/master/CONTRIBUTING.md).
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
This library is auto-generated by Appwrite custom [SDK Generator](https://github.com/appwrite/sdk-generator). To learn more about how you can help us improve this SDK, please check the [contribution guide](https://github.com/appwrite/sdk-generator/blob/master/CONTRIBUTING.md) before sending a pull-request.
Contributions are welcome! Please open an issue or pull-request in this repository. For general Appwrite contribution guidelines, see the [contribution guide](https://github.com/appwrite/appwrite/blob/master/CONTRIBUTING.md).
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@README.md` at line 79, The README's Contribution section erroneously states
"This library is auto-generated by Appwrite custom [SDK
Generator](https://github.com/appwrite/sdk-generator)" and points contributors
to the sdk-generator repo; remove or reword that sentence and replace the link
with the correct contribution guidance for this plugin (either link to this
repo's CONTRIBUTING.md or a generic contribution guidelines page). Locate the
exact sentence in README.md ("This library is auto-generated by Appwrite custom
[SDK Generator]...") and update it to accurately describe the project origin and
provide the proper contribution link or instructions.


## License

Please see the [BSD-3-Clause license](https://raw.githubusercontent.com/appwrite/appwrite/master/LICENSE) file for more information.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

License link points to the appwrite/appwrite repo instead of this repository.

Line 83 links to https://raw.githubusercontent.com/appwrite/appwrite/master/LICENSE, which is the main Appwrite server repo's license — not this plugin's license file.

🔧 Proposed fix
-Please see the [BSD-3-Clause license](https://raw.githubusercontent.com/appwrite/appwrite/master/LICENSE) file for more information.
+Please see the [BSD-3-Clause license](https://raw.githubusercontent.com/appwrite/cursor-plugin/main/LICENSE) file for more information.
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
Please see the [BSD-3-Clause license](https://raw.githubusercontent.com/appwrite/appwrite/master/LICENSE) file for more information.
Please see the [BSD-3-Clause license](https://raw.githubusercontent.com/appwrite/cursor-plugin/main/LICENSE) file for more information.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@README.md` at line 83, The README contains a license link pointing to the
appwrite/appwrite repo (the URL
"https://raw.githubusercontent.com/appwrite/appwrite/master/LICENSE"); update
that link to point to this repository's license instead — replace the hardcoded
external URL with a relative link to this repo's LICENSE (e.g., "./LICENSE" or
"LICENSE") in README.md so the license reference resolves to this plugin's
actual license file.

153 changes: 153 additions & 0 deletions commands/deploy-function.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,153 @@
---
name: deploy-function
description: Deploy a function using the Appwrite CLI
---

# Deploy a function using the Appwrite CLI

## Prerequisites

- Appwrite CLI installed (`npm install -g appwrite-cli`)
- Authenticated with `appwrite login`
- Project initialized with `appwrite init`

## Quick Deploy

```sh
appwrite push functions
```

## Full Workflow

### 1. Initialize a new function

```sh
appwrite init functions
```

This scaffolds a new function with a starter template and adds it to `appwrite.config.json`.

### 2. Pull existing functions from Console

```sh
appwrite pull functions
```

### 3. Configuration

Functions are configured in `appwrite.config.json`:

```json
{
"projectId": "<PROJECT_ID>",
"endpoint": "https://<REGION>.cloud.appwrite.io/v1",
"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"
}
]
}
```

### 4. Deploy

```sh
appwrite push functions
```

## CI/CD (Non-Interactive)

Set up headless mode first:

```sh
appwrite client \
--endpoint https://<REGION>.cloud.appwrite.io/v1 \
--project-id <PROJECT_ID> \
--key <API_KEY>
```

Then deploy non-interactively:

```sh
# Push all functions
appwrite push functions --all --force

# Push a specific function
appwrite push functions --function-id <FUNCTION_ID> --force

# Push all resources at once (functions, tables, buckets, teams, topics)
appwrite push all --all --force
```

## Function Management Commands

| Command | Description |
|---------|-------------|
| `appwrite functions list` | List all functions in the project |
| `appwrite functions create` | Create a new function |
| `appwrite functions get --function-id <ID>` | Get a function by ID |
| `appwrite functions update --function-id <ID>` | Update a function |
| `appwrite functions delete --function-id <ID>` | Delete a function |
| `appwrite functions list-runtimes` | List all active runtimes |

## Deployment Commands

| Command | Description |
|---------|-------------|
| `appwrite functions list-deployments --function-id <ID>` | List all deployments |
| `appwrite functions create-deployment --function-id <ID>` | Upload a new deployment |
| `appwrite functions get-deployment --function-id <ID> --deployment-id <ID>` | Get a deployment |
| `appwrite functions update-deployment --function-id <ID> --deployment-id <ID>` | Set active deployment |
| `appwrite functions delete-deployment --function-id <ID> --deployment-id <ID>` | Delete a deployment |
| `appwrite functions download-deployment --function-id <ID> --deployment-id <ID>` | Download deployment contents |

## Execution Commands

| Command | Description |
|---------|-------------|
| `appwrite functions create-execution --function-id <ID>` | Trigger a function execution |
| `appwrite functions list-executions --function-id <ID>` | List execution logs |
| `appwrite functions get-execution --function-id <ID> --execution-id <ID>` | Get an execution log |

### Trigger with body

```sh
appwrite functions create-execution \
--function-id <FUNCTION_ID> \
--body '{"key": "value"}'
```

## Environment Variables

| Command | Description |
|---------|-------------|
| `appwrite functions list-variables --function-id <ID>` | List all variables |
| `appwrite functions create-variable --function-id <ID> --key <KEY> --value <VALUE>` | Create a variable |
| `appwrite functions update-variable --function-id <ID> --variable-id <ID> --key <KEY> --value <VALUE>` | Update a variable |
| `appwrite functions delete-variable --function-id <ID> --variable-id <ID>` | Delete a variable |

Variables are accessible at runtime as environment variables.

## Local Development

Run your function locally for quick debugging:

```sh
appwrite run functions
```

This starts a local development server that watches for file changes and automatically rebuilds.
Loading