Feature Request: Extension API for Copilot CLI
Summary
Add an Extension API to Copilot CLI that allows developers to build external tools/plugins using the public @github/copilot-sdk package, similar to VS Code's extension system.
Problem Statement
Current Architecture Constraints
- Copilot CLI bundles SDK internally - The SDK code is compiled into the CLI binary (
index.js), not consumed as external runtime dependency
- Community innovation is blocked - Users cannot extend CLI functionality without modifying bundled code
- SDK updates don't reach CLI users immediately - Even if SDK gets new features, CLI requires rebuild/release cycle
- Competitive gap - Claude Code CLI and OpenAI Codex both have mature plugin ecosystems
Why This Matters
Developers want to:
- Add custom slash commands for their workflows
- Integrate with their existing tools (Jira, Linear, Notion, etc.)
- Preserve context during compaction events
- Track analytics and usage patterns
- Extend Copilot without waiting for official features
Currently, there is no supported way to do this.
Proposed Solution
Extension API Pattern (Like VS Code)
┌─────────────────────────────┐
│ Copilot CLI (bundled SDK) │
│ │
│ ┌─────────────────────┐ │
│ │ Extension Loader │ │ ← New component
│ └──────────┬──────────┘ │
└─────────────┼──────────────┘
│
↓
~/.copilot/extensions/
├─ logger/
│ ├─ package.json
│ └─ index.js (built with @github/copilot-sdk)
├─ memory-preservation/
└─ custom-integration/
How It Works
- CLI exposes hook points - Extension loader in CLI calls external extensions at lifecycle events
- Extensions built with public SDK - Developers use
@github/copilot-sdk to build tools
- Dynamic loading - Extensions loaded from
~/.copilot/extensions/ at runtime
- No CLI rebuild needed - Community can ship extensions independently
Extension Interface
// Extension built with @github/copilot-sdk
export default {
name: "my-extension",
version: "1.0.0",
// Lifecycle hooks
async onSessionCreated(context) { },
async onBeforeSend(message, context) { },
async onSessionEvent(event, context) { },
async onSessionEnd(context) { },
// Slash commands
commands: {
"/mycommand": async (args, context) => { }
}
}
Installation & Discovery
# Install extension
copilot extension install <name>
# Enable/disable
copilot extension enable <name>
copilot extension disable <name>
# List installed
copilot extension list
Extension Marketplace (Future)
- GitHub could host official extension registry
- Community extensions vetted and signed
- Permission model (network access, file access, etc.)
- Similar to VS Code Marketplace
Benefits
For GitHub
✅ No architectural changes - Keep bundled SDK, add loader on top
✅ Proven pattern - VS Code extensions = billion-dollar ecosystem
✅ Community innovation - Users extend without GitHub engineering time
✅ Competitive parity - Match Claude Code and OpenAI Codex plugin systems
✅ SDK adoption - More developers use @github/copilot-sdk
✅ Feedback loop - See what features community builds → prioritize official features
For Developers
✅ Extend without forking - No need to hack CLI binary
✅ Use public SDK - Official, documented API
✅ Share with community - Publish extensions for others
✅ Independent updates - Don't wait for CLI release cycle
✅ Custom workflows - Build tools specific to your needs
For Ecosystem
✅ Plugin marketplace - Community-driven innovation
✅ Integration ecosystem - Connect Copilot to existing tools
✅ Learning resource - Extensions as educational examples
✅ Enterprise customization - Companies build internal extensions
Prior Art
This pattern is proven at massive scale:
- VS Code - 40,000+ extensions, cornerstone of product success
- Chrome - Browser extensions transformed web browsing
- Obsidian - Community plugins = 80% of product value
- Claude Code CLI - Plugin system with marketplace
- OpenAI Codex CLI - Extensible via config and plugins
Proof of Concept
We've already built a working implementation:
The architecture works. The code exists. The community wants it.
Implementation Phases
Phase 1: Extension Loader in CLI
- Add extension discovery in
~/.copilot/extensions/
- Implement lifecycle hook execution
- Basic enable/disable functionality
- Ship with existing SDK hooks
Phase 2: CLI Commands
copilot extension list
copilot extension enable/disable
- Extension metadata display
Phase 3: Installation & Distribution
copilot extension install <name>
- Download from registry
- Dependency management
Phase 4: Marketplace
- Official GitHub extension registry
- Submission/review process
- Security/permissions model
- Extension signing
Security Considerations
Extensions need sandboxing similar to VS Code:
- Permissions model - Network, filesystem, API access
- Signed extensions - Verify publisher identity
- Review process - Manual review for marketplace
- Isolation - Extensions can't interfere with each other
- Manifest validation - Schema for extension.json
Migration Path
This doesn't conflict with our SDK PR (#42):
- Accept SDK PR → Internal plugins work
- Add Extension Loader → External plugins work
- Community chooses → Both patterns coexist
OR
- Accept Extension API concept → We refactor SDK PR to match
- Ship Extension Loader first → Community starts building
- SDK enhancements follow → Based on community feedback
Call to Action
Question for Maintainers:
Would GitHub be open to:
- Accepting an Extension API architecture?
- Reviewing implementation proposals?
- Collaborating on security/sandboxing model?
We have working code, tests, and documentation ready. We're willing to refactor our SDK PR to match your preferred architecture. We just want to enable community innovation.
References
Built with 💙 by the community, for the community.
We believe Copilot CLI can have the same vibrant extension ecosystem as VS Code.
Let's make it happen. 🚀
Feature Request: Extension API for Copilot CLI
Summary
Add an Extension API to Copilot CLI that allows developers to build external tools/plugins using the public
@github/copilot-sdkpackage, similar to VS Code's extension system.Problem Statement
Current Architecture Constraints
index.js), not consumed as external runtime dependencyWhy This Matters
Developers want to:
Currently, there is no supported way to do this.
Proposed Solution
Extension API Pattern (Like VS Code)
How It Works
@github/copilot-sdkto build tools~/.copilot/extensions/at runtimeExtension Interface
Installation & Discovery
Extension Marketplace (Future)
Benefits
For GitHub
✅ No architectural changes - Keep bundled SDK, add loader on top
✅ Proven pattern - VS Code extensions = billion-dollar ecosystem
✅ Community innovation - Users extend without GitHub engineering time
✅ Competitive parity - Match Claude Code and OpenAI Codex plugin systems
✅ SDK adoption - More developers use
@github/copilot-sdk✅ Feedback loop - See what features community builds → prioritize official features
For Developers
✅ Extend without forking - No need to hack CLI binary
✅ Use public SDK - Official, documented API
✅ Share with community - Publish extensions for others
✅ Independent updates - Don't wait for CLI release cycle
✅ Custom workflows - Build tools specific to your needs
For Ecosystem
✅ Plugin marketplace - Community-driven innovation
✅ Integration ecosystem - Connect Copilot to existing tools
✅ Learning resource - Extensions as educational examples
✅ Enterprise customization - Companies build internal extensions
Prior Art
This pattern is proven at massive scale:
Proof of Concept
We've already built a working implementation:
SDK Plugin System PR - github/copilot-sdk#42
Plugin System Repository - barrersoftware/copilot-plugin-system-js
Plugin Registry - barrersoftware/copilot-plugins-registry
The architecture works. The code exists. The community wants it.
Implementation Phases
Phase 1: Extension Loader in CLI
~/.copilot/extensions/Phase 2: CLI Commands
copilot extension listcopilot extension enable/disablePhase 3: Installation & Distribution
copilot extension install <name>Phase 4: Marketplace
Security Considerations
Extensions need sandboxing similar to VS Code:
Migration Path
This doesn't conflict with our SDK PR (#42):
OR
Call to Action
Question for Maintainers:
Would GitHub be open to:
We have working code, tests, and documentation ready. We're willing to refactor our SDK PR to match your preferred architecture. We just want to enable community innovation.
References
Built with 💙 by the community, for the community.
We believe Copilot CLI can have the same vibrant extension ecosystem as VS Code.
Let's make it happen. 🚀