Skip to content

Commit a4e587c

Browse files
hubwriterCopilotsubatoi
authored
Copilot CLI: Update CLI command-line options reference (#61787)
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Co-authored-by: Ben Ahmady <32935794+subatoi@users.noreply.github.com>
1 parent acca433 commit a4e587c

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,11 +278,15 @@ For a complete list of available slash commands enter `/help` in the CLI's inter
278278
| `--allow-all-urls` | Allow access to all URLs without confirmation. |
279279
| `--allow-tool=TOOL ...` | Tools the CLI has permission to use. Will not prompt for permission. For multiple tools, use a quoted, comma-separated list. See [AUTOTITLE](/copilot/how-tos/copilot-cli/allowing-tools#allowing-or-denying-permission-for-specific-tools). |
280280
| `--allow-url=URL ...` | Allow access to specific URLs or domains. For multiple URLs, use a quoted, comma-separated list. |
281+
| `--acp` | Start as Agent Client Protocol server. |
282+
| `--attachment PATH` | Attach a file to the initial prompt (can be used multiple times). Image files are accepted, but sending them successfully requires the selected model and organization policy to allow vision input. |
281283
| `--autopilot` | Enable autopilot continuation in prompt mode. See [AUTOTITLE](/copilot/concepts/agents/copilot-cli/autopilot). |
282284
| `--available-tools=TOOL ...` | Only these tools will be available to the model. For multiple tools, use a quoted, comma-separated list. See [AUTOTITLE](/copilot/how-tos/copilot-cli/allowing-tools). |
283285
| `--banner`, `--no-banner` | Show or hide the startup banner. |
284286
| `--bash-env` | Enable `BASH_ENV` support for bash shells. |
287+
| `-C DIRECTORY` | Change working directory before doing anything else. |
285288
| `--connect[=SESSION-ID]` | Connect directly to a remote session (optionally specify a session ID or task ID). Conflicts with `--resume` and `--continue`. |
289+
| `--context TIER`. | Set the context window tier (overrides the persisted setting). Choices: "default", "long_context". |
286290
| `--config-dir=DIRECTORY` | This option for setting the configuration directory is deprecated. Use the `COPILOT_HOME` environment variable instead. | <!-- markdownlint-disable-line GHD046 -->
287291
| `--continue` | Resume the most recent session in the current working directory, falling back to the globally most recent session. |
288292
| `--deny-tool=TOOL ...` | Tools the CLI does not have permission to use. Will not prompt for permission. For multiple tools, use a quoted, comma-separated list. |
@@ -292,9 +296,11 @@ For a complete list of available slash commands enter `/help` in the CLI's inter
292296
| `--disallow-temp-dir` | Prevent automatic access to the system temporary directory. |
293297
| `--effort=LEVEL`, `--reasoning-effort=LEVEL` | Set the reasoning effort level (`low`, `medium`, `high`, `xhigh`, `max`). `max` is the highest-depth tier for Anthropic models. |
294298
| `--enable-all-github-mcp-tools` | Enable all {% data variables.product.github %} MCP server tools, instead of the default CLI subset. Overrides the `--add-github-mcp-toolset` and `--add-github-mcp-tool` options. |
299+
| `--enable-memory` | Enable memory in prompt mode (disabled by default). |
295300
| `--enable-reasoning-summaries` | Request reasoning summaries for OpenAI models that support it. |
296301
| `--excluded-tools=TOOL ...` | These tools will not be available to the model. For multiple tools, use a quoted, comma-separated list. |
297302
| `--experimental` | Enable experimental features (use `--no-experimental` to disable). |
303+
| `--extension-sdk-path DIRECTORY` | Override the bundled `@github/copilot-sdk` injected into extension subprocesses with a local `copilot-sdk/` folder. Invalid paths fall back to the bundled SDK. |
298304
| `-h`, `--help` | Display help. |
299305
| `-i PROMPT`, `--interactive=PROMPT` | Start an interactive session and automatically execute this prompt. |
300306
| `--log-dir=DIRECTORY` | Set the log file directory (default: `~/.copilot/logs/`). |
@@ -322,6 +328,7 @@ For a complete list of available slash commands enter `/help` in the CLI's inter
322328
| `-s`, `--silent` | Output only the agent response (without usage statistics), useful for scripting with `-p`. |
323329
| `--screen-reader` | Enable screen reader optimizations. |
324330
| `--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. |
331+
| `--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. |
325332
| `--share=PATH` | Share a session to a Markdown file after completion of a programmatic session (default path: `./copilot-session-<ID>.md`). |
326333
| `--share-gist` | Share a session to a secret {% data variables.product.github %} gist after completion of a programmatic session. |
327334
| `--stream=MODE` | Enable or disable streaming mode, which displays {% data variables.product.prodname_copilot_short %}'s response progressively as it is generated rather than waiting for the full response to arrive (mode choices: `on` or `off`, default: `on`).

0 commit comments

Comments
 (0)