| 68 | }; |
| 69 | |
| 70 | export function registerRemoveCommand(program: Command): void { |
| 71 | program |
| 72 | .command("remove") |
| 73 | .alias("uninstall") |
| 74 | .description("Remove Context7 setup from your AI coding agent") |
| 75 | .option("--claude", "Remove from Claude Code") |
| 76 | .option("--cursor", "Remove from Cursor") |
| 77 | .option("--opencode", "Remove from OpenCode") |
| 78 | .option("--codex", "Remove from Codex") |
| 79 | .option("--antigravity", "Remove from Antigravity") |
| 80 | .option("--gemini", "Remove from Gemini CLI") |
| 81 | .option("--all", "Remove both MCP setup and CLI + Skills setup") |
| 82 | .option("--mcp", "Remove MCP setup") |
| 83 | .option("--cli", "Remove CLI + Skills setup") |
| 84 | .option("-p, --project", "Remove from the current project instead of global config") |
| 85 | .option("-y, --yes", "Skip confirmation prompts") |
| 86 | .action(async (options: UninstallOptions) => { |
| 87 | await removeCommand(options); |
| 88 | }); |
| 89 | } |
| 90 | |
| 91 | function getSelectedAgents(options: UninstallOptions): SetupAgent[] { |
| 92 | const agents: SetupAgent[] = []; |