Skip to content

Commit 98733be

Browse files
authored
Merge pull request #42777 from github/repo-sync
Repo sync
2 parents 69493dc + eb6911d commit 98733be

File tree

3 files changed

+33
-21
lines changed

3 files changed

+33
-21
lines changed

content/copilot/how-tos/copilot-cli/cli-getting-started.md

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,21 +25,23 @@ Use one of these commands:
2525

2626
* **Cross-platform (npm)**
2727

28-
```bash copy
29-
npm install -g @github/copilot
30-
```
28+
Prerequisite: {% data variables.copilot.copilot_cli_npm_version %}.
29+
30+
```bash copy
31+
npm install -g @github/copilot
32+
```
3133

3234
* **Windows (WinGet)**
3335

34-
```bash copy
35-
winget install GitHub.Copilot
36-
```
36+
```bash copy
37+
winget install GitHub.Copilot
38+
```
3739

3840
* **macOS/Linux (Homebrew)**
3941

40-
```bash copy
41-
brew install copilot-cli
42-
```
42+
```bash copy
43+
brew install copilot-cli
44+
```
4345

4446
## Starting the CLI for the first time
4547

content/copilot/how-tos/copilot-cli/install-copilot-cli.md

Lines changed: 21 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,27 @@ If you have access to {% data variables.product.prodname_copilot %} via your org
3636

3737
You can install {% data variables.copilot.copilot_cli_short %} using WinGet (Windows), Homebrew (macOS and Linux), npm (all platforms), or an install script (macOS and Linux).
3838

39+
### Installing with npm (all platforms)
40+
41+
Prerequisite: {% data variables.copilot.copilot_cli_npm_version %}.
42+
43+
```shell copy
44+
npm install -g @github/copilot
45+
```
46+
47+
> [!NOTE]
48+
> If you have `ignore-scripts=true` in your `~/.npmrc` file, you must use the command:
49+
>
50+
> ```shell copy
51+
> npm_config_ignore_scripts=false npm install -g @github/copilot
52+
> ```
53+
54+
To install the prerelease version:
55+
56+
```shell copy
57+
npm install -g @github/copilot@prerelease
58+
```
59+
3960
### Installing with WinGet (Windows)
4061

4162
```powershell copy
@@ -60,18 +81,6 @@ To install the prerelease version:
6081
brew install copilot-cli@prerelease
6182
```
6283

63-
### Installing with npm (all platforms, requires Node.js 22+)
64-
65-
```shell copy
66-
npm install -g @github/copilot
67-
```
68-
69-
To install the prerelease version:
70-
71-
```shell copy
72-
npm install -g @github/copilot@prerelease
73-
```
74-
7584
### Installing with the install script (macOS and Linux)
7685

7786
```shell copy

data/variables/copilot.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ copilot_cli_short: 'Copilot CLI'
7272
copilot_cli: 'GitHub Copilot CLI'
7373
copilot_old-cli_short: 'Copilot in the CLI'
7474
copilot_old-cli: 'GitHub Copilot in the CLI'
75+
copilot_cli_npm_version: 'Node.js 22 or later'
7576

7677
## Copilot custom agents
7778
copilot_custom_agent: 'Copilot custom agent'

0 commit comments

Comments
 (0)