Skip to content

Commit 463b05b

Browse files
tpopehubwriterCopilot
authored
Remove --config-dir from Copilot CLI docs (#60988)
Co-authored-by: hubwriter <hubwriter@github.com> Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: hubwriter <54933897+hubwriter@users.noreply.github.com>
1 parent bd54919 commit 463b05b

2 files changed

Lines changed: 8 additions & 21 deletions

File tree

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

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,8 @@ docsTeamMetrics:
3333
| Option | Purpose |
3434
|-------------------------|-----------------------------------------------------------------------------------------------|
3535
| `--host HOST` | {% data variables.product.github %} host URL (default: `https://github.com`). Use this to authenticate with a {% data variables.product.prodname_ghe_cloud %} instance that uses data residency (for example, `https://example.ghe.com`). |
36-
| `--config-dir PATH` | Set the configuration directory (default: `~/.copilot`). |
3736

38-
The default authentication mode is a web-based browser flow. After completion, an authentication token is stored securely in the system credential store. If a credential store is not found, the token is stored in a plain text config file under `~/.copilot/`.
37+
The default authentication mode is a web-based browser flow. After completion, an authentication token is stored securely in the system credential store. If a credential store is not found, the token is stored in a plain text config file under `~/.copilot/` (or the directory specified by `COPILOT_HOME` if set).
3938

4039
Alternatively, {% data variables.copilot.copilot_cli_short %} will use an authentication token found in environment variables. The following are checked in order of precedence: `COPILOT_GITHUB_TOKEN`, `GH_TOKEN`, `GITHUB_TOKEN`. This method is most suitable for headless use such as automation.
4140

@@ -182,7 +181,6 @@ For a complete list of available slash commands enter `/help` in the CLI's inter
182181
| `--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). |
183182
| `--banner`, `--no-banner` | Show or hide the startup banner. |
184183
| `--bash-env` | Enable `BASH_ENV` support for bash shells. |
185-
| `--config-dir=PATH` | Set the configuration directory (default: `~/.copilot`). |
186184
| `--connect[=SESSION-ID]` | Connect directly to a remote session (optionally specify a session ID or task ID). Conflicts with `--resume` and `--continue`. |
187185
| `--continue` | Resume the most recent session in the current working directory, falling back to the globally most recent session. |
188186
| `--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. |
@@ -944,7 +942,6 @@ Use `copilot mcp` to manage MCP server configurations from the command line with
944942
| `--timeout <ms>` | Timeout in milliseconds. |
945943
| `--json` | Output added configuration as JSON. |
946944
| `--show-secrets` | Show full environment variable and header values. |
947-
| `--config-dir <path>` | Path to the configuration directory. |
948945

949946
> [!CAUTION]
950947
> `--show-secrets` can print sensitive environment variable and header values to your terminal or logs. Only use this option in trusted environments, and avoid copying, pasting, or otherwise capturing the output in shared logs or history.

content/copilot/reference/copilot-cli-reference/cli-config-dir-reference.md

Lines changed: 7 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -140,30 +140,20 @@ Contains lock files and state for IDE integrations (for example, when {% data va
140140

141141
## Changing the location of the configuration directory
142142

143-
You can override the default `~/.copilot` location in two ways:
144-
145-
- **Environment variable**: Set `COPILOT_HOME` to the path of the directory you want to use.
143+
To override the default `~/.copilot` location, set the `COPILOT_HOME` environment variable to the path of the directory you want to use.
146144

147145
```bash copy
148146
export COPILOT_HOME=/path/to/my/copilot-config
149147
```
150148

151-
- **Command-line option**: Use `--config-dir` when launching the CLI.
152-
153-
```bash copy
154-
copilot --config-dir /path/to/my/copilot-config
155-
```
156-
157-
The `--config-dir` option takes precedence over `COPILOT_HOME`, which in turn takes precedence over the default `~/.copilot` location.
158-
159149
### Things to be aware of
160150

161-
- `COPILOT_HOME` replaces the entire `~/.copilot` path. The value you set should be the complete path to the directory you want to use for the configuration files and subdirectories.
162-
- Changing the directory means your existing configuration, session history, installed plugins, and saved permissions will not be found in the new location. Copy or move the contents of `~/.copilot` to the new location if you want to preserve them.
163-
- The **cache directory** (used for marketplace caches, auto-update packages, and other ephemeral data) follows platform conventions and is not affected by `COPILOT_HOME`. It is located at:
164-
- **macOS**: `~/Library/Caches/copilot`
165-
- **Linux**: `$XDG_CACHE_HOME/copilot` or `~/.cache/copilot`
166-
- **Windows**: `%LOCALAPPDATA%/copilot`
151+
* `COPILOT_HOME` replaces the entire `~/.copilot` path. The value you set should be the complete path to the directory you want to use for the configuration files and subdirectories.
152+
* Changing the directory means your existing configuration, session history, installed plugins, and saved permissions will not be found in the new location. Copy or move the contents of `~/.copilot` to the new location if you want to preserve them.
153+
* The **cache directory** (used for marketplace caches, auto-update packages, and other ephemeral data) follows platform conventions and is not affected by `COPILOT_HOME`. It is located at:
154+
* **macOS**: `~/Library/Caches/copilot`
155+
* **Linux**: `$XDG_CACHE_HOME/copilot` or `~/.cache/copilot`
156+
* **Windows**: `%LOCALAPPDATA%/copilot`
167157

168158
To override the cache directory separately, set `COPILOT_CACHE_HOME`.
169159

0 commit comments

Comments
 (0)