-
Notifications
You must be signed in to change notification settings - Fork 200
Add codex plugin #1482
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Add codex plugin #1482
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
3f8af9f
Add codex plugin
adityaoberai 95f436e
Update templates/codex-plugin/plugin.json.twig
adityaoberai bc46d7b
Update templates/codex-plugin/skills/cli.md.twig
adityaoberai cc83b30
Update templates/codex-plugin/skills/deploy-site.md.twig
adityaoberai 09113f2
Add environment variable commands to deploy-function and deploy-site …
adityaoberai 098238a
Use agent skills templates directly instead of having separate files
adityaoberai 0dc5b9e
Add marketplace file
adityaoberai 3c1bc3a
Fix paths for skills and MCP servers in plugin.json.twig
adityaoberai 1872723
Update marketplace.json.twig to correct plugin source path
adityaoberai 73e2fa3
Fix license
adityaoberai 03cba99
fix plugin and marketplace install
atharvadeosthale f267936
Update templates/codex-plugin/plugin.json.twig
adityaoberai 5a79d5e
Reflect correct plugin directory structure and installation steps in …
adityaoberai 330cd8a
Remove API MCP server
adityaoberai 16d18ed
Update templates/codex-plugin/marketplace.json.twig
adityaoberai 8182a2f
Merge branch 'master' into codex-plugin
adityaoberai ea0bfbf
Reuse shared deploy templates for Codex plugin
adityaoberai File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,100 @@ | ||
| <?php | ||
|
|
||
| namespace Appwrite\SDK\Language; | ||
|
|
||
| class CodexPlugin extends AgentSkills | ||
| { | ||
| /** | ||
| * @return string | ||
| */ | ||
| public function getName(): string | ||
| { | ||
| return 'CodexPlugin'; | ||
| } | ||
|
|
||
| /** | ||
| * @return array | ||
| */ | ||
| public function getFiles(): array | ||
| { | ||
| $languages = [ | ||
| 'typescript', | ||
| 'dart', | ||
| 'kotlin', | ||
| 'swift', | ||
| 'php', | ||
| 'python', | ||
| 'ruby', | ||
| 'go', | ||
| 'rust', | ||
| 'dotnet', | ||
| 'cli', | ||
| ]; | ||
|
|
||
| $files = []; | ||
|
|
||
| foreach ($languages as $lang) { | ||
| $files[] = [ | ||
| 'scope' => 'default', | ||
| 'destination' => 'plugins/{{ spec.title | caseLower }}/skills/{{ spec.title | caseLower }}-' . $lang . '/SKILL.md', | ||
| 'template' => 'agent-skills/' . $lang . '.md.twig', | ||
| ]; | ||
| } | ||
|
|
||
| $files[] = [ | ||
| 'scope' => 'default', | ||
| 'destination' => 'plugins/{{ spec.title | caseLower }}/.codex-plugin/plugin.json', | ||
| 'template' => 'codex-plugin/plugin.json.twig', | ||
| ]; | ||
|
|
||
| $files[] = [ | ||
| 'scope' => 'default', | ||
| 'destination' => '.agents/plugins/marketplace.json', | ||
| 'template' => 'codex-plugin/marketplace.json.twig', | ||
| ]; | ||
|
|
||
| $files[] = [ | ||
| 'scope' => 'default', | ||
| 'destination' => 'plugins/{{ spec.title | caseLower }}/.mcp.json', | ||
| 'template' => 'codex-plugin/.mcp.json.twig', | ||
| ]; | ||
|
|
||
| $files[] = [ | ||
| 'scope' => 'default', | ||
| 'destination' => 'plugins/{{ spec.title | caseLower }}/skills/{{ spec.title | caseLower }}-deploy-site/SKILL.md', | ||
| 'template' => 'plugin/commands/deploy-site.md.twig', | ||
| ]; | ||
|
|
||
| $files[] = [ | ||
| 'scope' => 'default', | ||
| 'destination' => 'plugins/{{ spec.title | caseLower }}/skills/{{ spec.title | caseLower }}-deploy-function/SKILL.md', | ||
| 'template' => 'plugin/commands/deploy-function.md.twig', | ||
| ]; | ||
|
|
||
| $files[] = [ | ||
| 'scope' => 'default', | ||
| 'destination' => 'plugins/{{ spec.title | caseLower }}/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' => 'plugin/LICENSE.twig', | ||
| ]; | ||
|
|
||
| return $files; | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| { | ||
| "mcpServers": { | ||
| "{{ spec.title | caseLower }}-docs": { | ||
| "type": "http", | ||
| "url": "https://mcp-for-docs.appwrite.io" | ||
| } | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,112 @@ | ||
| # {{ spec.title }} Codex CLI Plugin | ||
|
|
||
|  | ||
|  | ||
| [](https://twitter.com/appwrite) | ||
| [](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 the {{ spec.title }} docs MCP server. | ||
|
|
||
| ## Structure | ||
|
|
||
| ```text | ||
| 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 | ||
| |-- {{ 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 | ||
| plugins/{{ spec.title | caseLower }}/.codex-plugin/plugin.json # Codex plugin manifest | ||
| .agents/plugins/marketplace.json # Local marketplace manifest | ||
| 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 | ||
|
|
||
| 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 | ||
| # Copy skills | ||
| mkdir -p ~/.codex/skills | ||
| cp -R plugins/{{ spec.title | caseLower }}/skills/* ~/.codex/skills/ | ||
|
|
||
| # Append the MCP config snippet to your Codex config | ||
| mkdir -p ~/.codex | ||
| cat plugins/{{ spec.title | caseLower }}/config.toml >> ~/.codex/config.toml | ||
| ``` | ||
|
|
||
| ### Windows (PowerShell) | ||
|
|
||
| ```powershell | ||
| # Copy skills | ||
| New-Item -ItemType Directory -Force -Path "$HOME\.codex\skills" | Out-Null | ||
| 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 plugins\{{ spec.title | caseLower }}\config.toml | Add-Content "$HOME\.codex\config.toml" | ||
| ``` | ||
|
greptile-apps[bot] marked this conversation as resolved.
|
||
|
|
||
| ## Included Skills | ||
|
|
||
| Each skill ships as `plugins/{{ spec.title | caseLower }}/skills/{{ spec.title | caseLower }}-<language>/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 `plugins/{{ spec.title | caseLower }}/config.toml` registers one MCP server: | ||
|
|
||
| - `{{ 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 }}-docs` server. | ||
|
|
||
| ## 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 [{{spec.licenseName}} license]({{spec.licenseURL}}) file for more information. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| # {{ spec.title }} Codex CLI configuration | ||
| # | ||
| # Merge the contents of this file into your ~/.codex/config.toml. | ||
|
|
||
| [mcp_servers.{{ spec.title | caseLower }}-docs] | ||
| command = "npx" | ||
| args = ["mcp-remote", "https://mcp-for-docs.appwrite.io"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| { | ||
| "name": "{{ spec.title | caseLower }}", | ||
| "interface": { | ||
| "displayName": "{{ spec.title }}" | ||
| }, | ||
| "plugins": [ | ||
| { | ||
| "name": "{{ spec.title | caseLower }}", | ||
| "source": { | ||
| "source": "local", | ||
| "path": "../../plugins/{{ spec.title | caseLower }}" | ||
| }, | ||
|
adityaoberai marked this conversation as resolved.
|
||
| "policy": { | ||
|
greptile-apps[bot] marked this conversation as resolved.
|
||
| "installation": "AVAILABLE", | ||
| "authentication": "ON_INSTALL" | ||
| }, | ||
| "category": "Developer Tools" | ||
| } | ||
| ] | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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/{{ sdk.gitUserName }}/{{ sdk.gitRepoName }}", | ||
| "license": "{{ spec.licenseName }}", | ||
| "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" | ||
| } | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.