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
Copy file name to clipboardExpand all lines: content/copilot/how-tos/copilot-cli/set-up-copilot-cli/authenticate-copilot-cli.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -67,7 +67,7 @@ By default, the CLI stores your OAuth token in your operating system's keychain
67
67
| Windows | Credential Manager |
68
68
| Linux | libsecret (GNOME Keyring, KWallet) |
69
69
70
-
If the system keychain is unavailable—for example, on a headless Linux server without `libsecret` installed—the CLI prompts you to store the token in a plaintext configuration file at `~/.copilot/settings.json`.
70
+
If the system keychain is unavailable—for example, on a headless Linux server without `libsecret` installed—the CLI prompts you to store the token in a plaintext configuration file at `~/.copilot/config.json`.
71
71
72
72
When you run a command, {% data variables.copilot.copilot_cli_short %} checks for credentials in the following order:
73
73
@@ -176,8 +176,8 @@ If you have {% data variables.product.prodname_cli %} installed and authenticate
176
176
177
177
## Switching between accounts
178
178
179
-
{% data variables.copilot.copilot_cli_short %} supports multiple accounts. You can list available accounts and switch between them from within the CLI.
180
-
To list available accounts, run `/user list` from the {% data variables.copilot.copilot_cli_short %} prompt.
179
+
{% data variables.copilot.copilot_cli_short %} supports multiple accounts. You can list available accounts and switch between them from within the CLI.
180
+
To list available accounts, run `/user list` from the {% data variables.copilot.copilot_cli_short %} prompt.
181
181
To switch to a different account, type`/user switch` on the prompt.
182
182
183
183
To add another account, run `copilot login` from a new terminal session, or run the login command from within the CLI and authorize with the other account.
@@ -190,7 +190,7 @@ To revoke the OAuth app authorization on {% data variables.product.github %} and
190
190
191
191
1. Navigate to **Settings**>**Applications**>**Authorized OAuth Apps**.
192
192
1. Navigate to your settings page:
193
-
1. In the upper-right corner of any page on {% data variables.product.prodname_dotcom %}, click your profile picture.
193
+
1. In the upper-right corner of any page on {% data variables.product.prodname_dotcom %}, click your profile picture.
194
194
1. Click **Settings**.
195
195
1. In the left sidebar, click **Applications**.
196
196
1. Under **Authorized OAuth Apps**, click {% octicon "kebab-horizontal" aria-label="The horizontal kebab icon" %} next to **GitHub CLI** to expand the menu and select**Revoke**.
Copy file name to clipboardExpand all lines: content/copilot/how-tos/copilot-cli/set-up-copilot-cli/configure-copilot-cli.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -39,16 +39,16 @@ If you choose to trust the directory for future sessions, the trusted directory
39
39
40
40
### Editing trusted directories
41
41
42
-
You can edit the list of permanently trusted directories.
42
+
You can edit the list of permanently trusted directories. Trusted directories are stored in the automatically managed `config.json` file.
43
43
44
-
1. Open the CLI’s `settings.json` file. By default, it’s stored in a `.copilot` folder under your home directory:
44
+
1. Open the CLI's `config.json` file. By default, it's stored in a `.copilot` folder under your home directory:
45
45
46
-
***macOS/Linux**: `~/.copilot/settings.json`
47
-
***Windows**: `$HOME\.copilot\settings.json`
46
+
***macOS/Linux**: `~/.copilot/config.json`
47
+
***Windows**: `$HOME\.copilot\config.json`
48
48
49
-
You can change the config location by setting the `COPILOT_HOME` environment variable.
49
+
You can change the config location by setting the `COPILOT_HOME` environment variable. This would change `~/.copilot/` and `$HOME\.copilot\` in the above paths.
50
50
51
-
1. Edit the contents of the `trusted_folders` array.
51
+
1. Edit the contents of the `trustedFolders` array.
Copy file name to clipboardExpand all lines: content/copilot/how-tos/copilot-cli/use-copilot-cli-agents/delegate-tasks-to-cca.md
+10-8Lines changed: 10 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
-
title: Delegating tasks to {% data variables.copilot.copilot_cli %}
3
-
shortTitle: Delegate tasks to Copilot
4
-
intro: Use {% data variables.copilot.copilot_cli_short %}''s autopilot mode to hand off tasks and have {% data variables.product.prodname_copilot_short %} work autonomously on your behalf.
2
+
title: Delegating tasks to {% data variables.product.prodname_copilot_short %}
3
+
shortTitle: Delegate tasks to {% data variables.product.prodname_copilot_short %}
4
+
intro: Use autopilot mode, or the `/delegate` slash command, to get {% data variables.product.prodname_copilot_short %} to work autonomously on your behalf.
5
5
allowTitleToDifferFromFilename: true
6
6
product: '{% data reusables.gated-features.copilot-cli %}'
7
7
versions:
@@ -13,9 +13,13 @@ docsTeamMetrics:
13
13
- copilot-cli
14
14
---
15
15
16
-
## Get {% data variables.product.prodname_copilot_short %} to work autonomously
16
+
{% data variables.copilot.copilot_cli_short %} offers two ways to have {% data variables.product.prodname_copilot_short %} work autonomously: **autopilot mode** and the **`/delegate` command**. Both let you hand off tasks, but they differ in where the work happens:
17
17
18
-
You can tell {% data variables.product.prodname_copilot_short %} to use its best judgment to complete a task autonomously, rather than the CLI prompting you for input at each decision point within a task. You do this by using the CLI's autopilot mode.
18
+
***Autopilot mode** runs locally in your CLI session. You give autopilot full permissions and {% data variables.product.prodname_copilot_short %} then works on a task without stopping to prompt you for input. Your local machine does the work, and you can watch progress in real time. Use autopilot when you want hands-free local execution.
19
+
20
+
***`/delegate`** pushes the task to {% data variables.copilot.copilot_cloud_agent %} on {% data variables.product.github %}. The work runs remotely: {% data variables.product.prodname_copilot_short %} creates a branch, opens a draft pull request, and works in the background. Use `/delegate` when you want to hand off a task entirely and continue running even if you shut down your local machine.
21
+
22
+
## Get autopilot to complete tasks autonomously on your local machine
19
23
20
24
There are two ways to use autopilot mode:
21
25
@@ -26,9 +30,7 @@ For more information, see [AUTOTITLE](/copilot/concepts/agents/copilot-cli/autop
26
30
27
31
## Delegate tasks to {% data variables.copilot.copilot_cloud_agent %}
28
32
29
-
The delegate command lets you push your current session to {% data variables.copilot.copilot_cloud_agent %} on {% data variables.product.github %}. This lets you hand off work while preserving all the context {% data variables.product.prodname_copilot_short %} needs to complete your task.
30
-
31
-
You can delegate a task using the slash command, followed by a prompt:
33
+
You can delegate a task to {% data variables.copilot.copilot_cloud_agent %} on {% data variables.product.github %} by using the `/delegate`slash command, followed by a prompt:
32
34
33
35
```shell
34
36
/delegate complete the API integration tests and fix any failing edge cases
|`copilot`| Launch the interactive user interface. |
22
+
|`copilot completion SHELL`| Print a shell script for the chosen shell that can be used to enable tab completion for {% data variables.copilot.copilot_cli_short %}. Supported shells: `bash`, `zsh`, `fish`. See [Using `copilot completion`](#using-copilot-completion). |
22
23
|`copilot help [TOPIC]`| Display help information. Help topics include: `config`, `commands`, `environment`, `logging`, `monitoring`, `permissions`, and `providers`. |
23
24
|`copilot init`| Initialize {% data variables.product.prodname_copilot_short %} custom instructions for this repository. |
24
25
|`copilot login`| Authenticate with {% data variables.product.prodname_copilot_short %} via the OAuth device flow. Accepts `--host HOST` to specify the {% data variables.product.github %} host URL (default: `https://github.com`). |
|`--host HOST`| {% data variables.product.github %} host URL (default: `https://github.com`). Use this to authenticate with a {% data variables.product.prodname_ghe_cloud %} instance that uses data residency (for example, `https://example.ghe.com`). |
36
-
|`--config-dir PATH`| Set the configuration directory (default: `~/.copilot`). |
37
37
38
-
The default authentication mode is a web-based browser flow. After completion, an authentication token is stored securely in the system credential store. If a credential store is not found, the token is stored in a plain text config file under `~/.copilot/`.
38
+
The default authentication mode is a web-based browser flow. After completion, an authentication token is stored securely in the system credential store. If a credential store is not found, the token is stored in a plain text config file under `~/.copilot/` (or the directory specified by `COPILOT_HOME` if set).
39
39
40
40
Alternatively, {% data variables.copilot.copilot_cli_short %} will use an authentication token found in environment variables. The following are checked in order of precedence: `COPILOT_GITHUB_TOKEN`, `GH_TOKEN`, `GITHUB_TOKEN`. This method is most suitable for headless use such as automation.
The command `copilot completion SHELL` outputs a script for the specified shell (bash, zsh, or fish).
60
+
61
+
By sourcing this script (or writing it to your shell's completion directory) you can enable tab completion in your terminal for `copilot` subcommands, command options, and known value choices for command options.
62
+
63
+
#### Usage examples
64
+
65
+
Bash (current session only):
66
+
67
+
```bash copy
68
+
source<(copilot completion bash)
69
+
```
70
+
71
+
Bash (persistent, Linux):
72
+
73
+
```bash copy
74
+
copilot completion bash | sudo tee /etc/bash_completion.d/copilot
75
+
```
76
+
77
+
Zsh — write the output to a directory on your $fpath. Restart the shell after running this command:
78
+
79
+
```shell copy
80
+
copilot completion zsh >"${fpath[1]}/_copilot"
81
+
```
82
+
83
+
Fish:
84
+
85
+
```shell copy
86
+
copilot completion fish >~/.config/fish/completions/copilot.fish
87
+
```
88
+
57
89
## Global shortcuts in the interactive interface
58
90
59
91
| Shortcut | Purpose |
@@ -182,7 +214,6 @@ For a complete list of available slash commands enter `/help` in the CLI's inter
182
214
|`--available-tools=TOOL ...`| Only these tools will be available to the model. For multiple tools, use a quoted, comma-separated list. See [AUTOTITLE](/copilot/how-tos/copilot-cli/allowing-tools). |
183
215
|`--banner`, `--no-banner`| Show or hide the startup banner. |
184
216
|`--bash-env`| Enable `BASH_ENV` support for bash shells. |
185
-
|`--config-dir=PATH`| Set the configuration directory (default: `~/.copilot`). |
186
217
|`--connect[=SESSION-ID]`| Connect directly to a remote session (optionally specify a session ID or task ID). Conflicts with `--resume` and `--continue`. |
187
218
|`--continue`| Resume the most recent session in the current working directory, falling back to the globally most recent session. |
188
219
|`--deny-tool=TOOL ...`| Tools the CLI does not have permission to use. Will not prompt for permission. For multiple tools, use a quoted, comma-separated list. |
@@ -332,7 +363,7 @@ copilot --allow-tool='MyMCP'
332
363
For detailed information about configuration file settings—including the full list of user settings, repository settings, local settings, and how they cascade—see [AUTOTITLE](/copilot/reference/copilot-cli-reference/cli-config-dir-reference#configuration-file-settings).
333
364
334
365
> [!NOTE]
335
-
> User settings were previously stored in `~/.copilot/config.json`. Existing settings in that location are automatically migrated to `~/.copilot/settings.json` on startup.
366
+
> User settings were previously stored in `~/.copilot/config.json`. Existing user-editable settings in that location are automatically migrated to `~/.copilot/settings.json` on startup.
336
367
337
368
## Project initialization for {% data variables.product.prodname_copilot_short %}
338
369
@@ -944,7 +975,6 @@ Use `copilot mcp` to manage MCP server configurations from the command line with
944
975
|`--timeout <ms>`| Timeout in milliseconds. |
945
976
|`--json`| Output added configuration as JSON. |
946
977
|`--show-secrets`| Show full environment variable and header values. |
947
-
|`--config-dir <path>`| Path to the configuration directory. |
948
978
949
979
> [!CAUTION]
950
980
> `--show-secrets` can print sensitive environment variable and header values to your terminal or logs. Only use this option in trusted environments, and avoid copying, pasting, or otherwise capturing the output in shared logs or history.
0 commit comments