Skip to content

feat: add GitHub Copilot CLI installer target#205

Open
RubenGomGar wants to merge 1 commit into
colbymchenry:mainfrom
RubenGomGar:feat/copilot-cli-installer-target
Open

feat: add GitHub Copilot CLI installer target#205
RubenGomGar wants to merge 1 commit into
colbymchenry:mainfrom
RubenGomGar:feat/copilot-cli-installer-target

Conversation

@RubenGomGar
Copy link
Copy Markdown

feat: add GitHub Copilot CLI installer target

Description

Adds GitHub Copilot CLI as the fifth installer target alongside Claude Code, Cursor, Codex CLI, and opencode.

Changes

  • New file: src/installer/targets/copilot.ts - CopilotTarget implementation
  • Updated: TargetId type to include 'copilot'
  • Updated: ALL_TARGETS registry to include copilotTarget
  • Tests: 10 new Copilot-specific edge case tests + full coverage in parameterized contract tests
  • Docs: Updated README badges and supported agents list
  • Changelog: Documented new feature in [Unreleased] section

Implementation Details

The target follows the same architectural pattern as existing targets:

  • Global-only support (like Codex) - no project-local config concept
  • MCP server config at ~/.copilot/mcp-config.json
  • Agent instructions at ~/.copilot/AGENTS.md
  • Copilot-specific fields: "type": "local" and "tools": ["*"]"
  • Sibling preservation: Existing MCP servers are preserved during install/uninstall
  • Idempotent operations: Re-running install reports "unchanged" when already configured

Testing

  • ✅ All new Copilot tests pass (10/10)
  • ✅ All parameterized contract tests pass for Copilot
  • ✅ Existing test suite: 622/631 passing (9 pre-existing failures unrelated to this PR)
  • ✅ Manual verification completed:
    • Fresh install → files created correctly
    • Idempotency → re-run reports "unchanged"
    • Sibling preservation → aspire MCP server preserved
    • Uninstall → codegraph removed, siblings preserved
    • Print config → valid JSON output

Installation Example

# Global install
npx @colbymchenry/codegraph install --target=copilot --location=global

# Verify
gh copilot mcp list
# Output: codegraph (local)

- Implement CopilotTarget in src/installer/targets/copilot.ts
- Add 'copilot' to TargetId type and ALL_TARGETS registry
- Add comprehensive test coverage (10 new Copilot-specific tests)
- Update README badges and supported agents documentation
- Update CHANGELOG with new feature entry

The target supports global installation at ~/.copilot/mcp-config.json
and ~/.copilot/AGENTS.md, following the same pattern as existing
Claude/Cursor/Codex/opencode targets.

Installation includes:
- MCP server configuration with Copilot-specific fields (type: local, tools: *)
- Agent instructions with CodeGraph tool guidance
- Automatic sibling MCP server preservation
- Idempotent install/uninstall operations

All existing tests pass (622/631), with new Copilot tests achieving
full coverage of install, uninstall, detect, and printConfig operations.
@blueheron786
Copy link
Copy Markdown

Hoping to seeing this merged!

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.

3 participants