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 02b4370
Browse filesBrowse the repository at this point in the historyBrowse files
authored
docs: update copilot-cli content from source docs (#63863)
Copy file name to clipboardExpand all lines: content/copilot/reference/copilot-cli-reference/cli-command-reference.md
+5-2Lines changed: 5 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -541,7 +541,7 @@ These are the slash commands you can use from within an interactive CLI session.
541
541
|`/after [DELAY PROMPT]`, `/after`| Schedule a non-recurring prompt, skill, or schedulable slash command for the current session (for example, `/after 30m remind me the time` or `/after 1h /chronicle standup`). With no arguments the schedule manager is displayed. {% data reusables.copilot.experimental %} |
542
542
|`/agent`| Browse and select from available agents (if any). See [AUTOTITLE](/copilot/concepts/agents/copilot-cli/about-custom-agents). |
543
543
|`/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. |
544
-
|`/ask QUESTION`, `/btw QUESTION`| Ask a quick side question without adding to the conversation history. See [AUTOTITLE](/copilot/how-tos/copilot-cli/use-copilot-cli/ask-a-side-question). |
544
+
|`/ask [QUESTION]`, `/btw [QUESTION]`| Ask a quick side question without adding to the conversation history. The response renders as Markdown. In the answer dialog, press <kbd>Ctrl</kbd>+<kbd>E</kbd> to expand it and <kbd>Ctrl</kbd>+<kbd>Y</kbd> to copy the full answer. Enter the command without a question to reopen the last side question answer in the current session. See [AUTOTITLE](/copilot/how-tos/copilot-cli/use-copilot-cli/ask-a-side-question). |
545
545
|`/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. |
546
546
| `/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 prompt box, 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. |
547
547
|`/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. |
@@ -601,7 +601,7 @@ These are the slash commands you can use from within an interactive CLI session.
601
601
|`/resume [SESSION-ID]`, `/continue [SESSION-ID]`| Switch to a different session by choosing from a list (optionally specify a session ID). |
602
602
|`/review [PROMPT]`| Run the code review agent to analyze changes. See [AUTOTITLE](/copilot/how-tos/copilot-cli/use-copilot-cli/agentic-code-review). |
603
603
|`/rubber-duck [PROMPT]`| Consult the rubber duck agent for a second opinion on plans, code, and tests. See [AUTOTITLE](/copilot/concepts/agent-capabilities/choosing-and-delegating-agent-work/getting-a-second-opinion). |
604
-
|`/sandbox [config\|status\|policy [COMMAND]\|enable\|disable]`| Manage sandbox restrictions on filesystem and network access. `config` (or bare `/sandbox`) opens the settings dialog, which suggests possible environment secrets and lets you add masking hosts before saving. `status` shows whether sandboxing is enabled for the current session. When sandboxing is enabled, `policy` shows path grants and restrictions grouped by source and access type, network settings, developer-tool access, and sandbox capabilities. Optionally add a command, such as `/sandbox policy npm install`, to inspect its developer-tool access without running it. `enable` and `disable` normally update your saved setting. If your organization requires sandboxing, `disable` is refused unless bypass is allowed. In that case, disabling applies only to the current session. |
604
+
| `/sandbox [config\|status\|policy [COMMAND]\|enable\|disable]` | Manage sandbox restrictions on filesystem and network access. `config` (or bare `/sandbox`) opens the settings dialog, which suggests possible environment secrets and lets you add masking hosts before saving. The dialog's **General** tab has separate options for enabling sandboxing for the current session and to set the default for new sessions. Changing either option leaves the other unchanged. `/sandbox enable session` and `/sandbox disable session` change sandboxing for the current session without changing your saved default. `status` shows whether sandboxing is enabled for the current session. When sandboxing is enabled, `policy` shows path grants and restrictions grouped by source and access type, network settings, developer-tool access, and sandbox capabilities. Optionally add a command, such as `/sandbox policy npm install`, to inspect its developer-tool access without running it. `enable` and `disable` normally update your saved setting. If your organization requires sandboxing, `disable` is refused unless bypass is allowed. In that case, disabling applies only to the current session. |
605
605
|`/sandbox ca [create\|trust\|rotate\|remove]`| Manage the sandbox's proxy certificate authority. `create` writes it without trusting it. `trust` adds it to OS trust. `rotate` replaces it while preserving its trust state. `remove` drops OS trust. See [Using `copilot sandbox ca`](#using-copilot-sandbox-ca) to run the same operations outside a session, for example on managed devices. |
606
606
|`/search [QUERY]`, `/find [QUERY]`| Search the conversation timeline. |
607
607
|`/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. |
@@ -730,6 +730,7 @@ Use `/collect-debug-logs [file|gist|share] [PATH]` to gather debug logs for trou
|`--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. |
732
732
|`--session-id ID`| Use an exact session or task ID when you do not want `--resume`'s broader matching by ID prefix or session name. If the ID matches an existing session or task, that session or task is resumed. If nothing matches, a new session is created only when the value is a valid UUID. Names and ID prefixes do not create new sessions. Do not combine this option with other session-selection or session-starting options such as `--resume`, `--continue`, or `--connect`, because they compete to decide which session to open or create. |
733
+
|`--trust-folder`| Trust the working directory's hooks, workspace MCP servers, and repository plugin settings for one new non-interactive session (`-p` or piped standard input). The trust is not saved to `trustedFolders` and is not a tool or path permission grant. Cannot be combined with `--resume`, `--continue`, or `--session-id`. |
733
734
|`--sandbox`| Enable the OS-level shell sandbox for this session only, without changing your saved sandbox setting. Useful with `-p`. |
734
735
|`--no-sandbox`| Disable local sandboxing for this session only, without changing your saved sandbox setting. This option is ignored if an enterprise-managed policy has been configured to enforce sandboxing. |
735
736
|`--share=PATH`| Share a session to a Markdown file after completion of a programmatic session (default path: `./copilot-session-<ID>.md`). |
@@ -973,6 +974,8 @@ description: API layer conventions
973
974
Use the shared `ApiError` type for all thrown errors in this directory.
974
975
```
975
976
977
+
Scoped rules at the repository root and in the working directory are delivered automatically when the agent reads or edits a matching file.
978
+
976
979
### Custom instructions imports
977
980
978
981
Instruction files support `@path` imports. Prefix a line with `@` followed by a path to inline the contents of another file. Paths can be relative to the instruction file's directory or absolute. Imports are resolved recursively, up to a depth limit, with cycle and size guards. This is supported in `AGENTS.md`, `CLAUDE.md`, and `.github/copilot-instructions.md`.
Copy file name to clipboardExpand all lines: content/copilot/reference/copilot-cli-reference/cli-programmatic-reference.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -48,6 +48,7 @@ There are a number of command-line options that are particularly useful when run
48
48
|`--no-ask-user`| Prevent the agent from pausing to seek additional user input. |
49
49
|`--output-format=FORMAT`| Set the output format: `text` (the default) or `json`. With `json`, the CLI emits JSONL (one JSON object per line), which is convenient for parsing the agent's output in scripts. |
50
50
|`--secret-env-vars=VAR ...`| An environment variable whose value you want redacted in output. For multiple variables, use a quoted, comma-separated list. Essential for preventing secrets being exposed in logs. The values in the `GITHUB_TOKEN` and `COPILOT_GITHUB_TOKEN` environment variables are redacted by default. |
51
+
|`--trust-folder`| Trust the working directory's hooks, workspace MCP servers, and repository plugin settings for a single new non-interactive session (`-p` or piped standard input). The trust is not saved to `trustedFolders`, does not extend to parent or sibling directories, and does not grant tool, path, or URL permissions. Managed policy still applies. Cannot be combined with `--resume`, `--continue`, or `--session-id`. Only use this for configuration you have reviewed. |
51
52
|`--share=PATH`| Export the session transcript to a markdown file after non-interactive completion (defaults to `./copilot-session-<ID>.md`). Useful for auditing or archiving what the agent did. Note that session transcripts may contain sensitive information. |
52
53
|`--share-gist`| Publish the session transcript as a secret GitHub gist after completion. Convenient for sharing results from CI. Note that session transcripts may contain sensitive information. |
Copy file name to clipboardExpand all lines: content/copilot/reference/hooks-reference.md
+8Lines changed: 8 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -302,6 +302,14 @@ Each hook event delivers a JSON payload to the hook handler. Two payload formats
302
302
***camelCase format** — Configure the event name in camelCase (for example, `sessionStart`). Fields use camelCase.
303
303
***{% data variables.product.prodname_vscode_shortname %} compatible format** — Configure the event name in PascalCase (for example, `SessionStart`). Fields use snake_case to match the {% data variables.product.prodname_vscode_shortname %} {% data variables.product.prodname_copilot_short %} extension format.
304
304
305
+
Hooks that fire inside a subagent include extra fields in their input. Root-agent hook inputs are unchanged.
306
+
307
+
| Field (camelCase) | Field ({% data variables.product.prodname_vscode_shortname %} compatible) | Description |
0 commit comments