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
{{ message }}
Repository navigation
Commit b87a8cf
Browse filesBrowse the repository at this point in the historyBrowse files
authored
docs: update copilot-cli content from source docs (#62935)
Copy file name to clipboardExpand all lines: content/copilot/reference/copilot-cli-reference/cli-command-reference.md
+13-4Lines changed: 13 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -196,6 +196,7 @@ With `--skill`, pass either a skill name or the path to a custom skill directory
196
196
| <kbd>Ctrl</kbd>+<kbd>X</kbd> then `/`| After you have started typing a prompt, this allows you to run a slash command—for example, if you want to change the model without having to retype your prompt. |
197
197
| <kbd>Ctrl</kbd>+<kbd>X</kbd> then `e`| Edit the prompt in an external editor (`$EDITOR`). |
198
198
| <kbd>Ctrl</kbd>+<kbd>X</kbd> then `b`| Promote the running task or shell command to the background. |
199
+
| <kbd>Ctrl</kbd>+<kbd>X</kbd> then `g`| Collapse or expand the autopilot goal panel. |
199
200
| <kbd>Ctrl</kbd>+<kbd>X</kbd> then `o`| Open the most recent link from the timeline. |
200
201
| <kbd>Ctrl</kbd>+<kbd>X</kbd> then `v`| Toggle voice dictation on or off. |
201
202
| <kbd>Ctrl</kbd>+<kbd>Z</kbd> | Suspend the process to the background (Unix). |
@@ -315,7 +316,7 @@ These are the slash commands you can use from within an interactive CLI session.
315
316
|`/app`| Open the current session in the {% data variables.copilot.github_copilot_app %} (requires version 1.1.3 or later), or show the download URL if the app is not installed. |
316
317
|`/ask QUESTION`| Ask a quick side question without adding to the conversation history. |
317
318
|`/allow-all [off\|auto\|show]`, `/yolo [off\|auto\|show]`| Enable all permissions (tools, paths, and URLs). This is an alias for `/permissions allow-all`; see the `/permissions` row for the canonical command and its subcommands. |
318
-
| `/autopilot [OBJECTIVE]`, `/goal [OBJECTIVE]` | Start or refocus autopilot mode, optionally with an explicit objective (for example, `/goal Refactor the auth module`). Without an objective, autopilot infers intent from context, and the status panel shows your last prompt as the inferred objective. You can cap AI-credit spend for the objective by using `--max-ai-credits N` (for example, `/goal Refactor the auth module --max-ai-credits 5`). When the cap is reached, autopilot pauses and opens a panel reporting credits used against the cap. Enter a new amount to resume with a fresh credit window, or dismiss the panel to stay paused. You can also resume a paused objective yourself, without the panel, by running the option on its own with no objective text—for example, `/goal --max-ai-credits 5`. This is the same action the panel performs: it opens a fresh window of the credits you specify (the full new cap, not an increment) and continues the objective. `/goal on` and `/goal off` toggle autopilot mode without setting an objective and don't accept `--max-ai-credits`. |
319
+
| `/autopilot [OBJECTIVE]`, `/goal [OBJECTIVE]` | Start or refocus autopilot mode, optionally with an explicit objective (for example, `/goal Refactor the auth module`). Without an objective, autopilot infers intent from context, and the status panel shows your last prompt as the inferred objective. You can cap AI-credit spend for the objective by using `--max-ai-credits N` (for example, `/goal Refactor the auth module --max-ai-credits 5`). When the cap is reached, autopilot pauses and opens a panel reporting credits used against the cap. Enter a new amount to resume with a fresh credit window, or dismiss the panel to stay paused. You can also resume a paused objective yourself, without the panel, by running the option on its own with no objective text—for example, `/goal --max-ai-credits 5`. This is the same action the panel performs: it opens a fresh window of the credits you specify (the full new cap, not an increment) and continues the objective. `/goal on` and `/goal off` toggle autopilot mode without setting an objective and don't accept `--max-ai-credits`. An active goal renders as a pinned panel above the composer, showing the objective, credits used, and todo progress. The panel auto-collapses to a single identity row on short terminals (below 30 rows) and expands above that threshold; press <kbd>Ctrl</kbd>+<kbd>X</kbd> then `g` to override the automatic sizing by hand. |
319
320
|`/changelog [summarize] [VERSION\|last N\|since VERSION]`, `/release-notes [summarize] [VERSION\|last N\|since VERSION]`| Display the CLI changelog. Optionally specify a version, a count of recent releases, or a starting version. Add the keyword `summarize` for an AI-generated summary. |
320
321
|`/chronicle <standup\|tips\|improve\|reindex\|skills create\|skills review\|skills status>`| Session history tools and insights. The `skills` subcommands draft, review, and track the status of repository skill proposals generated from observed usage. See [AUTOTITLE](/copilot/concepts/agents/copilot-cli/chronicle). |
321
322
|`/clear [PROMPT]`, `/new [PROMPT]`, `/reset [PROMPT]`| Start a new conversation. |
@@ -368,11 +369,11 @@ These are the slash commands you can use from within an interactive CLI session.
368
369
|`/rename [NAME]`| Rename the current session (auto-generates a name if omitted; alias for `/session rename`). |
369
370
|`/research TOPIC`| Run a deep research investigation using {% data variables.product.github %} search and web sources. See [AUTOTITLE](/copilot/concepts/agents/copilot-cli/research). |
370
371
|`/reset-allowed-tools`| Reset the list of allowed tools. |
371
-
|`/restart`| Restart the CLI, preserving the current session. |
372
+
|`/restart`| Restart the CLI, restoring all of the current process's live sessions, not only the foreground one. If the target CLI version can't restore multiple sessions, you're prompted to continue with only the foreground session or cancel. |
372
373
|`/resume [SESSION-ID]`, `/continue [SESSION-ID]`| Switch to a different session by choosing from a list (optionally specify a session ID). |
373
374
|`/review [PROMPT]`| Run the code review agent to analyze changes. See [AUTOTITLE](/copilot/how-tos/copilot-cli/use-copilot-cli/agentic-code-review). |
374
375
|`/rubber-duck [PROMPT]`| Consult the rubber duck agent for a second opinion on plans, code, and tests. See [AUTOTITLE](/copilot/concepts/agents/copilot-cli/rubber-duck). |
375
-
|`/sandbox [config\|status\|policy\|enable\|disable]`| Manage OS-level sandboxing that restricts filesystem and network access for shell commands, MCP/LSP servers, and built-in file/web tools. `config` (or bare `/sandbox`) opens the sandbox settings dialog. `status` shows whether sandboxing is enabled. `policy` shows the effective policy, including path grants, denials, and network access. `enable`/`disable` turn sandboxing on or off directly. {% data reusables.copilot.experimental %} |
376
+
|`/sandbox [config\|status\|policy\|enable\|disable]`| Manage OS-level sandboxing that restricts filesystem and network access for shell commands, MCP/LSP servers, and built-in file/web tools. `config` (or bare `/sandbox`) opens the sandbox settings dialog. `status` shows whether sandboxing is enabled. `policy` shows the effective policy, with path grants grouped by source (user-configured, system, working directory, current session, and `~/.copilot`) and access type, plus the network stance and any detected developer tools. `enable`/`disable` turn sandboxing on or off directly. {% data reusables.copilot.experimental %} |
376
377
|`/search [QUERY]`, `/find [QUERY]`| Search the conversation timeline. |
377
378
|`/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. |
378
379
|`/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`. |
@@ -511,6 +512,8 @@ An enterprise-managed policy can enforce OS-level shell sandboxing as a minimum
511
512
512
513
When a managed policy overrides your setting, the CLI shows a warning in the interactive timeline (or on stderr when using `-p`) so it is clear that the behavior comes from policy enforcement rather than the option failing to work. Contact your administrator if you need the policy changed. The `/sandbox` command is also registered whenever a managed policy forces sandboxing on, even without experimental features enabled, so you can still inspect the effective policy and status while the floor applies. {% data reusables.copilot.experimental %}
513
514
515
+
Adding the managed `sandbox.failIfUnavailable` setting set to `true`, alongside `sandbox.enabled` set to `true`, makes the sandbox mandatory. Instead of falling back to running commands unsandboxed, {% data variables.product.prodname_copilot_short %} blocks model and tool execution if the policy can't be validated, compiled, or enforced by a usable sandbox backend, and you can't disable it. See [AUTOTITLE](/copilot/reference/copilot-cli-reference/cli-config-dir-reference#user-settings-copilotsettingsjson).
516
+
514
517
The CLI also warns when a managed policy enables sandboxing in a session that you did not request, not only when it overrides `--no-sandbox`. This includes sessions where the policy arrives after startup, because server-managed settings are only available after login. The warning is omitted if your own settings or the `--sandbox` option already requested sandboxing, since the session state would then be expected.
515
518
516
519
If a device has a managed policy that could not be read, the CLI fails closed and enforces sandboxing at its most restrictive level. The notice explains that the policy couldn't be determined and tells you to wait for it to resolve. The startup warning for an unsupported host uses the same wording.
@@ -724,6 +727,8 @@ Local (stdio) servers that spawn inside the sandbox (see the `/sandbox` slash co
724
727
725
728
Toggling `/sandbox` restarts only local (stdio) MCP servers, since they spawn inside the sandbox. Remote (HTTP/SSE) servers stay connected.
726
729
730
+
`/mcp edit <name>` rejects a workspace-sourced server—one defined in a repository's `.mcp.json`—instead of opening the user-tier wizard, since saving would silently create a same-name user entry that the workspace one still shadows. The error names the file to edit directly. `/mcp delete <name>` reports the same file when asked to remove a workspace-sourced server.
731
+
727
732
### `copilot mcp` subcommand
728
733
729
734
Use `copilot mcp` to manage MCP server configurations from the command line without starting an interactive session.
@@ -834,6 +839,8 @@ The `--registry` option and other npm configuration options (`--userconfig`, `--
834
839
835
840
Remote MCP servers that use OAuth may show a `needs-auth` status when a token expires or when a different account is required. Use `/mcp auth <server-name>` to trigger a fresh OAuth flow. This opens a browser authentication prompt, allowing you to sign in or switch accounts. After completing the flow, the server reconnects automatically.
836
841
842
+
On Windows, remote MCP servers protected by Microsoft Entra ID authenticate through the OS authentication broker (Web Account Manager) instead, usually with no prompt. On other platforms, and on Windows machines without the broker library, sign-in falls back to the browser flow described above. Passing `--device-code` bypasses the broker and forces the OAuth device code flow rather than the browser flow.
843
+
837
844
### Headless OAuth (`client_credentials` grant)
838
845
839
846
For CI or cron use cases where no browser is available, set `oauthGrantType: "client_credentials"`. This requires:
@@ -1053,6 +1060,8 @@ Custom agents are specialized AI agents defined in Markdown files. The filename
1053
1060
1054
1061
`code-review` and `security-review` never forward a full review to another review agent: launching one already fulfills a request to "use" or "call" a reviewer, so it performs the review itself instead of delegating the whole task to a nested `code-review` or `security-review` subagent, recursively, across the entire delegation chain. `code-review` still hands off to the dedicated `security-review` specialist for security-focused portions of a request, and both agents may delegate narrow, independently scoped fact-finding work to non-review agents such as `explore`.
1055
1062
1063
+
Only the root agent can call `store_memory` or `vote_memory` to save or vote on a memory. Subagents keep read access to stored memories through `read_memories`, but can't write or vote on them.
1064
+
1056
1065
### Custom agent frontmatter fields
1057
1066
1058
1067
| Field | Type | Required | Description |
@@ -1063,7 +1072,7 @@ Custom agents are specialized AI agents defined in Markdown files. The filename
1063
1072
|`model`| string | No | AI model for this agent. When unset, inherits the outer agent's model. When the session model is set to `Auto` (server-selected), subagents always inherit the resolved session model regardless of this field. |
1064
1073
|`name`| string | No | Display name. Defaults to the filename. |
1065
1074
|`reasoningEffort`| string | No | Default reasoning effort for this agent (for example, `"low"`, `"medium"`, or `"high"`). When unset, inherits the outer agent's effort. |
1066
-
|`tools`| string[]| No | Tools available to the agent. Default: `["*"]` (all tools). |
1075
+
|`tools`| string[]| No | Tools available to the agent. Default: `["*"]` (all tools). Include `*` anywhere in the list to grant full tool access—for example, `["view", "*"]` grants every tool, not just `view`. |
1067
1076
1068
1077
`model` and `reasoningEffort` apply whether the agent is dispatched through the `task` tool or started directly—for example, through the SDK's `session.startSubagent`. They're resolved with this precedence, highest first: an explicit per-call value, the `subagents` override in `~/.copilot/settings.json`, the agent definition's `model`/`reasoningEffort` field, then the parent session's value. A declared model or effort that can't be honored falls back to the session's value instead of failing the dispatch.
0 commit comments