Skip to content

Commit f5f0de1

Browse files
docs-engineering-bot[bot]github-actions[bot]hubwriter
authored
docs: update copilot-cli content from source docs (#62371)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: hubwriter <hubwriter@github.com>
1 parent 43b4ffa commit f5f0de1

5 files changed

Lines changed: 132 additions & 15 deletions

File tree

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

Lines changed: 43 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,7 @@ With `--skill`, pass either a skill name or the path to a custom skill directory
167167
| `@ FILENAME` | Include file contents in the context. |
168168
| `# NUMBER` | Include a {% data variables.product.github %} issue or pull request in the context. |
169169
| `! COMMAND` | Execute a command in your local shell, bypassing {% data variables.product.prodname_copilot_short %}. Enter `!` alone on an empty prompt to enter shell mode for running multiple shell commands in sequence. Press <kbd>Esc</kbd> or <kbd>Ctrl</kbd>+<kbd>C</kbd> on an empty prompt to exit shell mode. |
170+
| `$` | Type a lone `$` at the prompt to hand the terminal over to a real interactive shell (`$SHELL` on Unix, `%COMSPEC%` on Windows) rooted at the session's working directory. Unlike `!` shell mode, this suspends the CLI UI entirely, so job control, full-screen apps, tab completion, and colors all work natively. Exit the shell (`exit`, or <kbd>Ctrl</kbd>+<kbd>D</kbd> on Unix) to return to the CLI. Only activates for a local, trusted, idle session on a real TTY. Can be disabled in enterprise managed settings. Disabled by default. Enable it with the `shellShortcut` setting—see [AUTOTITLE](/copilot/reference/copilot-cli-reference/cli-config-dir-reference#configuration-file-settings). |
170171
| `?` | Open quick help (on an empty prompt). Press again to dismiss and insert a literal `?`. |
171172
| <kbd>Esc</kbd> | Cancel the current operation. Press twice to interrupt the running turn, or to stop background agents when the main agent is idle. |
172173
| <kbd>Ctrl</kbd>+<kbd>C</kbd> | Cancel operation / clear input. Press twice to exit. |
@@ -290,7 +291,7 @@ These are the slash commands you can use from within an interactive CLI session.
290291
| `/downgrade VERSION` | Download and restart into a specific CLI version. Available for team accounts. |
291292
| `/env` | Show loaded environment details (instructions, MCP servers, skills, agents, hooks, plugins, LSPs, extensions). |
292293
| `/every [INTERVAL PROMPT]`, `/every` | Schedule a recurring prompt, skill, or schedulable slash command for the current session (for example, `/every 1h run tests` or `/every 1d /chronicle standup`). With no arguments the schedule manager is displayed. {% data reusables.copilot.experimental %} |
293-
| `/exit`, `/quit` | Exit the CLI. |
294+
| `/exit`, `/quit` | Close the current session. If other sessions are running, this foregrounds the newest remaining one instead of quitting. Quits the CLI only when it is the last open session. `/exit print` always tears down the CLI and offers to dump the transcript. |
294295
| `/extensions [manage\|mode]`, `/extension` | Manage CLI extensions. |
295296
| `/experimental [on\|off\|show]` | Toggle, set, or show experimental features. |
296297
| `/feedback`, `/bug` | Provide feedback about the CLI. |
@@ -308,10 +309,22 @@ These are the slash commands you can use from within an interactive CLI session.
308309
| `/logout` | Log out of {% data variables.product.prodname_copilot_short %}. |
309310
| `/lsp [show\|test\|reload\|logs\|help] [SERVER-NAME]` | Manage the language server configuration. The `logs` subcommand opens the live LSP services log panel. |
310311
| `/mcp [list\|show\|add\|edit\|delete\|disable\|enable\|auth\|reload\|search] [SERVER-NAME]` | Manage the MCP server configuration. `list` (alias `ls`) prints a plain-text list of configured servers with connection status and live state, and is read-only, so it can run while the agent is busy processing a turn; all other subcommands are blocked until the turn finishes. Sandboxed local servers show a `connected (sandboxed)` status. See [AUTOTITLE](/copilot/how-tos/copilot-cli/customize-copilot/add-mcp-servers#managing-mcp-servers). |
311-
| `/model [--repo\|--local] [MODEL]`, `/models` | Select the AI model you want to use, or choose **Auto**. `--repo`/`--local` pins the default model in repository settings instead of the current session. Press <kbd>Tab</kbd> on a model with a long-context variant to toggle its Context column between the default and long-context window. See [AUTOTITLE](/copilot/concepts/models/auto-model-selection). |
312+
| `/model [--repo\|--local\|--session] [MODEL]`, `/models` | Select the AI model you want to use, or choose **Auto**. `--repo`/`--local` pins the default model in repository settings instead of the current session; `--session` (alias `-s`) changes the model, reasoning effort, or context window for the current session only, without touching saved settings. Press <kbd>Tab</kbd> on a model with a long-context variant to toggle its Context column between the default and long-context window. See [AUTOTITLE](/copilot/concepts/models/auto-model-selection). |
312313
| `/permissions [show\|reset]` | View or clear in-memory tool and path approvals for the current session. |
313314
| `/plan [PROMPT]` | Create an implementation plan before coding. |
314-
| `/plugin [marketplace\|install\|uninstall\|update\|list] [ARGS...]` | Manage plugins and plugin marketplaces. `list` (alias `ls`, including bare `/plugin`) is read-only and can run while the agent is busy processing a turn; all other subcommands are blocked until the turn finishes. See [AUTOTITLE](/copilot/concepts/agents/about-plugins). |
315+
| `/plugins` (alias `/plugin`) | Manage plugins, MCP servers, and skills; opens the plugins dashboard, or run with `--plugin`, `--mcp`, or `--skill` to open it focused on that tab. See [AUTOTITLE](/copilot/concepts/agents/about-plugins). |
316+
| `/plugins help` | Show full `/plugins` command usage. |
317+
| `/plugins install SOURCE` | Install a plugin from a marketplace spec, {% data variables.product.github %} repository, git URL, or local path. |
318+
| `/plugins install --skill [--project] <FILE\|URL\|DIRECTORY>` | Install a skill; `--project` scopes a file or URL install to this repository instead of your user account. |
319+
| `/plugins update PLUGIN[@MARKETPLACE]` | Update an installed plugin. |
320+
| `/plugins uninstall PLUGIN[@MARKETPLACE]` | Uninstall a plugin. |
321+
| `/plugins list` (alias `/plugin ls`) | List installed plugins. |
322+
| `/plugins enable\|disable\|remove --plugin\|--mcp\|--skill NAME` | Enable, disable, or remove/uninstall a plugin, MCP server, or skill by name; defaults to `--plugin` when no kind is given. |
323+
| `/plugins marketplace add SOURCE` | Add a marketplace. |
324+
| `/plugins marketplace remove NAME` | Remove a marketplace. |
325+
| `/plugins marketplace list` | List registered marketplaces. |
326+
| `/plugins marketplace browse NAME` | Browse plugins in a marketplace. |
327+
| `/plugins mcp [SUBCOMMAND]` | Delegates to `/mcp`; manage MCP servers from the plugins dashboard. |
315328
| `/pr [view\|create\|fix\|auto\|automerge]` | Manage pull requests for the current branch. `auto` drives the pull request to green and stops; `automerge` (alias: `agentmerge`) drives the pull request to green and merges it. See [AUTOTITLE](/copilot/how-tos/copilot-cli/use-copilot-cli/manage-pull-requests). |
316329
| `/refine TEXT` | Rewrite a roughly composed prompt into a clear one for review. Run with no arguments (via <kbd>Ctrl</kbd>+<kbd>X</kbd> then `/refine`) to clean up the current input box. Can be particularly useful for prompts entered by speaking. |
317330
| `/remote [on\|off]` | Show the remote control status (if no argument provided), enable remote steering (`on`), or end the remote connection (`off`). See [AUTOTITLE](/copilot/how-tos/copilot-cli/use-copilot-cli/steer-remotely). |
@@ -326,7 +339,7 @@ These are the slash commands you can use from within an interactive CLI session.
326339
| `/search [QUERY]`, `/find [QUERY]` | Search the conversation timeline. {% data reusables.copilot.experimental %} |
327340
| `/security-review [PROMPT]` | Run a focused security review of active local code changes and return prioritized vulnerability findings with remediation suggestions. This command is not a full repository security audit. |
328341
| `/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`. |
329-
| `/settings [--repo\|--local] [show KEY\|KEY\|KEY VALUE]`,<br>`/config [--repo\|--local] [show KEY\|KEY\|KEY VALUE]` | Open the settings dialog, open it focused on a specific setting (`KEY`), set a setting inline (`KEY VALUE`), or display a setting's current value (`show KEY`). The dialog shows **User**, **Repo**, and **Repo (local)** tabs—switch with <kbd>Tab</kbd>/<kbd>Shift</kbd>+<kbd>Tab</kbd>; a setting overridden in another scope shows a badge naming which scope wins. Add `--repo` or `--local` to target `.github/copilot/settings.json` or `.github/copilot/settings.local.json` instead of the user settings file—for example, `/settings --repo model gpt-5.2`. Only [repo-overridable keys](/copilot/reference/copilot-cli-reference/cli-config-dir-reference#repository-settings-githubcopilotsettingsjson) can be set this way. Rows governed by an active organization or MDM managed policy render read-only with a `(managed)` tag. See [AUTOTITLE](/copilot/how-tos/copilot-cli/customize-copilot/change-settings). |
342+
| `/settings [--repo\|--local] [show KEY\|KEY\|KEY VALUE]`,<br>`/config [--repo\|--local] [show KEY\|KEY\|KEY VALUE]` | Open the settings dialog, open it focused on a specific setting (`KEY`), set a setting inline (`KEY VALUE`), or display a setting's current value (`show KEY`). `show` masks secret-named values (for example, tokens or API keys nested under a setting) instead of printing them in clear text. The dialog shows **User**, **Repo**, and **Repo (local)** tabs—switch with <kbd>Tab</kbd>/<kbd>Shift</kbd>+<kbd>Tab</kbd>; a setting overridden in another scope shows a badge naming which scope wins. Add `--repo` or `--local` to target `.github/copilot/settings.json` or `.github/copilot/settings.local.json` instead of the user settings file—for example, `/settings --repo model gpt-5.2`. Only [repo-overridable keys](/copilot/reference/copilot-cli-reference/cli-config-dir-reference#repository-settings-githubcopilotsettingsjson) can be set this way. Rows governed by an active organization or MDM managed policy render read-only with a `(managed)` tag. See [AUTOTITLE](/copilot/how-tos/copilot-cli/customize-copilot/change-settings). |
330343
| `/share [link\|off\|file\|html\|gist\|research] [...]`, `/export [...]` | Share the current session. With no subcommand, generates a shareable {% data variables.product.github %} link when you're logged in and synced (falls back to Markdown file export otherwise). `off` stops sharing. `link` is an explicit alias for the default link flow; `link off` stops link sharing. `file [session\|research] [PATH]` exports to a Markdown file. `html [session\|research] [PATH]` exports to an HTML file. `gist [session\|research]` creates a {% data variables.product.github %} gist. `research [PATH]` exports the research report. |
331344
| `/skills [list\|info\|add\|remove\|reload] [ARGS...]` | Manage skills for enhanced capabilities. See [AUTOTITLE](/copilot/how-tos/copilot-cli/customize-copilot/add-skills). |
332345
| `/statusline`, `/footer` | Configure which items appear in the status line. |
@@ -412,7 +425,7 @@ For a complete list of available slash commands enter `/help` in the CLI's inter
412425
| `--plugin-dir=DIRECTORY` | Load a plugin from a local directory (can be used multiple times). |
413426
| `--remote` | Enable remote access to this session from {% data variables.product.prodname_dotcom_the_website %} and {% data variables.product.prodname_mobile %}. See [AUTOTITLE](/copilot/how-tos/copilot-cli/use-copilot-cli/steer-remotely). |
414427
| `--remote-export` | Export your session to {% data variables.product.prodname_dotcom_the_website %} and {% data variables.product.prodname_mobile %} (read-only; does not enable remote control). |
415-
| `-r`, `--resume[=VALUE]` | Resume a previous interactive session by choosing from a list. Optionally specify a session ID, ID prefix, or session name. Name matching is exact and case-insensitive; falls back to the auto-generated summary when no explicit name matches. Conflicts with `--continue`. |
428+
| `-r`, `--resume[=VALUE]` | Resume a previous interactive session by choosing from a list. Optionally specify a session ID, ID prefix, or session name. Name matching is exact and case-insensitive; falls back to the auto-generated summary when no explicit name matches. Conflicts with `--continue`. Bare `--resume` (no value) shows an interactive session picker, which requires a TTY. If multiple sessions exist and the picker can't be shown (for example under `-p`, a non-TTY `-i`, or piped stdin), the CLI exits with an error instead of silently starting a new session—pass an explicit `--resume=SESSION-ID` or use `--continue`. |
416429
| `-s`, `--silent` | Output only the agent response (without usage statistics), useful for scripting with `-p`. |
417430
| `--screen-reader` | Enable screen reader optimizations. |
418431
| `--secret-env-vars=VAR ...` | Redact an environment variable from shell and MCP server environments (can be used multiple times). For multiple variables, use a quoted, comma-separated list. The values in the `GITHUB_TOKEN` and `COPILOT_GITHUB_TOKEN` environment variables are redacted from output by default. |
@@ -626,6 +639,10 @@ MCP servers provide additional tools to the CLI agent. Configure persistent serv
626639

627640
Local (stdio) servers that spawn inside the sandbox (see the `/sandbox` slash command) show a `connected (sandboxed)` status in `copilot mcp list` and `/mcp list`, since remote (HTTP/SSE) servers are never sandboxed. {% data reusables.copilot.experimental %}
628641

642+
`copilot mcp list` and `/mcp list` mark a disabled server with a `(disabled)` suffix in text output, or `"enabled": false` per server in `--json` output. `copilot mcp get` shows a `Status: Enabled`/`Disabled` line.
643+
644+
Toggling `/sandbox` restarts only local (stdio) MCP servers, since they spawn inside the sandbox. Remote (HTTP/SSE) servers stay connected.
645+
629646
### `copilot mcp` subcommand
630647

631648
Use `copilot mcp` to manage MCP server configurations from the command line without starting an interactive session.
@@ -898,6 +915,20 @@ Remote skills are projected alongside local skills and follow the same name-base
898915

899916
When two plugins provide skills with the same name, both coexist using plugin-qualified invocation names such as `/my-plugin/search` and `/other-plugin/search`. The bare name routes to the higher-priority plugin. This applies to skills only; commands keep the standard tier-based deduplication, where the higher-priority source wins.
900917

918+
### Installing a skill non-interactively
919+
920+
Use `copilot plugins install --skill` to install a skill from a file, URL, or directory without opening an interactive session:
921+
922+
```bash
923+
# Install for your user account (default scope)
924+
copilot plugins install --skill ./my-skill/SKILL.md
925+
926+
# Install into the current project (.github/skills; file or URL skills only)
927+
copilot plugins install --skill --scope project ./my-skill/SKILL.md
928+
```
929+
930+
Installing a directory registers it as a custom skill source rather than copying it. Installing a file or URL copies the skill's content into your personal or project skills directory. The equivalent interactive command is `/plugins install --skill [--project] <FILE|URL|DIRECTORY>`. For the full option reference, see [AUTOTITLE](/copilot/reference/copilot-cli-reference/cli-plugin-reference#copilot-plugins-install-options).
931+
901932
### Commands (alternative skill format)
902933

903934
Commands are an alternative to skills stored as individual `.md` files in `.claude/commands/`. The command name is derived from the filename. Command files use a simplified format (no `name` field required) and support `argument-hint`, `description`, `allowed-tools`, and `disable-model-invocation`. Commands have lower priority than skills with the same name.
@@ -1180,10 +1211,10 @@ The runtime emits a hierarchical span tree for each agent interaction. Each tree
11801211

11811212
Wraps the entire agent invocation: all LLM calls and tool executions for one user message.
11821213

1183-
* **Top-level sessions** use span kind `CLIENT` (remote service invocation) with `server.address` and `server.port`.
1184-
* **Subagent invocations** (for example, explore, task) use span kind `INTERNAL` (in-process) without server attributes.
1214+
* Both **top-level sessions** and **subagent invocations** (for example, explore, task) use span kind `INTERNAL` (in-process); provider-facing inference is represented by child `CLIENT` `chat` spans.
1215+
* **Top-level sessions** additionally carry `server.address` and `server.port`; subagent invocations do not.
11851216

1186-
| Attribute | Description | Span kind |
1217+
| Attribute | Description | Scope |
11871218
|-----------|-------------|-----------|
11881219
| `gen_ai.operation.name` | `invoke_agent` | Both |
11891220
| `gen_ai.provider.name` | Provider (for example, `github`, `anthropic`) | Both |
@@ -1202,8 +1233,8 @@ Wraps the entire agent invocation: all LLM calls and tool executions for one use
12021233
| `github.copilot.turn_count` | Number of LLM round-trips | Both |
12031234
| `github.copilot.cost` | Monetary cost | Both |
12041235
| `github.copilot.aiu` | AI units consumed | Both |
1205-
| `server.address` | Server hostname | `CLIENT` only |
1206-
| `server.port` | Server port | `CLIENT` only |
1236+
| `server.address` | Server hostname | Top-level only |
1237+
| `server.port` | Server port | Top-level only |
12071238
| `error.type` | Error class name (on error) | Both |
12081239
| `gen_ai.input.messages` | Full input messages as JSON (content capture only) | Both |
12091240
| `gen_ai.output.messages` | Full output messages as JSON (content capture only) | Both |
@@ -1268,6 +1299,8 @@ One span per tool call. Span kind: `INTERNAL`.
12681299
| `gen_ai.client.token.usage` | Histogram | tokens | Token counts by type (`input`/`output`) |
12691300
| `gen_ai.client.operation.time_to_first_chunk` | Histogram | s | Time to receive first streaming chunk |
12701301
| `gen_ai.client.operation.time_per_output_chunk` | Histogram | s | Inter-chunk latency after first chunk |
1302+
| `gen_ai.invoke_agent.inference_calls` | Histogram | `{inference_call}` | Number of model calls made during one agent invocation, counted at provider dispatch (failed and partial calls included; requests blocked before dispatch excluded). Dimension: `gen_ai.agent.name`. |
1303+
| `gen_ai.invoke_agent.tool_calls` | Histogram | `{tool_call}` | Number of client-side tool calls made during one agent invocation (failed and partial calls included; synthetic CLI tool lifecycles and provider-executed server-side tools excluded). Dimension: `gen_ai.agent.name`. |
12711304

12721305
#### Vendor-specific metrics
12731306

0 commit comments

Comments
 (0)