From 3f8af9f3c0f5a14e1f9833ae5fa0c82ed3e97066 Mon Sep 17 00:00:00 2001 From: adityaoberai Date: Mon, 27 Apr 2026 20:14:04 +0530 Subject: [PATCH 01/16] Add codex plugin --- AGENTS.md | 3 +- example.php | 16 ++- src/SDK/Language/CodexPlugin.php | 94 +++++++++++++ templates/codex-plugin/.mcp.json.twig | 20 +++ templates/codex-plugin/README.md.twig | 112 ++++++++++++++++ templates/codex-plugin/config.toml.twig | 14 ++ templates/codex-plugin/plugin.json.twig | 41 ++++++ templates/codex-plugin/skills/cli.md.twig | 2 + templates/codex-plugin/skills/dart.md.twig | 2 + .../skills/deploy-function.md.twig | 124 ++++++++++++++++++ .../codex-plugin/skills/deploy-site.md.twig | 120 +++++++++++++++++ templates/codex-plugin/skills/dotnet.md.twig | 2 + templates/codex-plugin/skills/go.md.twig | 2 + templates/codex-plugin/skills/kotlin.md.twig | 2 + templates/codex-plugin/skills/php.md.twig | 2 + templates/codex-plugin/skills/python.md.twig | 2 + templates/codex-plugin/skills/ruby.md.twig | 2 + templates/codex-plugin/skills/rust.md.twig | 2 + templates/codex-plugin/skills/swift.md.twig | 2 + .../codex-plugin/skills/typescript.md.twig | 2 + 20 files changed, 564 insertions(+), 2 deletions(-) create mode 100644 src/SDK/Language/CodexPlugin.php create mode 100644 templates/codex-plugin/.mcp.json.twig create mode 100644 templates/codex-plugin/README.md.twig create mode 100644 templates/codex-plugin/config.toml.twig create mode 100644 templates/codex-plugin/plugin.json.twig create mode 100644 templates/codex-plugin/skills/cli.md.twig create mode 100644 templates/codex-plugin/skills/dart.md.twig create mode 100644 templates/codex-plugin/skills/deploy-function.md.twig create mode 100644 templates/codex-plugin/skills/deploy-site.md.twig create mode 100644 templates/codex-plugin/skills/dotnet.md.twig create mode 100644 templates/codex-plugin/skills/go.md.twig create mode 100644 templates/codex-plugin/skills/kotlin.md.twig create mode 100644 templates/codex-plugin/skills/php.md.twig create mode 100644 templates/codex-plugin/skills/python.md.twig create mode 100644 templates/codex-plugin/skills/ruby.md.twig create mode 100644 templates/codex-plugin/skills/rust.md.twig create mode 100644 templates/codex-plugin/skills/swift.md.twig create mode 100644 templates/codex-plugin/skills/typescript.md.twig diff --git a/AGENTS.md b/AGENTS.md index d16bab72c8..2d0c03eec3 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -59,7 +59,7 @@ examples// ← Generated SDK output (checked in for verificat example.php ← Entry point: regenerates all SDKs from specs ``` -**Supported SDKs:** PHP, Web, Node, CLI, Ruby, Python, Dart, Flutter, React Native, Go, Swift, Apple, DotNet, Android, Kotlin, GraphQL, Markdown, AgentSkills, CursorPlugin, ClaudePlugin +**Supported SDKs:** PHP, Web, Node, CLI, Ruby, Python, Dart, Flutter, React Native, Go, Swift, Apple, DotNet, Android, Kotlin, GraphQL, Markdown, AgentSkills, CursorPlugin, ClaudePlugin, CodexPlugin ## Primary Workflows @@ -157,6 +157,7 @@ Pass as first argument to generate only that SDK: | `agent-skills` | AgentSkills | `examples/agent-skills/` | | `cursor-plugin` | CursorPlugin | `examples/cursor-plugin/` | | `claude-plugin` | ClaudePlugin | `examples/claude-plugin/` | +| `codex-plugin` | CodexPlugin | `examples/codex-plugin/` | ## Twig Template Variables by Scope diff --git a/example.php b/example.php index 01a7cb8140..78544401af 100644 --- a/example.php +++ b/example.php @@ -25,6 +25,7 @@ use Appwrite\SDK\Language\Markdown; use Appwrite\SDK\Language\AgentSkills; use Appwrite\SDK\Language\ClaudePlugin; +use Appwrite\SDK\Language\CodexPlugin; use Appwrite\SDK\Language\CursorPlugin; use Appwrite\SDK\Language\Rust; @@ -115,7 +116,7 @@ function configureSDK($sdk, $overrides = []) { } $version = '1.9.x'; - $speclessSDKs = ['agent-skills', 'cursor-plugin', 'claude-plugin']; + $speclessSDKs = ['agent-skills', 'cursor-plugin', 'claude-plugin', 'codex-plugin']; $needsSpec = !$requestedSdk || !in_array($requestedSdk, $speclessSDKs); if ($needsSpec) { @@ -339,6 +340,19 @@ function configureSDK($sdk, $overrides = []) { $sdk->generate(__DIR__ . '/examples/claude-plugin'); } + // Codex Plugin + if (!$requestedSdk || $requestedSdk === 'codex-plugin') { + $sdk = new SDK(new CodexPlugin(), new StaticSpec( + title: 'Appwrite', + description: 'Appwrite backend as a service', + version: $version, + licenseName: 'BSD-3-Clause', + licenseURL: 'https://raw.githubusercontent.com/appwrite/appwrite/master/LICENSE', + )); + configureSDK($sdk); + $sdk->generate(__DIR__ . '/examples/codex-plugin'); + } + // Rust if (!$requestedSdk || $requestedSdk === 'rust') { $sdk = new SDK(new Rust(), new Swagger2($spec)); diff --git a/src/SDK/Language/CodexPlugin.php b/src/SDK/Language/CodexPlugin.php new file mode 100644 index 0000000000..3e760f049d --- /dev/null +++ b/src/SDK/Language/CodexPlugin.php @@ -0,0 +1,94 @@ + 'default', + 'destination' => 'skills/{{ spec.title | caseLower }}-' . $lang . '/SKILL.md', + 'template' => 'codex-plugin/skills/' . $lang . '.md.twig', + ]; + } + + $files[] = [ + 'scope' => 'default', + 'destination' => '.codex-plugin/plugin.json', + 'template' => 'codex-plugin/plugin.json.twig', + ]; + + $files[] = [ + 'scope' => 'default', + 'destination' => '.mcp.json', + 'template' => 'codex-plugin/.mcp.json.twig', + ]; + + $files[] = [ + 'scope' => 'default', + 'destination' => 'skills/{{ spec.title | caseLower }}-deploy-site/SKILL.md', + 'template' => 'codex-plugin/skills/deploy-site.md.twig', + ]; + + $files[] = [ + 'scope' => 'default', + 'destination' => 'skills/{{ spec.title | caseLower }}-deploy-function/SKILL.md', + 'template' => 'codex-plugin/skills/deploy-function.md.twig', + ]; + + $files[] = [ + 'scope' => 'default', + 'destination' => 'config.toml', + 'template' => 'codex-plugin/config.toml.twig', + ]; + + $files[] = [ + 'scope' => 'default', + 'destination' => 'README.md', + 'template' => 'codex-plugin/README.md.twig', + ]; + + $files[] = [ + 'scope' => 'default', + 'destination' => 'CHANGELOG.md', + 'template' => 'agent-skills/CHANGELOG.md.twig', + ]; + + $files[] = [ + 'scope' => 'default', + 'destination' => 'LICENSE', + 'template' => 'cursor-plugin/LICENSE.twig', + ]; + + return $files; + } +} diff --git a/templates/codex-plugin/.mcp.json.twig b/templates/codex-plugin/.mcp.json.twig new file mode 100644 index 0000000000..9cc9f997fa --- /dev/null +++ b/templates/codex-plugin/.mcp.json.twig @@ -0,0 +1,20 @@ +{ + "mcpServers": { + "{{ spec.title | caseLower }}-api": { + "type": "stdio", + "command": "uvx", + "args": [ + "mcp-server-appwrite" + ], + "env": { + "{{ spec.title | caseUpper }}_ENDPOINT": "https://.cloud.appwrite.io/v1", + "{{ spec.title | caseUpper }}_PROJECT_ID": "", + "{{ spec.title | caseUpper }}_API_KEY": "" + } + }, + "{{ spec.title | caseLower }}-docs": { + "type": "http", + "url": "https://mcp-for-docs.appwrite.io" + } + } +} diff --git a/templates/codex-plugin/README.md.twig b/templates/codex-plugin/README.md.twig new file mode 100644 index 0000000000..3e8b634bd8 --- /dev/null +++ b/templates/codex-plugin/README.md.twig @@ -0,0 +1,112 @@ +# {{ spec.title }} Codex CLI Plugin + +![License](https://img.shields.io/github/license/{{ sdk.gitUserName|url_encode }}/{{ sdk.gitRepoName|url_encode }}.svg?style=flat-square) +![Version](https://img.shields.io/badge/api%20version-{{ sdk.version }}-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) + +{{ spec.title }} tools for the [OpenAI Codex CLI](https://github.com/openai/codex). This plugin packages {{ spec.title }} SDK skills, {{ spec.title }} deployment workflow skills, and {{ spec.title }} MCP servers. + +## Structure + +```text +skills/ # Codex skills (auto-loaded by description match) +|-- {{ spec.title | caseLower }}-typescript/SKILL.md +|-- {{ spec.title | caseLower }}-dart/SKILL.md +|-- {{ spec.title | caseLower }}-kotlin/SKILL.md +|-- {{ spec.title | caseLower }}-swift/SKILL.md +|-- {{ spec.title | caseLower }}-php/SKILL.md +|-- {{ spec.title | caseLower }}-python/SKILL.md +|-- {{ spec.title | caseLower }}-ruby/SKILL.md +|-- {{ spec.title | caseLower }}-go/SKILL.md +|-- {{ spec.title | caseLower }}-rust/SKILL.md +|-- {{ spec.title | caseLower }}-dotnet/SKILL.md +|-- {{ spec.title | caseLower }}-cli/SKILL.md +|-- {{ spec.title | caseLower }}-deploy-site/SKILL.md +`-- {{ spec.title | caseLower }}-deploy-function/SKILL.md +.codex-plugin/plugin.json # Codex plugin manifest +.mcp.json # MCP server config for plugin installs +config.toml # MCP server config snippet for manual installs +``` + +## Installation + +Codex plugins include a `.codex-plugin/plugin.json` manifest for plugin installation. For manual installs, Codex CLI loads skills from `~/.codex/skills/` and reads MCP server configuration from `~/.codex/config.toml`. Install the generated files manually by copying them into those locations. + +### macOS / Linux + +```sh +# Copy skills +mkdir -p ~/.codex/skills +cp -R skills/* ~/.codex/skills/ + +# Append the MCP config snippet to your Codex config +mkdir -p ~/.codex +cat config.toml >> ~/.codex/config.toml +``` + +### Windows (PowerShell) + +```powershell +# Copy skills +New-Item -ItemType Directory -Force -Path "$HOME\.codex\skills" | Out-Null +Copy-Item -Recurse skills\* "$HOME\.codex\skills\" + +# Append the MCP config snippet to your Codex config +New-Item -ItemType Directory -Force -Path "$HOME\.codex" | Out-Null +Get-Content config.toml | Add-Content "$HOME\.codex\config.toml" +``` + +After copying `config.toml`, edit `~/.codex/config.toml` and replace ``, ``, and the `` portion of the endpoint with your {{ spec.title }} credentials. + +## Included Skills + +Each skill ships as `skills/{{ spec.title | caseLower }}-/SKILL.md`. Codex loads them based on the `description` field in the frontmatter, so they activate automatically when a session is about Appwrite work in that language: + +- `{{ spec.title | caseLower }}-typescript` +- `{{ spec.title | caseLower }}-dart` +- `{{ spec.title | caseLower }}-kotlin` +- `{{ spec.title | caseLower }}-swift` +- `{{ spec.title | caseLower }}-php` +- `{{ spec.title | caseLower }}-python` +- `{{ spec.title | caseLower }}-ruby` +- `{{ spec.title | caseLower }}-go` +- `{{ spec.title | caseLower }}-rust` +- `{{ spec.title | caseLower }}-dotnet` +- `{{ spec.title | caseLower }}-cli` +- `{{ spec.title | caseLower }}-deploy-site` +- `{{ spec.title | caseLower }}-deploy-function` + +The language skills give Codex language-specific {{ spec.title }} context for authentication, database queries, storage, realtime, functions, and server-side administration. The deployment skills walk through {{ spec.title }} Sites and Functions deployment with the {{ spec.title }} CLI. + +## Deployment Workflows + +Deployment workflows are exposed as explicit skills: + +- `${{ spec.title | caseLower }}-deploy-site` +- `${{ spec.title | caseLower }}-deploy-function` + +Use these to walk through deploying {{ spec.title }} sites and functions with the {{ spec.title }} CLI. Codex can also load them automatically when a task matches the skill description. + +## Included MCP Servers + +The bundled `config.toml` registers two MCP servers: + +- `{{ spec.title | caseLower }}-api` runs `uvx mcp-server-appwrite` against your project. Set `{{ spec.title | caseUpper }}_ENDPOINT`, `{{ spec.title | caseUpper }}_PROJECT_ID`, and `{{ spec.title | caseUpper }}_API_KEY` in the `env` block. +- `{{ spec.title | caseLower }}-docs` proxies `https://mcp-for-docs.appwrite.io` through `npx mcp-remote` so Codex can search the {{ spec.title }} documentation. + +## Verify + +After copying, run `codex` and check: + +- A session about {{ spec.title }} TypeScript work loads the `{{ spec.title | caseLower }}-typescript` skill (visible in the session header). +- Typing `$` lets you invoke the `{{ spec.title | caseLower }}-deploy-*` skills explicitly. +- `codex mcp list` (or `codex --debug`) lists the `{{ spec.title | caseLower }}-api` and `{{ spec.title | caseLower }}-docs` servers. + +## 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. + +## License + +Please see the [MIT license](LICENSE) file for more information. diff --git a/templates/codex-plugin/config.toml.twig b/templates/codex-plugin/config.toml.twig new file mode 100644 index 0000000000..bd03b3dc9f --- /dev/null +++ b/templates/codex-plugin/config.toml.twig @@ -0,0 +1,14 @@ +# {{ spec.title }} Codex CLI configuration +# +# Merge the contents of this file into your ~/.codex/config.toml. +# Replace the placeholder values with your {{ spec.title }} project credentials +# before launching Codex. + +[mcp_servers.{{ spec.title | caseLower }}-api] +command = "uvx" +args = ["mcp-server-appwrite"] +env = { {{ spec.title | caseUpper }}_ENDPOINT = "https://.cloud.appwrite.io/v1", {{ spec.title | caseUpper }}_PROJECT_ID = "", {{ spec.title | caseUpper }}_API_KEY = "" } + +[mcp_servers.{{ spec.title | caseLower }}-docs] +command = "npx" +args = ["mcp-remote", "https://mcp-for-docs.appwrite.io"] diff --git a/templates/codex-plugin/plugin.json.twig b/templates/codex-plugin/plugin.json.twig new file mode 100644 index 0000000000..9f0f851263 --- /dev/null +++ b/templates/codex-plugin/plugin.json.twig @@ -0,0 +1,41 @@ +{ + "name": "{{ spec.title | caseLower }}", + "version": "{{ sdk.version }}", + "description": "{{ spec.title }} tools for Codex, including SDK skills, MCP servers, and deployment workflow skills.", + "author": { + "name": "Appwrite", + "email": "team@appwrite.io", + "url": "https://appwrite.io" + }, + "homepage": "https://appwrite.io/docs/tooling/ai/ai-dev-tools/codex", + "repository": "https://github.com/appwrite/codex-plugin", + "license": "MIT", + "keywords": [ + "{{ spec.title | caseLower }}", + "codex", + "mcp", + "skills" + ], + "skills": "./skills/", + "mcpServers": "./.mcp.json", + "interface": { + "displayName": "{{ spec.title }}", + "shortDescription": "{{ spec.title }} SDK skills, MCP servers, and deployment workflow skills for Codex.", + "longDescription": "Use {{ spec.title }} with Codex through language-specific SDK skills, project and documentation MCP servers, and guided deployment skills for sites and functions.", + "developerName": "Appwrite", + "category": "Developer Tools", + "capabilities": [ + "Interactive", + "Write" + ], + "websiteURL": "https://appwrite.io", + "privacyPolicyURL": "https://appwrite.io/privacy", + "termsOfServiceURL": "https://appwrite.io/terms", + "defaultPrompt": [ + "Build an {{ spec.title }} app with the SDK.", + "Connect Codex to my {{ spec.title }} project.", + "Deploy my {{ spec.title }} function." + ], + "brandColor": "#FD366E" + } +} diff --git a/templates/codex-plugin/skills/cli.md.twig b/templates/codex-plugin/skills/cli.md.twig new file mode 100644 index 0000000000..33b02b7eac --- /dev/null +++ b/templates/codex-plugin/skills/cli.md.twig @@ -0,0 +1,2 @@ +{% set skillName = 'cli' %} +{{ include('agent-skills/cli.md.twig') }} \ No newline at end of file diff --git a/templates/codex-plugin/skills/dart.md.twig b/templates/codex-plugin/skills/dart.md.twig new file mode 100644 index 0000000000..831ebeed3a --- /dev/null +++ b/templates/codex-plugin/skills/dart.md.twig @@ -0,0 +1,2 @@ +{% set skillName = 'dart' %} +{{ include('agent-skills/dart.md.twig') }} diff --git a/templates/codex-plugin/skills/deploy-function.md.twig b/templates/codex-plugin/skills/deploy-function.md.twig new file mode 100644 index 0000000000..5778655ecc --- /dev/null +++ b/templates/codex-plugin/skills/deploy-function.md.twig @@ -0,0 +1,124 @@ +--- +name: {{ spec.title | caseLower }}-deploy-function +description: Deploy {{ spec.title }} functions using the {{ spec.title }} CLI. Use when the user wants to initialize, configure, push, manage, execute, or troubleshoot {{ spec.title }} Functions deployments. +--- + +# Deploy a function using the {{ spec.title }} CLI + +## Prerequisites + +- {{ spec.title }} 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": "", + "endpoint": "https://.cloud.appwrite.io/v1", + "functions": [ + { + "$id": "", + "name": "userAuth", + "enabled": true, + "live": true, + "logging": true, + "runtime": "node-18.0", + "deployment": "", + "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://.cloud.appwrite.io/v1 \ + --project-id \ + --key +``` + +Then deploy non-interactively: + +```sh +# Push all functions +appwrite push functions --all --force + +# Push a specific function +appwrite push functions --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 ` | 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 | + +## Deployment Commands + +| Command | Description | +|---------|-------------| +| `appwrite functions list-deployments --function-id ` | List all deployments | +| `appwrite functions create-deployment --function-id ` | Upload a new deployment | +| `appwrite functions get-deployment --function-id --deployment-id ` | Get a 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 contents | + +## Execution Commands + +| Command | Description | +|---------|-------------| +| `appwrite functions list-executions --function-id ` | List recent executions | +| `appwrite functions create-execution --function-id ` | Trigger a function execution | +| `appwrite functions get-execution --function-id --execution-id ` | Get execution details | diff --git a/templates/codex-plugin/skills/deploy-site.md.twig b/templates/codex-plugin/skills/deploy-site.md.twig new file mode 100644 index 0000000000..034caff827 --- /dev/null +++ b/templates/codex-plugin/skills/deploy-site.md.twig @@ -0,0 +1,120 @@ +--- +name: {{ spec.title | caseLower }}-deploy-site +description: Deploy {{ spec.title }} sites using the {{ spec.title }} CLI. Use when the user wants to initialize, configure, push, manage, or troubleshoot {{ spec.title }} Sites deployments. +--- + +# Deploy a site using the {{ spec.title }} CLI + +## Prerequisites + +- {{ spec.title }} CLI installed (`npm install -g appwrite-cli`) +- Authenticated with `appwrite login` +- Project initialized with `appwrite init` + +## Quick Deploy + +```sh +appwrite push sites +``` + +## Full Workflow + +### 1. Initialize a new site + +```sh +appwrite init sites +``` + +### 2. Pull existing sites from Console + +```sh +appwrite pull sites +``` + +### 3. Configuration + +Sites are configured in `appwrite.config.json`: + +```json +{ + "projectId": "", + "endpoint": "https://.cloud.appwrite.io/v1", + "sites": [ + { + "$id": "", + "name": "My Site", + "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/my-site" + } + ] +} +``` + +### 4. Deploy + +```sh +appwrite push sites +``` + +## CI/CD (Non-Interactive) + +Set up headless mode first: + +```sh +appwrite client \ + --endpoint https://.cloud.appwrite.io/v1 \ + --project-id \ + --key +``` + +Then deploy non-interactively: + +```sh +# Push all sites +appwrite push sites --all --force + +# Push a specific site +appwrite push sites --site-id --force +``` + +## Site Management Commands + +| Command | Description | +|---------|-------------| +| `appwrite sites list` | List all sites in the project | +| `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 site specifications | + +## Deployment Commands + +| Command | Description | +|---------|-------------| +| `appwrite sites list-deployments --site-id ` | List all deployments | +| `appwrite sites create-deployment --site-id ` | Create a new deployment | +| `appwrite sites get-deployment --site-id --deployment-id ` | Get a deployment | +| `appwrite sites delete-deployment --site-id --deployment-id ` | Delete a deployment | +| `appwrite sites update-site-deployment --site-id --deployment-id ` | Set active deployment | +| `appwrite sites update-deployment-status --site-id --deployment-id ` | Cancel an ongoing build | + +## Environment Variables + +| Command | Description | +|---------|-------------| +| `appwrite sites list-variables --site-id ` | List all variables | +| `appwrite sites create-variable --site-id --key --value ` | Create a variable | +| `appwrite sites update-variable --site-id --variable-id --key --value ` | Update a variable | +| `appwrite sites delete-variable --site-id ` | Delete a variable | diff --git a/templates/codex-plugin/skills/dotnet.md.twig b/templates/codex-plugin/skills/dotnet.md.twig new file mode 100644 index 0000000000..1f7181da05 --- /dev/null +++ b/templates/codex-plugin/skills/dotnet.md.twig @@ -0,0 +1,2 @@ +{% set skillName = 'dotnet' %} +{{ include('agent-skills/dotnet.md.twig') }} diff --git a/templates/codex-plugin/skills/go.md.twig b/templates/codex-plugin/skills/go.md.twig new file mode 100644 index 0000000000..68a2dee6c2 --- /dev/null +++ b/templates/codex-plugin/skills/go.md.twig @@ -0,0 +1,2 @@ +{% set skillName = 'go' %} +{{ include('agent-skills/go.md.twig') }} diff --git a/templates/codex-plugin/skills/kotlin.md.twig b/templates/codex-plugin/skills/kotlin.md.twig new file mode 100644 index 0000000000..72fa75cc30 --- /dev/null +++ b/templates/codex-plugin/skills/kotlin.md.twig @@ -0,0 +1,2 @@ +{% set skillName = 'kotlin' %} +{{ include('agent-skills/kotlin.md.twig') }} diff --git a/templates/codex-plugin/skills/php.md.twig b/templates/codex-plugin/skills/php.md.twig new file mode 100644 index 0000000000..11a1b96527 --- /dev/null +++ b/templates/codex-plugin/skills/php.md.twig @@ -0,0 +1,2 @@ +{% set skillName = 'php' %} +{{ include('agent-skills/php.md.twig') }} diff --git a/templates/codex-plugin/skills/python.md.twig b/templates/codex-plugin/skills/python.md.twig new file mode 100644 index 0000000000..70a8bd4d64 --- /dev/null +++ b/templates/codex-plugin/skills/python.md.twig @@ -0,0 +1,2 @@ +{% set skillName = 'python' %} +{{ include('agent-skills/python.md.twig') }} diff --git a/templates/codex-plugin/skills/ruby.md.twig b/templates/codex-plugin/skills/ruby.md.twig new file mode 100644 index 0000000000..67aca7777c --- /dev/null +++ b/templates/codex-plugin/skills/ruby.md.twig @@ -0,0 +1,2 @@ +{% set skillName = 'ruby' %} +{{ include('agent-skills/ruby.md.twig') }} diff --git a/templates/codex-plugin/skills/rust.md.twig b/templates/codex-plugin/skills/rust.md.twig new file mode 100644 index 0000000000..2741bb8685 --- /dev/null +++ b/templates/codex-plugin/skills/rust.md.twig @@ -0,0 +1,2 @@ +{% set skillName = 'rust' %} +{{ include('agent-skills/rust.md.twig') }} diff --git a/templates/codex-plugin/skills/swift.md.twig b/templates/codex-plugin/skills/swift.md.twig new file mode 100644 index 0000000000..76a27aa498 --- /dev/null +++ b/templates/codex-plugin/skills/swift.md.twig @@ -0,0 +1,2 @@ +{% set skillName = 'swift' %} +{{ include('agent-skills/swift.md.twig') }} diff --git a/templates/codex-plugin/skills/typescript.md.twig b/templates/codex-plugin/skills/typescript.md.twig new file mode 100644 index 0000000000..130bd52bea --- /dev/null +++ b/templates/codex-plugin/skills/typescript.md.twig @@ -0,0 +1,2 @@ +{% set skillName = 'typescript' %} +{{ include('agent-skills/typescript.md.twig') }} From 95f436e0ddd75e5e5b23ef3d074ca246ae5a1be9 Mon Sep 17 00:00:00 2001 From: Aditya Oberai Date: Tue, 28 Apr 2026 21:46:01 +0530 Subject: [PATCH 02/16] Update templates/codex-plugin/plugin.json.twig Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> --- templates/codex-plugin/plugin.json.twig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/codex-plugin/plugin.json.twig b/templates/codex-plugin/plugin.json.twig index 9f0f851263..6bb00fd32e 100644 --- a/templates/codex-plugin/plugin.json.twig +++ b/templates/codex-plugin/plugin.json.twig @@ -8,7 +8,7 @@ "url": "https://appwrite.io" }, "homepage": "https://appwrite.io/docs/tooling/ai/ai-dev-tools/codex", - "repository": "https://github.com/appwrite/codex-plugin", + "repository": "https://github.com/{{ sdk.gitUserName }}/{{ sdk.gitRepoName }}", "license": "MIT", "keywords": [ "{{ spec.title | caseLower }}", From bc46d7b033085f351d4970ea33c3ce2964ec69cc Mon Sep 17 00:00:00 2001 From: Aditya Oberai Date: Tue, 28 Apr 2026 21:46:28 +0530 Subject: [PATCH 03/16] Update templates/codex-plugin/skills/cli.md.twig --- templates/codex-plugin/skills/cli.md.twig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/codex-plugin/skills/cli.md.twig b/templates/codex-plugin/skills/cli.md.twig index 33b02b7eac..28ac8cd229 100644 --- a/templates/codex-plugin/skills/cli.md.twig +++ b/templates/codex-plugin/skills/cli.md.twig @@ -1,2 +1,2 @@ {% set skillName = 'cli' %} -{{ include('agent-skills/cli.md.twig') }} \ No newline at end of file +{{ include('agent-skills/cli.md.twig') }} From cc83b300c4c82621ac70ff0a057fa92c4edc6bdf Mon Sep 17 00:00:00 2001 From: Aditya Oberai Date: Tue, 28 Apr 2026 23:49:34 +0530 Subject: [PATCH 04/16] Update templates/codex-plugin/skills/deploy-site.md.twig Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> --- templates/codex-plugin/skills/deploy-site.md.twig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/codex-plugin/skills/deploy-site.md.twig b/templates/codex-plugin/skills/deploy-site.md.twig index 034caff827..9a162192b1 100644 --- a/templates/codex-plugin/skills/deploy-site.md.twig +++ b/templates/codex-plugin/skills/deploy-site.md.twig @@ -117,4 +117,4 @@ appwrite push sites --site-id --force | `appwrite sites list-variables --site-id ` | List all variables | | `appwrite sites create-variable --site-id --key --value ` | Create a variable | | `appwrite sites update-variable --site-id --variable-id --key --value ` | Update a variable | -| `appwrite sites delete-variable --site-id ` | Delete a variable | +| `appwrite sites delete-variable --site-id --variable-id ` | Delete a variable | From 09113f2c5d0faf0d849b5cefe4e9f61ab7de7c74 Mon Sep 17 00:00:00 2001 From: adityaoberai Date: Tue, 28 Apr 2026 23:53:43 +0530 Subject: [PATCH 05/16] Add environment variable commands to deploy-function and deploy-site documentation --- templates/codex-plugin/skills/deploy-function.md.twig | 10 ++++++++++ templates/codex-plugin/skills/deploy-site.md.twig | 1 + 2 files changed, 11 insertions(+) diff --git a/templates/codex-plugin/skills/deploy-function.md.twig b/templates/codex-plugin/skills/deploy-function.md.twig index 5778655ecc..c5d9ba523d 100644 --- a/templates/codex-plugin/skills/deploy-function.md.twig +++ b/templates/codex-plugin/skills/deploy-function.md.twig @@ -122,3 +122,13 @@ appwrite push all --all --force | `appwrite functions list-executions --function-id ` | List recent executions | | `appwrite functions create-execution --function-id ` | Trigger a function execution | | `appwrite functions get-execution --function-id --execution-id ` | Get execution details | + +## Environment Variables + +| Command | Description | +|---------|-------------| +| `appwrite functions list-variables --function-id ` | List all variables | +| `appwrite functions create-variable --function-id --key --value ` | Create a variable | +| `appwrite functions get-variable --function-id --variable-id ` | Get a variable | +| `appwrite functions update-variable --function-id --variable-id --key --value ` | Update a variable | +| `appwrite functions delete-variable --function-id --variable-id ` | Delete a variable | diff --git a/templates/codex-plugin/skills/deploy-site.md.twig b/templates/codex-plugin/skills/deploy-site.md.twig index 9a162192b1..096b616182 100644 --- a/templates/codex-plugin/skills/deploy-site.md.twig +++ b/templates/codex-plugin/skills/deploy-site.md.twig @@ -116,5 +116,6 @@ appwrite push sites --site-id --force |---------|-------------| | `appwrite sites list-variables --site-id ` | List all variables | | `appwrite sites create-variable --site-id --key --value ` | Create a variable | +| `appwrite sites get-variable --site-id --variable-id ` | Get a variable | | `appwrite sites update-variable --site-id --variable-id --key --value ` | Update a variable | | `appwrite sites delete-variable --site-id --variable-id ` | Delete a variable | From 098238ad2f860b1cab0af89295ef6fd54054ba29 Mon Sep 17 00:00:00 2001 From: adityaoberai Date: Wed, 29 Apr 2026 17:47:24 +0530 Subject: [PATCH 06/16] Use agent skills templates directly instead of having separate files --- src/SDK/Language/CodexPlugin.php | 2 +- templates/codex-plugin/skills/cli.md.twig | 2 -- templates/codex-plugin/skills/dart.md.twig | 2 -- templates/codex-plugin/skills/dotnet.md.twig | 2 -- templates/codex-plugin/skills/go.md.twig | 2 -- templates/codex-plugin/skills/kotlin.md.twig | 2 -- templates/codex-plugin/skills/php.md.twig | 2 -- templates/codex-plugin/skills/python.md.twig | 2 -- templates/codex-plugin/skills/ruby.md.twig | 2 -- templates/codex-plugin/skills/rust.md.twig | 2 -- templates/codex-plugin/skills/swift.md.twig | 2 -- templates/codex-plugin/skills/typescript.md.twig | 2 -- 12 files changed, 1 insertion(+), 23 deletions(-) delete mode 100644 templates/codex-plugin/skills/cli.md.twig delete mode 100644 templates/codex-plugin/skills/dart.md.twig delete mode 100644 templates/codex-plugin/skills/dotnet.md.twig delete mode 100644 templates/codex-plugin/skills/go.md.twig delete mode 100644 templates/codex-plugin/skills/kotlin.md.twig delete mode 100644 templates/codex-plugin/skills/php.md.twig delete mode 100644 templates/codex-plugin/skills/python.md.twig delete mode 100644 templates/codex-plugin/skills/ruby.md.twig delete mode 100644 templates/codex-plugin/skills/rust.md.twig delete mode 100644 templates/codex-plugin/skills/swift.md.twig delete mode 100644 templates/codex-plugin/skills/typescript.md.twig diff --git a/src/SDK/Language/CodexPlugin.php b/src/SDK/Language/CodexPlugin.php index 3e760f049d..ce8f6f7f77 100644 --- a/src/SDK/Language/CodexPlugin.php +++ b/src/SDK/Language/CodexPlugin.php @@ -37,7 +37,7 @@ public function getFiles(): array $files[] = [ 'scope' => 'default', 'destination' => 'skills/{{ spec.title | caseLower }}-' . $lang . '/SKILL.md', - 'template' => 'codex-plugin/skills/' . $lang . '.md.twig', + 'template' => 'agent-skills/' . $lang . '.md.twig', ]; } diff --git a/templates/codex-plugin/skills/cli.md.twig b/templates/codex-plugin/skills/cli.md.twig deleted file mode 100644 index 28ac8cd229..0000000000 --- a/templates/codex-plugin/skills/cli.md.twig +++ /dev/null @@ -1,2 +0,0 @@ -{% set skillName = 'cli' %} -{{ include('agent-skills/cli.md.twig') }} diff --git a/templates/codex-plugin/skills/dart.md.twig b/templates/codex-plugin/skills/dart.md.twig deleted file mode 100644 index 831ebeed3a..0000000000 --- a/templates/codex-plugin/skills/dart.md.twig +++ /dev/null @@ -1,2 +0,0 @@ -{% set skillName = 'dart' %} -{{ include('agent-skills/dart.md.twig') }} diff --git a/templates/codex-plugin/skills/dotnet.md.twig b/templates/codex-plugin/skills/dotnet.md.twig deleted file mode 100644 index 1f7181da05..0000000000 --- a/templates/codex-plugin/skills/dotnet.md.twig +++ /dev/null @@ -1,2 +0,0 @@ -{% set skillName = 'dotnet' %} -{{ include('agent-skills/dotnet.md.twig') }} diff --git a/templates/codex-plugin/skills/go.md.twig b/templates/codex-plugin/skills/go.md.twig deleted file mode 100644 index 68a2dee6c2..0000000000 --- a/templates/codex-plugin/skills/go.md.twig +++ /dev/null @@ -1,2 +0,0 @@ -{% set skillName = 'go' %} -{{ include('agent-skills/go.md.twig') }} diff --git a/templates/codex-plugin/skills/kotlin.md.twig b/templates/codex-plugin/skills/kotlin.md.twig deleted file mode 100644 index 72fa75cc30..0000000000 --- a/templates/codex-plugin/skills/kotlin.md.twig +++ /dev/null @@ -1,2 +0,0 @@ -{% set skillName = 'kotlin' %} -{{ include('agent-skills/kotlin.md.twig') }} diff --git a/templates/codex-plugin/skills/php.md.twig b/templates/codex-plugin/skills/php.md.twig deleted file mode 100644 index 11a1b96527..0000000000 --- a/templates/codex-plugin/skills/php.md.twig +++ /dev/null @@ -1,2 +0,0 @@ -{% set skillName = 'php' %} -{{ include('agent-skills/php.md.twig') }} diff --git a/templates/codex-plugin/skills/python.md.twig b/templates/codex-plugin/skills/python.md.twig deleted file mode 100644 index 70a8bd4d64..0000000000 --- a/templates/codex-plugin/skills/python.md.twig +++ /dev/null @@ -1,2 +0,0 @@ -{% set skillName = 'python' %} -{{ include('agent-skills/python.md.twig') }} diff --git a/templates/codex-plugin/skills/ruby.md.twig b/templates/codex-plugin/skills/ruby.md.twig deleted file mode 100644 index 67aca7777c..0000000000 --- a/templates/codex-plugin/skills/ruby.md.twig +++ /dev/null @@ -1,2 +0,0 @@ -{% set skillName = 'ruby' %} -{{ include('agent-skills/ruby.md.twig') }} diff --git a/templates/codex-plugin/skills/rust.md.twig b/templates/codex-plugin/skills/rust.md.twig deleted file mode 100644 index 2741bb8685..0000000000 --- a/templates/codex-plugin/skills/rust.md.twig +++ /dev/null @@ -1,2 +0,0 @@ -{% set skillName = 'rust' %} -{{ include('agent-skills/rust.md.twig') }} diff --git a/templates/codex-plugin/skills/swift.md.twig b/templates/codex-plugin/skills/swift.md.twig deleted file mode 100644 index 76a27aa498..0000000000 --- a/templates/codex-plugin/skills/swift.md.twig +++ /dev/null @@ -1,2 +0,0 @@ -{% set skillName = 'swift' %} -{{ include('agent-skills/swift.md.twig') }} diff --git a/templates/codex-plugin/skills/typescript.md.twig b/templates/codex-plugin/skills/typescript.md.twig deleted file mode 100644 index 130bd52bea..0000000000 --- a/templates/codex-plugin/skills/typescript.md.twig +++ /dev/null @@ -1,2 +0,0 @@ -{% set skillName = 'typescript' %} -{{ include('agent-skills/typescript.md.twig') }} From 0dc5b9e1ca0c7dccbe8c7973c7439c9bb6be2b34 Mon Sep 17 00:00:00 2001 From: adityaoberai Date: Wed, 29 Apr 2026 18:53:40 +0530 Subject: [PATCH 07/16] Add marketplace file --- src/SDK/Language/CodexPlugin.php | 6 ++++++ templates/codex-plugin/README.md.twig | 3 +++ templates/codex-plugin/marketplace.json.twig | 20 ++++++++++++++++++++ 3 files changed, 29 insertions(+) create mode 100644 templates/codex-plugin/marketplace.json.twig diff --git a/src/SDK/Language/CodexPlugin.php b/src/SDK/Language/CodexPlugin.php index ce8f6f7f77..15ef0917ce 100644 --- a/src/SDK/Language/CodexPlugin.php +++ b/src/SDK/Language/CodexPlugin.php @@ -47,6 +47,12 @@ public function getFiles(): array 'template' => 'codex-plugin/plugin.json.twig', ]; + $files[] = [ + 'scope' => 'default', + 'destination' => '.agents/plugins/marketplace.json', + 'template' => 'codex-plugin/marketplace.json.twig', + ]; + $files[] = [ 'scope' => 'default', 'destination' => '.mcp.json', diff --git a/templates/codex-plugin/README.md.twig b/templates/codex-plugin/README.md.twig index 3e8b634bd8..d9e9985704 100644 --- a/templates/codex-plugin/README.md.twig +++ b/templates/codex-plugin/README.md.twig @@ -25,6 +25,7 @@ skills/ # Codex skills (auto-loaded by descript |-- {{ spec.title | caseLower }}-deploy-site/SKILL.md `-- {{ spec.title | caseLower }}-deploy-function/SKILL.md .codex-plugin/plugin.json # Codex plugin manifest +.agents/plugins/marketplace.json # Local marketplace manifest .mcp.json # MCP server config for plugin installs config.toml # MCP server config snippet for manual installs ``` @@ -33,6 +34,8 @@ config.toml # MCP server config snippet for manual Codex plugins include a `.codex-plugin/plugin.json` manifest for plugin installation. For manual installs, Codex CLI loads skills from `~/.codex/skills/` and reads MCP server configuration from `~/.codex/config.toml`. Install the generated files manually by copying them into those locations. +To install through a local Codex marketplace, add this directory as a marketplace source using the generated `.agents/plugins/marketplace.json` file. + ### macOS / Linux ```sh diff --git a/templates/codex-plugin/marketplace.json.twig b/templates/codex-plugin/marketplace.json.twig new file mode 100644 index 0000000000..2b131aa80e --- /dev/null +++ b/templates/codex-plugin/marketplace.json.twig @@ -0,0 +1,20 @@ +{ + "name": "{{ spec.title | caseLower }}", + "interface": { + "displayName": "{{ spec.title }}" + }, + "plugins": [ + { + "name": "{{ spec.title | caseLower }}", + "source": { + "source": "local", + "path": "./" + }, + "policy": { + "installation": "AVAILABLE", + "authentication": "ON_INSTALL" + }, + "category": "Developer Tools" + } + ] +} From 3c1bc3aec973d060b358bce30de6247a601bf056 Mon Sep 17 00:00:00 2001 From: adityaoberai Date: Wed, 29 Apr 2026 19:00:04 +0530 Subject: [PATCH 08/16] Fix paths for skills and MCP servers in plugin.json.twig --- templates/codex-plugin/plugin.json.twig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/codex-plugin/plugin.json.twig b/templates/codex-plugin/plugin.json.twig index 6bb00fd32e..89df8c3938 100644 --- a/templates/codex-plugin/plugin.json.twig +++ b/templates/codex-plugin/plugin.json.twig @@ -16,8 +16,8 @@ "mcp", "skills" ], - "skills": "./skills/", - "mcpServers": "./.mcp.json", + "skills": "../skills/", + "mcpServers": "../.mcp.json", "interface": { "displayName": "{{ spec.title }}", "shortDescription": "{{ spec.title }} SDK skills, MCP servers, and deployment workflow skills for Codex.", From 187272301b71dc3c7057dcd8db4d247c6415add4 Mon Sep 17 00:00:00 2001 From: adityaoberai Date: Wed, 29 Apr 2026 22:01:57 +0530 Subject: [PATCH 09/16] Update marketplace.json.twig to correct plugin source path --- templates/codex-plugin/marketplace.json.twig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/codex-plugin/marketplace.json.twig b/templates/codex-plugin/marketplace.json.twig index 2b131aa80e..6799e2f088 100644 --- a/templates/codex-plugin/marketplace.json.twig +++ b/templates/codex-plugin/marketplace.json.twig @@ -8,7 +8,7 @@ "name": "{{ spec.title | caseLower }}", "source": { "source": "local", - "path": "./" + "path": "../../.codex-plugin" }, "policy": { "installation": "AVAILABLE", From 73e2fa31bc2395382395cd42dcb3d250a1b0b640 Mon Sep 17 00:00:00 2001 From: adityaoberai Date: Wed, 29 Apr 2026 22:54:31 +0530 Subject: [PATCH 10/16] Fix license --- templates/claude-plugin/README.md.twig | 2 +- templates/codex-plugin/README.md.twig | 2 +- templates/cursor-plugin/LICENSE.twig | 25 ++++++++----------------- 3 files changed, 10 insertions(+), 19 deletions(-) diff --git a/templates/claude-plugin/README.md.twig b/templates/claude-plugin/README.md.twig index f17bd4b895..268e3b20ab 100644 --- a/templates/claude-plugin/README.md.twig +++ b/templates/claude-plugin/README.md.twig @@ -113,4 +113,4 @@ This library is auto-generated by Appwrite custom [SDK Generator](https://github ## License -Please see the [MIT license](LICENSE) file for more information. +Please see the [{{spec.licenseName}} license]({{spec.licenseURL}}) file for more information. diff --git a/templates/codex-plugin/README.md.twig b/templates/codex-plugin/README.md.twig index d9e9985704..462a0cd560 100644 --- a/templates/codex-plugin/README.md.twig +++ b/templates/codex-plugin/README.md.twig @@ -112,4 +112,4 @@ This library is auto-generated by Appwrite custom [SDK Generator](https://github ## License -Please see the [MIT license](LICENSE) file for more information. +Please see the [{{spec.licenseName}} license]({{spec.licenseURL}}) file for more information. diff --git a/templates/cursor-plugin/LICENSE.twig b/templates/cursor-plugin/LICENSE.twig index 989ddf87ba..6f8702b5f2 100644 --- a/templates/cursor-plugin/LICENSE.twig +++ b/templates/cursor-plugin/LICENSE.twig @@ -1,21 +1,12 @@ -MIT License +Copyright (c) 2026 Appwrite (https://appwrite.io) and individual contributors. +All rights reserved. -Copyright (c) 2026 Appwrite +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: + 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. + 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -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. \ No newline at end of file + 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file From 03cba996e40a7b6ac3835f39cd52c6c3f8282b14 Mon Sep 17 00:00:00 2001 From: Atharva Deosthale Date: Thu, 30 Apr 2026 00:26:05 +0530 Subject: [PATCH 11/16] fix plugin and marketplace install --- src/SDK/Language/CodexPlugin.php | 12 ++++++------ templates/codex-plugin/marketplace.json.twig | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/SDK/Language/CodexPlugin.php b/src/SDK/Language/CodexPlugin.php index 15ef0917ce..0a73081f4d 100644 --- a/src/SDK/Language/CodexPlugin.php +++ b/src/SDK/Language/CodexPlugin.php @@ -36,14 +36,14 @@ public function getFiles(): array foreach ($languages as $lang) { $files[] = [ 'scope' => 'default', - 'destination' => 'skills/{{ spec.title | caseLower }}-' . $lang . '/SKILL.md', + 'destination' => 'plugins/{{ spec.title | caseLower }}/skills/{{ spec.title | caseLower }}-' . $lang . '/SKILL.md', 'template' => 'agent-skills/' . $lang . '.md.twig', ]; } $files[] = [ 'scope' => 'default', - 'destination' => '.codex-plugin/plugin.json', + 'destination' => 'plugins/{{ spec.title | caseLower }}/.codex-plugin/plugin.json', 'template' => 'codex-plugin/plugin.json.twig', ]; @@ -55,25 +55,25 @@ public function getFiles(): array $files[] = [ 'scope' => 'default', - 'destination' => '.mcp.json', + 'destination' => 'plugins/{{ spec.title | caseLower }}/.mcp.json', 'template' => 'codex-plugin/.mcp.json.twig', ]; $files[] = [ 'scope' => 'default', - 'destination' => 'skills/{{ spec.title | caseLower }}-deploy-site/SKILL.md', + 'destination' => 'plugins/{{ spec.title | caseLower }}/skills/{{ spec.title | caseLower }}-deploy-site/SKILL.md', 'template' => 'codex-plugin/skills/deploy-site.md.twig', ]; $files[] = [ 'scope' => 'default', - 'destination' => 'skills/{{ spec.title | caseLower }}-deploy-function/SKILL.md', + 'destination' => 'plugins/{{ spec.title | caseLower }}/skills/{{ spec.title | caseLower }}-deploy-function/SKILL.md', 'template' => 'codex-plugin/skills/deploy-function.md.twig', ]; $files[] = [ 'scope' => 'default', - 'destination' => 'config.toml', + 'destination' => 'plugins/{{ spec.title | caseLower }}/config.toml', 'template' => 'codex-plugin/config.toml.twig', ]; diff --git a/templates/codex-plugin/marketplace.json.twig b/templates/codex-plugin/marketplace.json.twig index 6799e2f088..710b76ac31 100644 --- a/templates/codex-plugin/marketplace.json.twig +++ b/templates/codex-plugin/marketplace.json.twig @@ -8,7 +8,7 @@ "name": "{{ spec.title | caseLower }}", "source": { "source": "local", - "path": "../../.codex-plugin" + "path": "./plugins/{{ spec.title | caseLower }}" }, "policy": { "installation": "AVAILABLE", From f267936d2ce2978f21ed388d6b1a49e3cc23490f Mon Sep 17 00:00:00 2001 From: Aditya Oberai Date: Thu, 30 Apr 2026 02:20:00 +0530 Subject: [PATCH 12/16] Update templates/codex-plugin/plugin.json.twig Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> --- templates/codex-plugin/plugin.json.twig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/codex-plugin/plugin.json.twig b/templates/codex-plugin/plugin.json.twig index 89df8c3938..c924be7b7d 100644 --- a/templates/codex-plugin/plugin.json.twig +++ b/templates/codex-plugin/plugin.json.twig @@ -9,7 +9,7 @@ }, "homepage": "https://appwrite.io/docs/tooling/ai/ai-dev-tools/codex", "repository": "https://github.com/{{ sdk.gitUserName }}/{{ sdk.gitRepoName }}", - "license": "MIT", + "license": "{{ spec.licenseName }}", "keywords": [ "{{ spec.title | caseLower }}", "codex", From 5a79d5e51a2ab0d9adae4fc249feedcdc53e50e1 Mon Sep 17 00:00:00 2001 From: adityaoberai Date: Thu, 30 Apr 2026 02:24:00 +0530 Subject: [PATCH 13/16] Reflect correct plugin directory structure and installation steps in the readme --- templates/codex-plugin/README.md.twig | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/templates/codex-plugin/README.md.twig b/templates/codex-plugin/README.md.twig index 462a0cd560..eb75c76ae1 100644 --- a/templates/codex-plugin/README.md.twig +++ b/templates/codex-plugin/README.md.twig @@ -10,7 +10,7 @@ ## Structure ```text -skills/ # Codex skills (auto-loaded by description match) +plugins/{{ spec.title | caseLower }}/skills/ # Codex skills (auto-loaded by description match) |-- {{ spec.title | caseLower }}-typescript/SKILL.md |-- {{ spec.title | caseLower }}-dart/SKILL.md |-- {{ spec.title | caseLower }}-kotlin/SKILL.md @@ -24,10 +24,10 @@ skills/ # Codex skills (auto-loaded by descript |-- {{ spec.title | caseLower }}-cli/SKILL.md |-- {{ spec.title | caseLower }}-deploy-site/SKILL.md `-- {{ spec.title | caseLower }}-deploy-function/SKILL.md -.codex-plugin/plugin.json # Codex plugin manifest +plugins/{{ spec.title | caseLower }}/.codex-plugin/plugin.json # Codex plugin manifest .agents/plugins/marketplace.json # Local marketplace manifest -.mcp.json # MCP server config for plugin installs -config.toml # MCP server config snippet for manual installs +plugins/{{ spec.title | caseLower }}/.mcp.json # MCP server config for plugin installs +plugins/{{ spec.title | caseLower }}/config.toml # MCP server config snippet for manual installs ``` ## Installation @@ -41,11 +41,11 @@ To install through a local Codex marketplace, add this directory as a marketplac ```sh # Copy skills mkdir -p ~/.codex/skills -cp -R skills/* ~/.codex/skills/ +cp -R plugins/{{ spec.title | caseLower }}/skills/* ~/.codex/skills/ # Append the MCP config snippet to your Codex config mkdir -p ~/.codex -cat config.toml >> ~/.codex/config.toml +cat plugins/{{ spec.title | caseLower }}/config.toml >> ~/.codex/config.toml ``` ### Windows (PowerShell) @@ -53,18 +53,18 @@ cat config.toml >> ~/.codex/config.toml ```powershell # Copy skills New-Item -ItemType Directory -Force -Path "$HOME\.codex\skills" | Out-Null -Copy-Item -Recurse skills\* "$HOME\.codex\skills\" +Copy-Item -Recurse plugins\{{ spec.title | caseLower }}\skills\* "$HOME\.codex\skills\" # Append the MCP config snippet to your Codex config New-Item -ItemType Directory -Force -Path "$HOME\.codex" | Out-Null -Get-Content config.toml | Add-Content "$HOME\.codex\config.toml" +Get-Content plugins\{{ spec.title | caseLower }}\config.toml | Add-Content "$HOME\.codex\config.toml" ``` After copying `config.toml`, edit `~/.codex/config.toml` and replace ``, ``, and the `` portion of the endpoint with your {{ spec.title }} credentials. ## Included Skills -Each skill ships as `skills/{{ spec.title | caseLower }}-/SKILL.md`. Codex loads them based on the `description` field in the frontmatter, so they activate automatically when a session is about Appwrite work in that language: +Each skill ships as `plugins/{{ spec.title | caseLower }}/skills/{{ spec.title | caseLower }}-/SKILL.md`. Codex loads them based on the `description` field in the frontmatter, so they activate automatically when a session is about Appwrite work in that language: - `{{ spec.title | caseLower }}-typescript` - `{{ spec.title | caseLower }}-dart` @@ -93,7 +93,7 @@ Use these to walk through deploying {{ spec.title }} sites and functions with th ## Included MCP Servers -The bundled `config.toml` registers two MCP servers: +The bundled `plugins/{{ spec.title | caseLower }}/config.toml` registers two MCP servers: - `{{ spec.title | caseLower }}-api` runs `uvx mcp-server-appwrite` against your project. Set `{{ spec.title | caseUpper }}_ENDPOINT`, `{{ spec.title | caseUpper }}_PROJECT_ID`, and `{{ spec.title | caseUpper }}_API_KEY` in the `env` block. - `{{ spec.title | caseLower }}-docs` proxies `https://mcp-for-docs.appwrite.io` through `npx mcp-remote` so Codex can search the {{ spec.title }} documentation. From 330cd8ad50417a1dd7371d168814212ebc99518c Mon Sep 17 00:00:00 2001 From: adityaoberai Date: Tue, 5 May 2026 18:01:32 +0530 Subject: [PATCH 14/16] Remove API MCP server --- templates/codex-plugin/.mcp.json.twig | 12 ------------ templates/codex-plugin/README.md.twig | 9 +++------ templates/codex-plugin/config.toml.twig | 7 ------- 3 files changed, 3 insertions(+), 25 deletions(-) diff --git a/templates/codex-plugin/.mcp.json.twig b/templates/codex-plugin/.mcp.json.twig index 9cc9f997fa..868f609089 100644 --- a/templates/codex-plugin/.mcp.json.twig +++ b/templates/codex-plugin/.mcp.json.twig @@ -1,17 +1,5 @@ { "mcpServers": { - "{{ spec.title | caseLower }}-api": { - "type": "stdio", - "command": "uvx", - "args": [ - "mcp-server-appwrite" - ], - "env": { - "{{ spec.title | caseUpper }}_ENDPOINT": "https://.cloud.appwrite.io/v1", - "{{ spec.title | caseUpper }}_PROJECT_ID": "", - "{{ spec.title | caseUpper }}_API_KEY": "" - } - }, "{{ spec.title | caseLower }}-docs": { "type": "http", "url": "https://mcp-for-docs.appwrite.io" diff --git a/templates/codex-plugin/README.md.twig b/templates/codex-plugin/README.md.twig index eb75c76ae1..8cfed0027b 100644 --- a/templates/codex-plugin/README.md.twig +++ b/templates/codex-plugin/README.md.twig @@ -5,7 +5,7 @@ [![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) -{{ spec.title }} tools for the [OpenAI Codex CLI](https://github.com/openai/codex). This plugin packages {{ spec.title }} SDK skills, {{ spec.title }} deployment workflow skills, and {{ spec.title }} MCP servers. +{{ spec.title }} tools for the [OpenAI Codex CLI](https://github.com/openai/codex). This plugin packages {{ spec.title }} SDK skills, {{ spec.title }} deployment workflow skills, and the {{ spec.title }} docs MCP server. ## Structure @@ -60,8 +60,6 @@ New-Item -ItemType Directory -Force -Path "$HOME\.codex" | Out-Null Get-Content plugins\{{ spec.title | caseLower }}\config.toml | Add-Content "$HOME\.codex\config.toml" ``` -After copying `config.toml`, edit `~/.codex/config.toml` and replace ``, ``, and the `` portion of the endpoint with your {{ spec.title }} credentials. - ## Included Skills Each skill ships as `plugins/{{ spec.title | caseLower }}/skills/{{ spec.title | caseLower }}-/SKILL.md`. Codex loads them based on the `description` field in the frontmatter, so they activate automatically when a session is about Appwrite work in that language: @@ -93,9 +91,8 @@ Use these to walk through deploying {{ spec.title }} sites and functions with th ## Included MCP Servers -The bundled `plugins/{{ spec.title | caseLower }}/config.toml` registers two MCP servers: +The bundled `plugins/{{ spec.title | caseLower }}/config.toml` registers one MCP server: -- `{{ spec.title | caseLower }}-api` runs `uvx mcp-server-appwrite` against your project. Set `{{ spec.title | caseUpper }}_ENDPOINT`, `{{ spec.title | caseUpper }}_PROJECT_ID`, and `{{ spec.title | caseUpper }}_API_KEY` in the `env` block. - `{{ spec.title | caseLower }}-docs` proxies `https://mcp-for-docs.appwrite.io` through `npx mcp-remote` so Codex can search the {{ spec.title }} documentation. ## Verify @@ -104,7 +101,7 @@ After copying, run `codex` and check: - A session about {{ spec.title }} TypeScript work loads the `{{ spec.title | caseLower }}-typescript` skill (visible in the session header). - Typing `$` lets you invoke the `{{ spec.title | caseLower }}-deploy-*` skills explicitly. -- `codex mcp list` (or `codex --debug`) lists the `{{ spec.title | caseLower }}-api` and `{{ spec.title | caseLower }}-docs` servers. +- `codex mcp list` (or `codex --debug`) lists the `{{ spec.title | caseLower }}-docs` server. ## Contribution diff --git a/templates/codex-plugin/config.toml.twig b/templates/codex-plugin/config.toml.twig index bd03b3dc9f..e7ec19d95e 100644 --- a/templates/codex-plugin/config.toml.twig +++ b/templates/codex-plugin/config.toml.twig @@ -1,13 +1,6 @@ # {{ spec.title }} Codex CLI configuration # # Merge the contents of this file into your ~/.codex/config.toml. -# Replace the placeholder values with your {{ spec.title }} project credentials -# before launching Codex. - -[mcp_servers.{{ spec.title | caseLower }}-api] -command = "uvx" -args = ["mcp-server-appwrite"] -env = { {{ spec.title | caseUpper }}_ENDPOINT = "https://.cloud.appwrite.io/v1", {{ spec.title | caseUpper }}_PROJECT_ID = "", {{ spec.title | caseUpper }}_API_KEY = "" } [mcp_servers.{{ spec.title | caseLower }}-docs] command = "npx" From 16d18edd2eee508570635689950db6de37bc0e60 Mon Sep 17 00:00:00 2001 From: Aditya Oberai Date: Tue, 5 May 2026 18:09:00 +0530 Subject: [PATCH 15/16] Update templates/codex-plugin/marketplace.json.twig Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> --- templates/codex-plugin/marketplace.json.twig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/codex-plugin/marketplace.json.twig b/templates/codex-plugin/marketplace.json.twig index 710b76ac31..a1a96f8a88 100644 --- a/templates/codex-plugin/marketplace.json.twig +++ b/templates/codex-plugin/marketplace.json.twig @@ -8,7 +8,7 @@ "name": "{{ spec.title | caseLower }}", "source": { "source": "local", - "path": "./plugins/{{ spec.title | caseLower }}" + "path": "../../plugins/{{ spec.title | caseLower }}" }, "policy": { "installation": "AVAILABLE", From ea0bfbfaa32ba5fcfae335e98afab4e2352643e5 Mon Sep 17 00:00:00 2001 From: adityaoberai Date: Fri, 8 May 2026 00:51:05 +0530 Subject: [PATCH 16/16] Reuse shared deploy templates for Codex plugin --- src/SDK/Language/CodexPlugin.php | 6 +- .../skills/deploy-function.md.twig | 134 ------------------ .../codex-plugin/skills/deploy-site.md.twig | 121 ---------------- 3 files changed, 3 insertions(+), 258 deletions(-) delete mode 100644 templates/codex-plugin/skills/deploy-function.md.twig delete mode 100644 templates/codex-plugin/skills/deploy-site.md.twig diff --git a/src/SDK/Language/CodexPlugin.php b/src/SDK/Language/CodexPlugin.php index 0a73081f4d..e6ce4c64d6 100644 --- a/src/SDK/Language/CodexPlugin.php +++ b/src/SDK/Language/CodexPlugin.php @@ -62,13 +62,13 @@ public function getFiles(): array $files[] = [ 'scope' => 'default', 'destination' => 'plugins/{{ spec.title | caseLower }}/skills/{{ spec.title | caseLower }}-deploy-site/SKILL.md', - 'template' => 'codex-plugin/skills/deploy-site.md.twig', + 'template' => 'plugin/commands/deploy-site.md.twig', ]; $files[] = [ 'scope' => 'default', 'destination' => 'plugins/{{ spec.title | caseLower }}/skills/{{ spec.title | caseLower }}-deploy-function/SKILL.md', - 'template' => 'codex-plugin/skills/deploy-function.md.twig', + 'template' => 'plugin/commands/deploy-function.md.twig', ]; $files[] = [ @@ -92,7 +92,7 @@ public function getFiles(): array $files[] = [ 'scope' => 'default', 'destination' => 'LICENSE', - 'template' => 'cursor-plugin/LICENSE.twig', + 'template' => 'plugin/LICENSE.twig', ]; return $files; diff --git a/templates/codex-plugin/skills/deploy-function.md.twig b/templates/codex-plugin/skills/deploy-function.md.twig deleted file mode 100644 index c5d9ba523d..0000000000 --- a/templates/codex-plugin/skills/deploy-function.md.twig +++ /dev/null @@ -1,134 +0,0 @@ ---- -name: {{ spec.title | caseLower }}-deploy-function -description: Deploy {{ spec.title }} functions using the {{ spec.title }} CLI. Use when the user wants to initialize, configure, push, manage, execute, or troubleshoot {{ spec.title }} Functions deployments. ---- - -# Deploy a function using the {{ spec.title }} CLI - -## Prerequisites - -- {{ spec.title }} 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": "", - "endpoint": "https://.cloud.appwrite.io/v1", - "functions": [ - { - "$id": "", - "name": "userAuth", - "enabled": true, - "live": true, - "logging": true, - "runtime": "node-18.0", - "deployment": "", - "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://.cloud.appwrite.io/v1 \ - --project-id \ - --key -``` - -Then deploy non-interactively: - -```sh -# Push all functions -appwrite push functions --all --force - -# Push a specific function -appwrite push functions --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 ` | 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 | - -## Deployment Commands - -| Command | Description | -|---------|-------------| -| `appwrite functions list-deployments --function-id ` | List all deployments | -| `appwrite functions create-deployment --function-id ` | Upload a new deployment | -| `appwrite functions get-deployment --function-id --deployment-id ` | Get a 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 contents | - -## Execution Commands - -| Command | Description | -|---------|-------------| -| `appwrite functions list-executions --function-id ` | List recent executions | -| `appwrite functions create-execution --function-id ` | Trigger a function execution | -| `appwrite functions get-execution --function-id --execution-id ` | Get execution details | - -## Environment Variables - -| Command | Description | -|---------|-------------| -| `appwrite functions list-variables --function-id ` | List all variables | -| `appwrite functions create-variable --function-id --key --value ` | Create a variable | -| `appwrite functions get-variable --function-id --variable-id ` | Get a variable | -| `appwrite functions update-variable --function-id --variable-id --key --value ` | Update a variable | -| `appwrite functions delete-variable --function-id --variable-id ` | Delete a variable | diff --git a/templates/codex-plugin/skills/deploy-site.md.twig b/templates/codex-plugin/skills/deploy-site.md.twig deleted file mode 100644 index 096b616182..0000000000 --- a/templates/codex-plugin/skills/deploy-site.md.twig +++ /dev/null @@ -1,121 +0,0 @@ ---- -name: {{ spec.title | caseLower }}-deploy-site -description: Deploy {{ spec.title }} sites using the {{ spec.title }} CLI. Use when the user wants to initialize, configure, push, manage, or troubleshoot {{ spec.title }} Sites deployments. ---- - -# Deploy a site using the {{ spec.title }} CLI - -## Prerequisites - -- {{ spec.title }} CLI installed (`npm install -g appwrite-cli`) -- Authenticated with `appwrite login` -- Project initialized with `appwrite init` - -## Quick Deploy - -```sh -appwrite push sites -``` - -## Full Workflow - -### 1. Initialize a new site - -```sh -appwrite init sites -``` - -### 2. Pull existing sites from Console - -```sh -appwrite pull sites -``` - -### 3. Configuration - -Sites are configured in `appwrite.config.json`: - -```json -{ - "projectId": "", - "endpoint": "https://.cloud.appwrite.io/v1", - "sites": [ - { - "$id": "", - "name": "My Site", - "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/my-site" - } - ] -} -``` - -### 4. Deploy - -```sh -appwrite push sites -``` - -## CI/CD (Non-Interactive) - -Set up headless mode first: - -```sh -appwrite client \ - --endpoint https://.cloud.appwrite.io/v1 \ - --project-id \ - --key -``` - -Then deploy non-interactively: - -```sh -# Push all sites -appwrite push sites --all --force - -# Push a specific site -appwrite push sites --site-id --force -``` - -## Site Management Commands - -| Command | Description | -|---------|-------------| -| `appwrite sites list` | List all sites in the project | -| `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 site specifications | - -## Deployment Commands - -| Command | Description | -|---------|-------------| -| `appwrite sites list-deployments --site-id ` | List all deployments | -| `appwrite sites create-deployment --site-id ` | Create a new deployment | -| `appwrite sites get-deployment --site-id --deployment-id ` | Get a deployment | -| `appwrite sites delete-deployment --site-id --deployment-id ` | Delete a deployment | -| `appwrite sites update-site-deployment --site-id --deployment-id ` | Set active deployment | -| `appwrite sites update-deployment-status --site-id --deployment-id ` | Cancel an ongoing build | - -## Environment Variables - -| Command | Description | -|---------|-------------| -| `appwrite sites list-variables --site-id ` | List all variables | -| `appwrite sites create-variable --site-id --key --value ` | Create a variable | -| `appwrite sites get-variable --site-id --variable-id ` | Get a variable | -| `appwrite sites update-variable --site-id --variable-id --key --value ` | Update a variable | -| `appwrite sites delete-variable --site-id --variable-id ` | Delete a variable |