Skip to content

Commit 185db0e

Browse files
hubwriterCopilotCopilot
authored
Copilot CLI: Add how-to for the /settings command (#61882)
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
1 parent 4c916fe commit 185db0e

7 files changed

Lines changed: 185 additions & 13 deletions

File tree

Lines changed: 164 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,164 @@
1+
---
2+
title: Changing settings with the `/settings` command
3+
shortTitle: Change settings
4+
allowTitleToDifferFromFilename: true
5+
intro: 'View and change your personal settings for {% data variables.copilot.copilot_cli %} with the `/settings` slash command.'
6+
versions:
7+
feature: copilot
8+
contentType: how-tos
9+
category:
10+
- Configure Copilot # Copilot discovery page
11+
- Configure Copilot CLI # Copilot CLI bespoke page
12+
docsTeamMetrics:
13+
- copilot-cli
14+
---
15+
16+
You can use the `/settings` slash command to view and change your settings from within an interactive CLI session. This command controls user-level settings such as whether {% data variables.copilot.copilot_cli_short %} updates itself automatically, which color palette the interface uses, what's displayed in the footer, and many other options.
17+
18+
Use `/settings` to:
19+
20+
* **Browse and edit settings interactively** — Run `/settings` on its own to open a searchable editor that lists every setting with a description and its current value.
21+
* **Change a setting with a single command** — Run `/settings KEY VALUE` to change a particular setting without opening the editor.
22+
* **Check a setting's value** — Run `/settings show KEY` to display the current value of a setting.
23+
24+
You can also use `/config`, which is an alias of `/settings`.
25+
26+
Changes you make with `/settings` or `/config` are written to your personal settings file (by default, `~/.copilot/settings.json`) and persist across sessions.
27+
28+
## Opening the settings editor
29+
30+
To browse and edit settings interactively, enter the slash command with no arguments:
31+
32+
```copilot copy
33+
/settings
34+
```
35+
36+
The editor lists every setting you can change, and the setting's current value. As you move up or down through the list, a short description of the highlighted setting is shown at the bottom of the editor. This allows you to browse and edit settings without needing to know their exact names.
37+
38+
For more information about the available settings, see [AUTOTITLE](/copilot/reference/copilot-cli-reference/cli-config-dir-reference#user-settings-copilotsettingsjson).
39+
40+
While the editor is open, you can use the following keyboard shortcuts:
41+
42+
<!-- Force table-layout: auto so the first column shrinks to its content width on all viewports. The site applies table-layout: fixed below 544px, which would otherwise collapse the first column and make its keys overflow. -->
43+
44+
<table style="table-layout: auto;">
45+
<thead>
46+
<tr>
47+
<th style="white-space: nowrap;">Key</th>
48+
<th style="width: 100%;">Action</th>
49+
</tr>
50+
</thead>
51+
<tbody>
52+
<tr>
53+
<td style="white-space: nowrap;"><kbd>↑</kbd> / <kbd>↓</kbd></td>
54+
<td>Move between settings.</td>
55+
</tr>
56+
<tr>
57+
<td style="white-space: nowrap;"><kbd>/</kbd></td>
58+
<td>Search and filter the list by a setting's name or description.</td>
59+
</tr>
60+
<tr>
61+
<td style="white-space: nowrap;"><kbd>Enter</kbd></td>
62+
<td>Toggle a boolean setting, or edit other types of values.</td>
63+
</tr>
64+
<tr>
65+
<td style="white-space: nowrap;"><kbd>Ctrl</kbd>+<kbd>R</kbd></td>
66+
<td>Reset the highlighted setting to its default.</td>
67+
</tr>
68+
<tr>
69+
<td style="white-space: nowrap;"><kbd>Ctrl</kbd>+<kbd>E</kbd></td>
70+
<td>Open <code>settings.json</code> in your configured terminal editor to make advanced changes.</td>
71+
</tr>
72+
<tr>
73+
<td style="white-space: nowrap;"><kbd>Esc</kbd></td>
74+
<td>Clear the current search, or close the editor.</td>
75+
</tr>
76+
</tbody>
77+
</table>
78+
79+
Most changes take effect immediately—for example, switching the color palette updates the interface as soon as you select a new value.
80+
81+
## Changing a single setting inline
82+
83+
If you already know which setting you want to change, you can set it directly from the CLI's prompt box, without opening the editor:
84+
85+
```copilot
86+
/settings KEY VALUE
87+
```
88+
89+
For example:
90+
91+
```copilot copy
92+
/settings autoUpdate off
93+
```
94+
95+
{% data variables.product.prodname_copilot_short %} writes the value and confirms it, for example: `Set autoUpdate = false.`
96+
97+
> [!NOTE]
98+
> * **Boolean settings** accept `on`/`off` or `true`/`false`. For example, `/settings renderMarkdown on`.
99+
> * **Settings with a fixed set of choices** accept one of those values. For example, `/settings theme dim` or `/settings banner never`.
100+
> * **Nested settings** use a dotted path. For example, `/settings footer.showBranch off` hides the Git branch in the footer.
101+
102+
You can configure settings that take set values without needing to remember the exact key or value, just by using the navigation and <kbd>Enter</kbd> keys. For example, to prevent the agent from asking clarifying questions:
103+
104+
1. Type `/settings`, without pressing <kbd>Enter</kbd>, to display a list of options.
105+
1. Use the <kbd>↓</kbd> key to move down the list until `` points to `/settings askUser Allow the agent to ask clarifying questions`, then press <kbd>Enter</kbd>.
106+
1. Use the <kbd>↓</kbd> key to move down the list of options for this setting until `` points to `/settings askUser off`, then press <kbd>Enter</kbd>.
107+
1. Press <kbd>Enter</kbd> again to submit the `/settings askUser off` command.
108+
109+
The CLI confirms the change: `Set askUser = false.`
110+
111+
## Viewing valid values for a setting
112+
113+
To display the valid values that are available for a setting, enter `/settings KEY` with no value. For example, to see the valid values for `theme`:
114+
115+
```copilot copy
116+
/settings theme
117+
```
118+
119+
## Viewing the current value of a setting
120+
121+
To display a setting's current value, use `show`. For example:
122+
123+
```copilot copy
124+
/settings show theme
125+
```
126+
127+
This outputs a line such as `theme = high-contrast`. The `show` form is useful for quickly checking a value, or for capturing settings in logs.
128+
129+
## Changing settings that require a restart
130+
131+
Most settings apply right away, but a few only take full effect after {% data variables.copilot.copilot_cli_short %} restarts—for example, `experimental` and the proxy settings. When you change one of these, {% data variables.product.prodname_copilot_short %} tells you a restart is needed, and may restart the session for you.
132+
133+
## Settings you can't change from the command line
134+
135+
Not every setting is editable through the inline `/settings KEY VALUE` method:
136+
137+
* **Security-sensitive settings**—such as those that change how credentials are stored or that run a shell command—are deliberately excluded, because flipping them in a single line with no confirmation is risky.
138+
* **List and structured settings** can't be set inline. Enter `/settings` then press <kbd>Ctrl</kbd>+<kbd>E</kbd> to open `settings.json` in your configured terminal editor, then edit the setting there.
139+
* **Settings managed by your repository or organization** are shown for reference, but their values come from those sources and override your personal value. Changing them in your user settings has no effect.
140+
141+
In each of these cases, {% data variables.product.prodname_copilot_short %} explains why the change wasn't applied and points you to the right place to make it.
142+
143+
## Commands replaced by `/settings`
144+
145+
Some older slash commands have been folded into `/settings`. They still work, but display a notice telling you about the equivalent `/settings` command.
146+
147+
## Settings you might want to change
148+
149+
Some commonly used settings include:
150+
151+
* `autoUpdate` — Automatically download updated CLI versions.
152+
* `theme` — Color palette (`default`, `github`, `dim`, `high-contrast`, or `colorblind`).
153+
* `renderMarkdown` — Render Markdown in the terminal.
154+
* `banner` — How often to show the startup banner (`always`, `once`, or `never`).
155+
* `beep` — Beep when {% data variables.product.prodname_copilot_short %} needs your attention.
156+
* `includeCoAuthoredBy` — Add a `Co-authored-by` trailer to commits.
157+
* `footer.showBranch` — Show the current Git branch in the footer.
158+
159+
For the full list of available settings and how user, repository, and organization settings combine, see [AUTOTITLE](/copilot/reference/copilot-cli-reference/cli-config-dir-reference).
160+
161+
## Further reading
162+
163+
* [AUTOTITLE](/copilot/how-tos/copilot-cli/set-up-copilot-cli/configure-copilot-cli)
164+
* [AUTOTITLE](/copilot/how-tos/copilot-cli/customize-copilot/overview)

content/copilot/how-tos/copilot-cli/customize-copilot/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ contentType: how-tos
88
children:
99
- /overview
1010
- /add-custom-instructions
11+
- /change-settings
1112
- /use-hooks
1213
- /add-skills
1314
- /add-mcp-servers

content/copilot/how-tos/copilot-cli/customize-copilot/overview.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,3 +66,9 @@ For more information, see [AUTOTITLE](/copilot/concepts/context/mcp).
6666
They bundle multiple customization components together into a single installable unit. You can install plugins directly from a repository, from a plugin marketplace, or from a local path.
6767

6868
For more information, see [AUTOTITLE](/copilot/concepts/agents/about-plugins).
69+
70+
## Personal CLI settings
71+
72+
The `/settings` slash command allows you to view and change your {% data variables.copilot.copilot_cli %} settings from within an interactive session. It controls user-level settings such as whether {% data variables.product.prodname_copilot_short %} updates itself automatically, which color palette the interface uses, what appears in the footer, and many other options.
73+
74+
For more information, see [AUTOTITLE](/copilot/how-tos/copilot-cli/customize-copilot/change-settings).

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ children:
5252
- /customize-copilot/add-mcp-servers
5353
- /customize-copilot/add-skills
5454
- /customize-copilot/create-custom-agents-for-cli
55+
- /customize-copilot/change-settings
5556
- /customize-copilot/overview
5657
- /customize-copilot/plugins-creating
5758
- /customize-copilot/plugins-finding-installing

content/copilot/how-tos/copilot-cli/use-copilot-cli/overview.md

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -305,15 +305,15 @@ Press <kbd>Ctrl</kbd>+<kbd>T</kbd> to show or hide the model's reasoning process
305305
306306
### Configure settings
307307
308-
You can view and change {% data variables.copilot.copilot_cli_short %} settings using the `/settings` slash command.
308+
You can view and change your personal {% data variables.copilot.copilot_cli_short %} settings using the `/settings` slash command.
309309
310-
* Run `/settings` to open an interactive settings dialog, where you can search for a setting by name and edit it.
311-
* Run `/settings KEY VALUE` to set a setting inline, where KEY is the name of the setting and VALUE is the value you want to set. This also works in scripts and in programmatic sessions started with `-p`.
312-
* Run `/settings reset KEY` to restore a setting to its default value.
310+
* Run `/settings` to open an interactive settings editor, where you can search for a setting by name and edit it. To restore a setting to its default value, highlight it in the list of settings and press <kbd>Ctrl</kbd>+<kbd>R</kbd>.
311+
* Run `/settings KEY VALUE` to change a setting directly in the CLI's prompt box. KEY is the name of the setting and VALUE is the value you want to set. This also works in scripts and in programmatic sessions started with `-p`.
312+
* Run `/settings show KEY` to display a setting's current value as text, without opening the editor.
313313
314-
Some settings, such as the color mode, take effect immediately when you save them.
314+
Most settings changes take effect immediately, without needing to restart {% data variables.copilot.copilot_cli_short %}.
315315
316-
For the full list of available settings, see [AUTOTITLE](/copilot/reference/copilot-cli-reference/cli-config-dir-reference#configuration-file-settings).
316+
For more information, see [AUTOTITLE](/copilot/how-tos/copilot-cli/customize-copilot/change-settings). For the full list of available settings, see [AUTOTITLE](/copilot/reference/copilot-cli-reference/cli-config-dir-reference#configuration-file-settings).
317317
318318
## Find out more
319319
@@ -322,14 +322,12 @@ For a complete list of the command line options and slash commands that you can
322322
* Enter `?` in the prompt box in an interactive session.
323323
* Enter `copilot help` in your terminal.
324324
325-
For additional information use one of the following commands in your terminal:
325+
For additional information, use one of the following `copilot help` subcommands in your terminal:
326326
327327
* **Configuration settings**:
328328
329329
`copilot help config`
330330
331-
You can adjust the configuration settings by editing the `settings.json` file, which is located, by default, in the `~/.copilot` directory. This location can be changed by setting the `COPILOT_HOME` environment variable.
332-
333331
* **Environment variables** that affect {% data variables.copilot.copilot_cli_short %}:
334332
335333
`copilot help environment`

content/copilot/reference/copilot-cli-reference/cli-command-reference.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -246,14 +246,14 @@ When diff mode is open (entered via `/diff`):
246246
| `/search [QUERY]`, `/find [QUERY]` | Search the conversation timeline. {% data reusables.copilot.experimental %} |
247247
| `/security-review [PROMPT]` | Run the security review agent to analyze changes for vulnerabilities. |
248248
| `/session [info\|checkpoints [n]\|files\|plan\|rename [NAME]\|cleanup\|prune\|delete [ID]\|delete-all]`, `/sessions [info\|checkpoints [n]\|files\|plan\|rename [NAME]\|cleanup\|prune\|delete [ID]\|delete-all]` | Show session information and manage sessions. The `info` subcommand shows session details including the session link (when available). Subcommands: `info`, `checkpoints`, `files`, `plan`, `rename`, `cleanup`, `prune`, `delete`, `delete-all`. |
249-
| `/settings [show\|[KEY VALUE]\|reset KEY]` | Open the settings dialog, set a setting inline with a KEY and VALUE, or reset a setting to its default. See [AUTOTITLE](/copilot/reference/copilot-cli-reference/cli-config-dir-reference#configuration-file-settings). |
249+
| `/settings [show KEY\|KEY\|KEY VALUE]`,<br>`/config [show KEY\|KEY\|KEY VALUE]` | Open the settings editor, open it focused on a specific setting (`KEY`), set a setting inline (`KEY VALUE`), or display a setting's current value (`show KEY`). See [AUTOTITLE](/copilot/how-tos/copilot-cli/customize-copilot/change-settings). |
250250
| `/share [file\|html\|gist] [session\|research] [PATH]`, `/export [file\|html\|gist] [session\|research] [PATH]` | Share the session to a Markdown file, interactive HTML file, or {% data variables.product.github %} gist. |
251251
| `/skills [list\|info\|add\|remove\|reload] [ARGS...]` | Manage skills for enhanced capabilities. See [AUTOTITLE](/copilot/how-tos/copilot-cli/customize-copilot/create-skills). |
252252
| `/statusline`, `/footer` | Configure which items appear in the status line. |
253253
| `/subagents`, `/agents` | Configure default and per-agent subagent models. See [AUTOTITLE](/copilot/reference/copilot-cli-reference/cli-config-dir-reference#configuration-file-settings). |
254254
| `/tasks` | View and manage tasks (subagents and shell commands). |
255255
| `/terminal-setup` | Configure the terminal for multiline input support (<kbd>Shift</kbd>+<kbd>Enter</kbd> and <kbd>Ctrl</kbd>+<kbd>Enter</kbd>). |
256-
| `/theme [default\|dim\|high-contrast\|colorblind]` | View or set the color mode. |
256+
| `/theme [default\|github\|dim\|high-contrast\|colorblind]` | View or set the color mode. |
257257
| `/tuikit [colors\|icons\|select\|tabbar]` | Preview TUIkit design-system components and color tokens. |
258258
| `/undo`, `/rewind` | Rewind the last turn and revert file changes. File tracking is done via the tool layer and does not require Git. |
259259
| `/update`, `/upgrade` | Update the CLI to the latest version. |

content/copilot/reference/copilot-cli-reference/cli-config-dir-reference.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,9 @@ The following files are designed to be edited by you directly, or managed throug
5353

5454
### `settings.json`
5555

56-
This is the primary configuration file for {% data variables.copilot.copilot_cli_short %}. Within a session, you can use the interactive `/settings` command to change specific values, or run `/settings KEY VALUE` to set a single value, or edit the file directly in a text editor. The file supports JSON with comments (JSONC).
56+
This is the primary configuration file for {% data variables.copilot.copilot_cli_short %}. Within a session, you can use the interactive `/settings` command to change specific values, or run `/settings KEY VALUE` to set a single value. See [AUTOTITLE](/copilot/how-tos/copilot-cli/customize-copilot/change-settings). Alternatively, you can edit the `settings.json` file directly in a text editor. The file supports JSON with comments (JSONC).
57+
58+
By default, this file is located in the `~/.copilot` directory, which is the user-level configuration directory. It contains global user-level defaults for all repositories. You can change the location of this directory by setting the `COPILOT_HOME` environment variable to a different path.
5759

5860
> [!NOTE]
5961
> User-editable settings were originally stored in `config.json`. They have been moved to `settings.json`. Any user settings present in `config.json` on startup are automatically migrated to `settings.json`.
@@ -438,7 +440,7 @@ These settings apply across all your sessions and repositories. You can use the
438440
| `beepOnSchedule` | `boolean` | `true` | Play an audible beep when a scheduled `/every` or `/after` run finishes. |
439441
| `builtInAgents.rubberDuck` | `boolean` | `true` | Enable the rubber-duck subagent that provides adversarial feedback on agent plans. |
440442
| `builtInAgents.rubberDuckAutoInvoke` | `boolean` | `false` | Include proactive prompting for automatic rubber-duck invocation. Set to `true` to opt into additional rubber-duck nudges during agent turns. |
441-
| `colorMode` | `"default"` \| `"github"` \| `"dim"` \| `"high-contrast"` \| `"colorblind"` | `"default"` | Color contrast mode. Managed by the `/settings` and `/theme` slash commands. |
443+
| `colorMode` | `"default"` \| `"github"` \| `"dim"` \| `"high-contrast"` \| `"colorblind"` | `"github"` | Color palette mode. Managed by the `/settings` and `/theme` slash commands. |
442444
| `compactPaste` | `boolean` | `true` | Collapse large pastes (more than 10 lines) into compact tokens. |
443445
| `companyAnnouncements` | `string[]` | `[]` | Custom messages shown randomly on startup. One message is randomly selected each time the CLI starts. Useful for team announcements or reminders. |
444446
| `continueOnAutoMode` | `boolean` | `false` | Automatically switch to auto mode when rate-limited. When `true`, eligible rate limit errors trigger an automatic switch to auto mode and retry. Does not apply to global rate limits or BYOK providers. |

0 commit comments

Comments
 (0)