diff --git a/src/npx-cli/commands/ide-detection.ts b/src/npx-cli/commands/ide-detection.ts index 7019be9a..df6b3a26 100644 --- a/src/npx-cli/commands/ide-detection.ts +++ b/src/npx-cli/commands/ide-detection.ts @@ -116,7 +116,8 @@ export function detectInstalledIDEs(): IDEInfo[] { id: 'cursor', label: 'Cursor', detected: existsSync(join(home, '.cursor')), - supported: false, + supported: true, + hint: 'hooks + MCP integration', }, { id: 'copilot-cli', diff --git a/src/npx-cli/commands/install.ts b/src/npx-cli/commands/install.ts index 1d59cad2..0cf490ab 100644 --- a/src/npx-cli/commands/install.ts +++ b/src/npx-cli/commands/install.ts @@ -135,9 +135,22 @@ async function setupIDEs(selectedIDEs: string[]): Promise { break; } - case 'cursor': - log.warn('Cursor: integration not yet implemented. Skipping.'); + case 'cursor': { + const { installCursorHooks, configureCursorMcp } = await import('../../services/integrations/CursorHooksInstaller.js'); + const cursorResult = await installCursorHooks('user'); + if (cursorResult === 0) { + const mcpResult = configureCursorMcp('user'); + if (mcpResult === 0) { + log.success('Cursor: hooks + MCP installed.'); + } else { + log.success('Cursor: hooks installed (MCP setup failed — run `npx claude-mem cursor mcp` to retry).'); + } + } else { + log.error('Cursor: hook installation failed.'); + failedIDEs.push(ideId); + } break; + } case 'gemini-cli': { const { installGeminiCliHooks } = await import('../../services/integrations/GeminiCliHooksInstaller.js');