@@ -7,50 +7,62 @@ GitHub Copilot SDK integration for Amplifier via Copilot CLI.
77## Prerequisites
88
99- ** Python 3.11+**
10- - ** Node.js 18+** — Required to install the Copilot CLI
1110- ** GitHub Copilot subscription** — Active Business or Enterprise subscription
1211- ** [ UV] ( https://github.com/astral-sh/uv ) ** (optional) — Fast Python package manager (pip works too)
1312
14- ### Installing Copilot CLI
13+ > ** No Node.js required.** The Copilot SDK binary is bundled with the Python package
14+ > and discovered automatically.
1515
16- The Copilot CLI is a Node.js binary that the Python SDK controls via JSON-RPC.
17- Both the CLI and the SDK are required.
16+ ## Authentication
1817
19- ``` bash
20- # Install Copilot CLI (requires Node.js/npm)
21- npm install -g @github/copilot
18+ Set a GitHub token as an environment variable. The provider checks these in order:
19+ ` COPILOT_GITHUB_TOKEN ` , ` GH_TOKEN ` , ` GITHUB_TOKEN ` .
20+
21+ ### Option 1: Environment variable (recommended)
2222
23- # Verify installation
24- copilot --version
23+ ``` bash
24+ export GITHUB_TOKEN= " ghp_your_token_here "
2525```
2626
27- ### Authentication
27+ > ** Tip:** Many developers already have ` GITHUB_TOKEN ` set from ` gh ` CLI usage —
28+ > if so, you're already authenticated. No extra setup needed.
29+
30+ ### Option 2: ` amplifier init ` setup wizard
31+
32+ ``` bash
33+ amplifier init
34+ # Select "GitHub Copilot" from the provider list
35+ # Launches browser OAuth flow if no token is set
36+ ```
2837
29- You must be authenticated to GitHub Copilot:
38+ ### Option 3: ` gh ` CLI bridge
3039
3140``` bash
32- copilot auth login
41+ export GITHUB_TOKEN= $( gh auth token )
3342```
3443
44+ One command to bridge your existing ` gh ` CLI authentication into Amplifier.
45+
3546## Installation
3647
37- Register the module, install its dependencies, and set it as your active provider :
48+ GitHub Copilot is a well-known provider — ` amplifier init ` handles everything :
3849
3950``` bash
40- amplifier module add provider-github-copilot \
41- --source git+https://github.com/microsoft/ amplifier-module-provider-github-copilot@main
51+ # Interactive setup — select Copilot from the provider list
52+ amplifier init
4253
43- amplifier provider install github-copilot
54+ # Non-interactive — auto-detects GITHUB_TOKEN
55+ amplifier init --yes
56+ ```
57+
58+ Or install manually:
4459
60+ ``` bash
61+ amplifier provider install github-copilot
4562amplifier provider use github-copilot
4663```
4764
48- > ** Note:** The ` provider install ` step is required to install the module's Python
49- > dependencies (including the GitHub Copilot SDK) into the Amplifier environment.
50- > The built-in providers skip this step because they are pre-installed during
51- > ` amplifier init ` .
52-
53- Or reference it directly in a bundle (no separate install needed):
65+ Or reference it directly in a bundle:
5466
5567``` yaml
5668providers :
0 commit comments