Skip to content

Commit b00206e

Browse files
committed
add gemini cli extension
1 parent e1aafb7 commit b00206e

3 files changed

Lines changed: 74 additions & 0 deletions

File tree

‎README.md‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ This repository is a portable [Agent Plugin](https://agent-plugins.org/) package
1717
| `.claude-plugin/plugin.json` | Claude Code plugin manifest. |
1818
| `.cursor-plugin/plugin.json` | Cursor Marketplace manifest. |
1919
| `.grok-plugin/plugin.json` | Grok Build marketplace manifest. |
20+
| `gemini-extension.json` | Gemini CLI extension manifest. |
2021
| `kimi.plugin.json` | Kimi Code plugin manifest. |
2122
| `skills/hcti-image-generation/` | Image generation and template workflow guidance. |
2223
| `skills/hcti-open-graph-images/` | Dynamic Open Graph image configuration guidance. |
@@ -40,6 +41,18 @@ Run `/mcp-config login hcti` and complete authorization in your browser. Then us
4041

4142
To test a local checkout, use `/plugins install /path/to/agent-plugins`. Kimi copies installed plugins into its managed plugin directory, so reinstall after changing the local source.
4243

44+
## Gemini CLI
45+
46+
Install the extension directly from GitHub:
47+
48+
```bash
49+
gemini extensions install https://github.com/htmlcsstoimage/agent-plugins
50+
```
51+
52+
Restart Gemini CLI, run `/extensions list` to confirm the extension is enabled, then run `/mcp auth hcti` and complete authorization in your browser. Use `/mcp list` to confirm the HCTI tools are connected. Gemini CLI automatically discovers the included HCTI Agent Skills.
53+
54+
To test a local checkout during development, run `gemini extensions link /path/to/agent-plugins`, restart Gemini CLI, and inspect it with `/extensions list`.
55+
4356
## GitHub Copilot
4457

4558
### Install a local checkout
@@ -187,6 +200,7 @@ Our AI agent plugins are registered in the [HOL Plugin Registry](https://hol.org
187200
- [Official ChatGPT and Codex plugin](https://chatgpt.com/plugins/plugin_asdk_app_6a4d168031448191abcd6540497efb7b)
188201
- [OpenAI plugin packaging documentation](https://developers.openai.com/codex/plugins/build)
189202
- [Kimi Code plugin documentation](https://github.com/MoonshotAI/kimi-code/blob/main/docs/en/customization/plugins.md)
203+
- [Gemini CLI extension documentation](https://geminicli.com/docs/extensions/)
190204
- [GitHub Copilot plugin documentation](https://docs.github.com/en/copilot/concepts/agents/about-plugins)
191205
- [Cline MCP installation instructions](llms-install.md)
192206
- [Cursor plugin documentation](https://cursor.com/docs/plugins)

‎gemini-extension.json‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"name": "html-css-to-image",
3+
"version": "0.2.0",
4+
"description": "Create images, website screenshots, and PDFs from HTML/CSS, URLs, or reusable templates.",
5+
"mcpServers": {
6+
"hcti": {
7+
"type": "http",
8+
"url": "https://mcp.hcti.io",
9+
"description": "Hosted HTML/CSS to Image MCP server with browser-based OAuth."
10+
}
11+
}
12+
}

‎scripts/validate-template.mjs‎

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -426,6 +426,53 @@ async function validateKimiAdapter(expectedName, expectedVersion) {
426426
}
427427
}
428428

429+
async function validateGeminiAdapter(expectedName, expectedVersion) {
430+
const manifestPath = path.join(repoRoot, "gemini-extension.json");
431+
const manifest = await readJsonFile(manifestPath, "Gemini CLI extension manifest");
432+
if (!manifest) {
433+
return;
434+
}
435+
436+
if (typeof manifest.name !== "string" || !marketplaceNamePattern.test(manifest.name)) {
437+
addError("Gemini CLI extension name must be lowercase kebab-case.");
438+
} else if (manifest.name !== expectedName) {
439+
addError(`Gemini CLI extension name "${manifest.name}" does not match "${expectedName}".`);
440+
}
441+
442+
for (const field of ["version", "description"]) {
443+
if (typeof manifest[field] !== "string" || manifest[field].trim().length === 0) {
444+
addError(`Gemini CLI extension: "${field}" is required.`);
445+
}
446+
}
447+
448+
if (manifest.version !== expectedVersion) {
449+
addError(
450+
`Gemini CLI extension version "${manifest.version}" does not match adapter version "${expectedVersion}".`
451+
);
452+
}
453+
454+
if (!manifest.mcpServers || typeof manifest.mcpServers !== "object" || Array.isArray(manifest.mcpServers)) {
455+
addError('Gemini CLI extension must contain an "mcpServers" object.');
456+
return;
457+
}
458+
459+
const hctiServer = manifest.mcpServers.hcti;
460+
if (!hctiServer || typeof hctiServer !== "object" || Array.isArray(hctiServer)) {
461+
addError('Gemini CLI extension must declare the "hcti" MCP server.');
462+
return;
463+
}
464+
465+
if (hctiServer.type !== "http") {
466+
addError('Gemini CLI MCP server "hcti" must use type "http" for Streamable HTTP.');
467+
}
468+
if (typeof hctiServer.url !== "string" || !hctiServer.url.startsWith("https://")) {
469+
addError('Gemini CLI MCP server "hcti" must use an HTTPS URL.');
470+
}
471+
if (hctiServer.command || hctiServer.headers || hctiServer.env) {
472+
addError('Gemini CLI MCP server "hcti" must use hosted OAuth without a local command, headers, or environment variables.');
473+
}
474+
}
475+
429476
async function main() {
430477
const marketplacePath = path.join(repoRoot, ".cursor-plugin", "marketplace.json");
431478
const rootManifestPath = path.join(repoRoot, ".cursor-plugin", "plugin.json");
@@ -441,6 +488,7 @@ async function main() {
441488
await validatePluginDirectory(repoRoot, expectedName, rootManifest);
442489
await validateClaudeAdapter(expectedName);
443490
await validateKimiAdapter(expectedName, rootManifest.version);
491+
await validateGeminiAdapter(expectedName, rootManifest.version);
444492
}
445493
summarizeAndExit();
446494
return;

0 commit comments

Comments
 (0)