Skip to content

Commit bc23580

Browse files
crwaters16vgrltwinvgrlsubatoi
authored
[CLI] Settings slash command (#61633)
Co-authored-by: vgrltwin <vgrl+twin@github.com> Co-authored-by: Vanessa <vgrl@github.com> Co-authored-by: Ben Ahmady <32935794+subatoi@users.noreply.github.com>
1 parent 1ec8d5a commit bc23580

3 files changed

Lines changed: 15 additions & 2 deletions

File tree

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

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,18 @@ You can run {% data variables.copilot.copilot_cli_short %} sessions inside a san
283283
284284
Press <kbd>Ctrl</kbd>+<kbd>T</kbd> to show or hide the model's reasoning process while it generates a response. This setting persists across sessions, allowing you to observe how {% data variables.product.prodname_copilot_short %} works through complex problems.
285285
286+
### Configure settings
287+
288+
You can view and change {% data variables.copilot.copilot_cli_short %} settings using the `/settings` slash command.
289+
290+
* Run `/settings` to open an interactive settings dialog, where you can search for a setting by name and edit it.
291+
* 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`.
292+
* Run `/settings reset KEY` to restore a setting to its default value.
293+
294+
Some settings, such as the color mode, take effect immediately when you save them.
295+
296+
For the full list of available settings, see [AUTOTITLE](/copilot/reference/copilot-cli-reference/cli-config-dir-reference#configuration-file-settings).
297+
286298
## Find out more
287299
288300
For a complete list of the command line options and slash commands that you can use with {% data variables.copilot.copilot_cli_short %}, do one of the following:

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,7 @@ Holding <kbd>↑</kbd> or <kbd>↓</kbd> accelerates scrolling after the first 1
244244
| `/sandbox [enable\|disable]` | Configure shell command sandboxing. |
245245
| `/search [QUERY]`, `/find [QUERY]` | Search the conversation timeline. {% data reusables.copilot.experimental %} |
246246
| `/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`. |
247+
| `/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). |
247248
| `/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. |
248249
| `/skills [list\|info\|add\|remove\|reload] [ARGS...]` | Manage skills for enhanced capabilities. See [AUTOTITLE](/copilot/how-tos/copilot-cli/customize-copilot/create-skills). |
249250
| `/statusline`, `/footer` | Configure which items appear in the status line. |

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

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

5151
### `settings.json`
5252

53-
This is the primary configuration file for {% data variables.copilot.copilot_cli_short %}. You can edit it directly in a text editor, or use interactive commands like `/model` and `/theme` to change specific values from within a session. The file supports JSON with comments (JSONC).
53+
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).
5454

5555
> [!NOTE]
5656
> 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`.
@@ -204,7 +204,7 @@ Settings cascade from user to repository to local, with more specific scopes ove
204204

205205
### User settings (`~/.copilot/settings.json`)
206206

207-
These settings apply across all your sessions and repositories. You can edit this file directly, or use slash commands to update individual values.
207+
These settings apply across all your sessions and repositories. You can use the `/settings` slash command to run an interactive dialog, or use specific slash commands to update individual values, or edit this file directly.
208208

209209
| Key | Type | Default | Description |
210210
|-----|------|---------|-------------|

0 commit comments

Comments
 (0)