Skip to content

Added GitHub Copilot CLI as a target - #1483

Open
davideconsonni wants to merge 2 commits into
colbymchenry:mainfrom
davideconsonni:main
Open

Added GitHub Copilot CLI as a target#1483
davideconsonni wants to merge 2 commits into
colbymchenry:mainfrom
davideconsonni:main

Conversation

@davideconsonni

Copy link
Copy Markdown

Adds support for GitHub Copilot CLI as an installer target (--target=copilot).
What's included:

  • New CopilotCliTarget implementing the AgentTarget interface
  • Global: writes MCP server entry to ~/.copilot/mcp-config.json
  • Local: writes to .github/mcp.json in the project root
  • Uses type: "local" and tools: ["*"] as required by Copilot CLI
  • Preserves existing sibling MCP servers (surgical merge, no overwrite)
  • Idempotent: re-running returns unchanged if config is already byte-equal
  • uninstall cleanly removes the codegraph key
  • copilot added to ALL_TARGETS registry and TargetId union
  • Full contract test coverage (install, idempotency, uninstall, sibling preservation) — 176 tests pass
  • CHANGELOG.md entry under [Unreleased]

- Adds VSCodeTarget supporting both global and local install locations
- Global: Code/User/profiles/default/mcp.json (platform-specific path,
  respects XDG_CONFIG_HOME on Linux and APPDATA on Windows)
- Local: .vscode/mcp.json in the project root
- Uses VS Code's 'servers' key (not 'mcpServers') with getMcpServerConfig()
- No instructions file (VS Code has no AGENTS.md/CLAUDE.md equivalent)
- Adds 'vscode' to TargetId union and ALL_TARGETS registry
- Adds contract + partial-state tests (177 tests pass)
- Adds CopilotCliTarget supporting both global and local install locations
- Global: ~/.copilot/mcp-config.json (same file the CLI uses)
- Local: .github/mcp.json in the project root
- Uses mcpServers key with type:'local' and tools:['*'] as required by Copilot CLI
- Preserves existing sibling MCP servers (cobol, sap-docs, etc.)
- Removes incorrect vscode target added by mistake
- 176 tests pass
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant