feat(installer): add GitHub Copilot CLI target#586
Open
lazyayuan wants to merge 1 commit into
Open
Conversation
- New target: copilot.ts — writes MCP server entries to ~/.copilot/mcp-config.json (global) or ./.mcp.json (local) - Shared-config cascade: uninstallTargets detects when multiple targets share .mcp.json and skips redundant removal + warns - Claude local detection no longer uses .mcp.json as a signal (shared with Copilot) — only .claude/ directory - Copilot local detection uses ~/.copilot dir, not .mcp.json, to avoid false positives when only Claude/Cursor local is set up - Tests: 6 new cases covering install, sibling preservation, uninstall, printConfig, and registry lookup - README/CHANGELOG/CLI descriptions updated
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Add GitHub Copilot CLI as a supported installer target.
codegraph install --target=copilotnow configures the Copilot CLI agent, writing MCP server entries to~/.copilot/mcp-config.json(global) or./.mcp.json(local/workspace).Changes
src/installer/targets/copilot.ts— install/uninstall/detect/printConfig for Copilot CLI, usingmcpServersJSON format (same shape as Claude Code, Cursor, Kiro).uninstallTargetsnow detects when multiple targets share the same config file (e.g..mcp.jsonis used by both Claude Code and Copilot CLI for local installs). When one target removes thecodegraphentry, subsequent targets that also write to that file are reported as cascade-removed with a warning — instead of silently double-deleting.detect()no longer uses.mcp.jsonexistence as a local-installed signal (since it's shared infrastructure). Only.claude/directory is used. This prevents false positives when only Copilot local is installed.~/.copilotdirectory (not.mcp.json) to detect whether Copilot CLI is installed locally, avoiding false positives when only Claude/Cursor local is set up.Tests
__tests__/installer-targets.test.ts— 6 new cases:./.mcp.jsonwithmcpServerskey~/.copilot/mcp-config.json.mcp.jsoncodegraphbut leaves sibling MCP servers intactprintConfigreturnsmcpServersformatcopilottargetFull suite green (152/152).
Notes
[Unreleased].install/uninstalldescriptions updated to include Copilot CLI.