You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Clarify Copilot CLI installation and setup instructions: Update the 'How To Use' guide to specify that the CLI can be installed from any directory, and emphasize the requirement of running commands from within the repository. Include detailed steps for creating a .env file with the PERSONAL_ACCESS_TOKEN for successful setup.
Copy file name to clipboardExpand all lines: docs/how-to-use.mdx
+17-7Lines changed: 17 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ description: Quick setup with copilot setup, then customize labels, templates, a
5
5
6
6
## Quick installation (CLI)
7
7
8
-
To install the Copilot CLI globally from source:
8
+
You can install the Copilot CLI **from any directory**. For example, from your home or projects folder:
9
9
10
10
```bash
11
11
git clone https://github.com/vypdev/copilot.git
@@ -15,7 +15,7 @@ npm install . -g
15
15
16
16
If the repo does not include the compiled `build/` folder (e.g. it is gitignored), run `npm install` and `npm run build` before `npm install . -g`.
17
17
18
-
You can then run `copilot setup`, `copilot check-progress -i 123`, and other [CLI commands](/single-actions/workflow-and-cli) from any directory.
18
+
Once installed, the `copilot` command is available globally. **All Copilot CLI commands** (including `copilot setup`, `copilot check-progress -i 123`, etc.) must be run **from inside the repository** where you want Copilot to run. That repository must have a **`.env`** file in its root with **`PERSONAL_ACCESS_TOKEN`** set so the CLI can access the repo. See [CLI commands](/single-actions/workflow-and-cli).
19
19
20
20
---
21
21
@@ -27,19 +27,29 @@ You can then run `copilot setup`, `copilot check-progress -i 123`, and other [CL
27
27
Follow the [Authentication](/authentication) guide to create a **fine-grained PAT** with the right permissions (Actions, Administration, Contents, Issues, Metadata, Pull requests, etc.) and store it as a secret (e.g. `PAT`) in your repository or organization.
28
28
</Step>
29
29
30
-
<Steptitle="2. Clone your repo and run copilot setup">
31
-
From your **repository root** (the repo where you want Copilot to run):
30
+
<Steptitle="2. Run copilot setup in your repository root">
31
+
Go to the **root of the repository** where you want Copilot (clone it if needed), then run:
The first time you run `copilot setup`, there will usually be **no `.env` file** in that repo with the PAT. The command will copy setup files (workflows, templates, etc.) but may fail or skip the step that needs GitHub access (labels, issue types). In that case:
40
+
41
+
- Create a **`.env`** file in the **repository root** with your token:
- Run **`copilot setup` again**. This time it will have access to the repository and will create labels and issue types.
46
+
47
+
Alternatively, you can create the `.env` file with `PERSONAL_ACCESS_TOKEN` and its value **before** the first run and execute `copilot setup` once; it will then complete all steps (copy files + create labels and issue types) in a single pass.
48
+
39
49
`copilot setup` will:
40
50
- Create `.github/`, `.github/workflows/`, and `.github/ISSUE_TEMPLATE/` if they do not exist.
41
51
- Copy all files from the Copilot `setup/` folder into your repo (workflows, issue templates, pull request template). Existing files are **not** overwritten.
42
-
- Verify GitHub access with your token (you will be prompted or use `PAT` from env).
52
+
- Verify GitHub access using `PERSONAL_ACCESS_TOKEN` from `.env` (or the token you pass when prompted).
43
53
- Create all required **labels** in the repository (type, action, priority, size, progress 0%–100%).
44
54
- Create all required **issue types** in the organization (Task, Bug, Feature, Release, Hotfix, etc.), if your plan supports it.
0 commit comments