-
Notifications
You must be signed in to change notification settings - Fork 65.6k
Fix #42356: consolidate Copilot CLI parameters and in-session commands #42357
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Fix #42356: consolidate Copilot CLI parameters and in-session commands #42357
Conversation
|
Thanks for submitting a PR to the GitHub Docs project! In order to review and merge PRs most efficiently, we require that all PRs grant maintainer edit access before we review them. For information on how to do this, see the documentation. |
How to review these changes 👓Thank you for your contribution. To review these changes, choose one of the following options: A Hubber will need to deploy your changes internally to review. Table of review linksNote: Please update the URL for your staging server or codespace. The table shows the files in the
Key: fpt: Free, Pro, Team; ghec: GitHub Enterprise Cloud; ghes: GitHub Enterprise Server 🤖 This comment is automatically generated. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds comprehensive documentation for GitHub Copilot CLI parameters and in-session commands by consolidating reference information into two well-organized tables. This addresses issue #42356 and provides users with a clear reference for both command-line options and interactive session commands.
Changes:
- Added "CLI parameters" section with a table documenting command-line flags and options
- Added "In-session commands" section with a table documenting slash commands and interactive features
- Included examples for each parameter and command to aid user understanding
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| | `/list-dirs` | Display all allowed directories for file access | `/list-dirs` | | ||
| | `/login` | Log in to Copilot | `/login` | | ||
| | `/logout` | Log out of Copilot | `/logout` | | ||
| | `/mcp [show, add, edit, delete, disable, enable] [server-name]` | Manage MCP servers and configurations | `/mcp add` | | ||
| | `/model [model]` | Select AI model to use | `/model gpt-5-mini` | | ||
| | `/reset-allowed-tools` | Reset the list of allowed tools during the session | `/reset-allowed-tools` | | ||
| | `/session` | Show information about the current CLI session | `/session` | | ||
| | `/skills [list, info, add, remove, reload] [args...]` | Manage skills for enhanced capabilities | `/skills list` | | ||
| | `/terminal-setup` | Configure terminal for multiline input support | `/terminal-setup` | | ||
| | `/theme [show, set, list] [auto, dark, light]` | View or configure terminal theme | `/theme set dark` | | ||
| | `/usage` | Display session usage metrics and statistics | `/usage` | | ||
| | `/user [show, list, switch]` | Manage GitHub user list | `/user list` | | ||
| | `?` | Display interactive help and available commands | `?` | | ||
| | `!<shell command>` | Run a shell command directly from the prompt without calling the model | `!git clone https://github.com/github/copilot-cli` | |
Copilot
AI
Jan 12, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The descriptions in this table are inconsistently punctuated. Some descriptions end with periods while others don't. For consistency and proper documentation style, all descriptions should either consistently include or exclude terminal periods. Based on standard documentation practices, all descriptions should end with periods since they are complete phrases describing actions.
| | `/list-dirs` | Display all allowed directories for file access | `/list-dirs` | | |
| | `/login` | Log in to Copilot | `/login` | | |
| | `/logout` | Log out of Copilot | `/logout` | | |
| | `/mcp [show, add, edit, delete, disable, enable] [server-name]` | Manage MCP servers and configurations | `/mcp add` | | |
| | `/model [model]` | Select AI model to use | `/model gpt-5-mini` | | |
| | `/reset-allowed-tools` | Reset the list of allowed tools during the session | `/reset-allowed-tools` | | |
| | `/session` | Show information about the current CLI session | `/session` | | |
| | `/skills [list, info, add, remove, reload] [args...]` | Manage skills for enhanced capabilities | `/skills list` | | |
| | `/terminal-setup` | Configure terminal for multiline input support | `/terminal-setup` | | |
| | `/theme [show, set, list] [auto, dark, light]` | View or configure terminal theme | `/theme set dark` | | |
| | `/usage` | Display session usage metrics and statistics | `/usage` | | |
| | `/user [show, list, switch]` | Manage GitHub user list | `/user list` | | |
| | `?` | Display interactive help and available commands | `?` | | |
| | `!<shell command>` | Run a shell command directly from the prompt without calling the model | `!git clone https://github.com/github/copilot-cli` | | |
| | `/list-dirs` | Display all allowed directories for file access. | `/list-dirs` | | |
| | `/login` | Log in to Copilot. | `/login` | | |
| | `/logout` | Log out of Copilot. | `/logout` | | |
| | `/mcp [show, add, edit, delete, disable, enable] [server-name]` | Manage MCP servers and configurations. | `/mcp add` | | |
| | `/model [model]` | Select AI model to use. | `/model gpt-5-mini` | | |
| | `/reset-allowed-tools` | Reset the list of allowed tools during the session. | `/reset-allowed-tools` | | |
| | `/session` | Show information about the current CLI session. | `/session` | | |
| | `/skills [list, info, add, remove, reload] [args...]` | Manage skills for enhanced capabilities. | `/skills list` | | |
| | `/terminal-setup` | Configure terminal for multiline input support. | `/terminal-setup` | | |
| | `/theme [show, set, list] [auto, dark, light]` | View or configure terminal theme. | `/theme set dark` | | |
| | `/usage` | Display session usage metrics and statistics. | `/usage` | | |
| | `/user [show, list, switch]` | Manage GitHub user list. | `/user list` | | |
| | `?` | Display interactive help and available commands. | `?` | | |
| | `!<shell command>` | Run a shell command directly from the prompt without calling the model. | `!git clone https://github.com/github/copilot-cli` | |
| | `--agent=<name>` | Use a named custom agent for this run. | `copilot --agent=refactor-agent --prompt "Refactor this code block"` | | ||
| | `-p "<text>"` or `--prompt "<text>"` | Provide a prompt non-interactively (non-interactive mode exits after completion). | `copilot -p "Run tests and fix failures"` | | ||
| | `-i "<text>"` or `--interactive "<text>"` | Start interactive mode and automatically execute a prompt. | `copilot -i "Fix the bug in main.js"` | | ||
| | `--resume` | Resume a previously saved interactive session (session picker). | `copilot --resume` | | ||
| | `--continue` | Quickly resume the most recently closed session. | `copilot --continue` | | ||
| | `--model <model>` | Start with a specific model. | `copilot --model gpt-5` | | ||
| | `--add-dir <path>` (repeatable) | Allow access to one or more directories by repeating the flag. | `copilot --add-dir /home/user/projects --add-dir ~/workspace` | | ||
| | `--allow-all-paths` | Disable path verification for this run (trust all filesystem paths). | `copilot --allow-all-paths` | | ||
| | `--allow-tool '<tool>'` | Allow a specific tool or tool pattern. | `copilot --allow-tool 'write'` | | ||
| | `--deny-tool '<tool>'` | Deny a specific tool (can be used alongside `--allow-tool`). | `copilot --deny-tool 'MyMCP(denied_tool)' --allow-tool 'MyMCP'` | | ||
| | `--allow-all-tools` | Allow all tools without per-command approval for this run. | `copilot --allow-all-tools --resume` | | ||
| | `--allow-url <domain>` (repeatable) | Pre-approve one or more domains for network access by repeating the flag. | `copilot --allow-url github.com --allow-url api.github.com` | | ||
| | `--deny-url <url>` | Deny network access to a specific URL/domain. | `copilot --deny-url malicious-site.com` | | ||
| | `--allow-all-urls` | Allow all URLs without confirmation. | `copilot --allow-all-urls` | | ||
| | `--help` or `help` | Show CLI help and available commands. | `copilot help` | |
Copilot
AI
Jan 12, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The descriptions in this table are inconsistently punctuated. Some descriptions end with periods while others don't. For consistency and proper documentation style, all descriptions should end with periods since they are complete phrases describing actions. This follows the pattern used in other documentation tables in the repository.
| | `/feedback` | Provide feedback about the CLI | `/feedback` | | ||
| | `/help` | Show help for interactive commands | `/help` | | ||
| | `/list-dirs` | Display all allowed directories for file access | `/list-dirs` | | ||
| | `/login` | Log in to Copilot | `/login` | |
Copilot
AI
Jan 12, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The word "Copilot" should use the variable instead of hardcoded text. According to the coding guidelines, you should always use Liquid syntax variables rather than text if a variable has been defined. Replace "Copilot" with the appropriate variable such as {% data variables.product.prodname_copilot_short %}.
| | `/help` | Show help for interactive commands | `/help` | | ||
| | `/list-dirs` | Display all allowed directories for file access | `/list-dirs` | | ||
| | `/login` | Log in to Copilot | `/login` | | ||
| | `/logout` | Log out of Copilot | `/logout` | |
Copilot
AI
Jan 12, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The word "Copilot" should use the variable instead of hardcoded text. According to the coding guidelines, you should always use Liquid syntax variables rather than text if a variable has been defined. Replace "Copilot" with the appropriate variable such as {% data variables.product.prodname_copilot_short %}.
Why:
Closes:
What's being changed (if available, include any code snippets, screenshots, or gifs):
Check off the following: