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
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>
Copy file name to clipboardExpand all lines: content/copilot/reference/copilot-cli-reference/cli-command-reference.md
+7Lines changed: 7 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -278,11 +278,15 @@ For a complete list of available slash commands enter `/help` in the CLI's inter
278
278
|`--allow-all-urls`| Allow access to all URLs without confirmation. |
279
279
|`--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). |
280
280
|`--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. |
281
283
|`--autopilot`| Enable autopilot continuation in prompt mode. See [AUTOTITLE](/copilot/concepts/agents/copilot-cli/autopilot). |
282
284
|`--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). |
283
285
|`--banner`, `--no-banner`| Show or hide the startup banner. |
284
286
|`--bash-env`| Enable `BASH_ENV` support for bash shells. |
287
+
|`-C DIRECTORY`| Change working directory before doing anything else. |
285
288
|`--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". |
286
290
| `--config-dir=DIRECTORY` | This option for setting the configuration directory is deprecated. Use the `COPILOT_HOME` environment variable instead. | <!-- markdownlint-disable-line GHD046 -->
287
291
|`--continue`| Resume the most recent session in the current working directory, falling back to the globally most recent session. |
288
292
|`--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
292
296
|`--disallow-temp-dir`| Prevent automatic access to the system temporary directory. |
293
297
|`--effort=LEVEL`, `--reasoning-effort=LEVEL`| Set the reasoning effort level (`low`, `medium`, `high`, `xhigh`, `max`). `max` is the highest-depth tier for Anthropic models. |
294
298
|`--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). |
295
300
|`--enable-reasoning-summaries`| Request reasoning summaries for OpenAI models that support it. |
296
301
|`--excluded-tools=TOOL ...`| These tools will not be available to the model. For multiple tools, use a quoted, comma-separated list. |
297
302
|`--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. |
298
304
|`-h`, `--help`| Display help. |
299
305
|`-i PROMPT`, `--interactive=PROMPT`| Start an interactive session and automatically execute this prompt. |
300
306
|`--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
322
328
|`-s`, `--silent`| Output only the agent response (without usage statistics), useful for scripting with `-p`. |
|`--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. |
325
332
|`--share=PATH`| Share a session to a Markdown file after completion of a programmatic session (default path: `./copilot-session-<ID>.md`). |
326
333
|`--share-gist`| Share a session to a secret {% data variables.product.github %} gist after completion of a programmatic session. |
327
334
| `--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