feat: add Gemini CLI, OpenCode, and Windsurf IDE integrations

Gemini CLI: platform adapter mapping 6 of 11 hooks, settings.json
deep-merge installer, GEMINI.md context injection.

OpenCode: plugin with tool.execute.after interceptor, bus events for
session lifecycle, claude_mem_search custom tool, AGENTS.md context.

Windsurf: platform adapter for tool_info envelope format, hooks.json
installer for 5 post-action hooks, .windsurf/rules context injection.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Alex Newman
2026-02-27 00:03:29 -05:00
parent 3a09c1bb1a
commit f2cc33b494
11 changed files with 1936 additions and 10 deletions
+4 -6
View File
@@ -82,16 +82,15 @@ export function detectInstalledIDEs(): IDEInfo[] {
id: 'gemini-cli',
label: 'Gemini CLI',
detected: existsSync(join(home, '.gemini')),
supported: false,
hint: 'coming soon',
supported: true,
},
{
id: 'opencode',
label: 'OpenCode',
detected:
existsSync(join(home, '.config', 'opencode')) || isCommandInPath('opencode'),
supported: false,
hint: 'coming soon',
supported: true,
hint: 'plugin-based integration',
},
{
id: 'openclaw',
@@ -104,8 +103,7 @@ export function detectInstalledIDEs(): IDEInfo[] {
id: 'windsurf',
label: 'Windsurf',
detected: existsSync(join(home, '.codeium', 'windsurf')),
supported: false,
hint: 'coming soon',
supported: true,
},
{
id: 'codex-cli',
+35 -2
View File
@@ -85,7 +85,7 @@ function enablePluginInClaudeSettings(): void {
// IDE setup dispatcher
// ---------------------------------------------------------------------------
function setupIDEs(selectedIDEs: string[]): void {
async function setupIDEs(selectedIDEs: string[]): Promise<void> {
for (const ideId of selectedIDEs) {
switch (ideId) {
case 'claude-code':
@@ -99,6 +99,39 @@ function setupIDEs(selectedIDEs: string[]): void {
p.log.info(` Run: npx claude-mem cursor-setup (coming soon)`);
break;
case 'gemini-cli': {
const { installGeminiCliHooks } = await import('../../services/integrations/GeminiCliHooksInstaller.js');
const geminiResult = await installGeminiCliHooks();
if (geminiResult === 0) {
p.log.success('Gemini CLI: hooks installed.');
} else {
p.log.error('Gemini CLI: hook installation failed.');
}
break;
}
case 'opencode': {
const { installOpenCodeIntegration } = await import('../../services/integrations/OpenCodeInstaller.js');
const openCodeResult = await installOpenCodeIntegration();
if (openCodeResult === 0) {
p.log.success('OpenCode: plugin installed.');
} else {
p.log.error('OpenCode: plugin installation failed.');
}
break;
}
case 'windsurf': {
const { installWindsurfHooks } = await import('../../services/integrations/WindsurfHooksInstaller.js');
const windsurfResult = await installWindsurfHooks();
if (windsurfResult === 0) {
p.log.success('Windsurf: hooks installed.');
} else {
p.log.error('Windsurf: hook installation failed.');
}
break;
}
default: {
const allIDEs = detectInstalledIDEs();
const ide = allIDEs.find((i) => i.id === ideId);
@@ -350,7 +383,7 @@ export async function runInstallCommand(options: InstallOptions = {}): Promise<v
]);
// IDE-specific setup
setupIDEs(selectedIDEs);
await setupIDEs(selectedIDEs);
// Summary
const summaryLines = [