Using GitHub Copilot in the command line
If you have access to GitHub Copilot via your organization or enterprise, you cannot use Copilot in the CLI if your organization owner or enterprise administrator has disabled Copilot in the CLI. See Managing policies for Copilot in your organization.
To ask Copilot in the CLI to explain a command, run gh copilot explainfollowed by the command that you want explained. For example:
To ask Copilot in the CLI to suggest a command, run gh copilot suggestfollowed by the command that you want. For example:
Copilot in the CLI will start an interactive session to get more information about what you want.
If you choose the Execute command option after Copilot in the CLI suggests a command, Copilot in the CLI will copy the command to your clipboard and exit the interactive session. Then you can manually paste the command into your CLI.
If you want Copilot in the CLI to be able to execute commands on your behalf, you must set up the ghcsalias. See Configuring GitHub Copilot in the CLI.
To send feedback to GitHub about the quality of a suggestion, select the Rate response option in Copilot in the CLI.
You can also open an issue in the Copilot in the CLI extension repository.