Learn how to install Copilot in the CLI so that you can get suggestions and explanations for 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 and features for Copilot in your organization ."
If you have not already authenticated to the GitHub CLI, run the following command in your terminal.
gh auth login
To install the Copilot in the CLI extension, run the following command.
gh extension install github/gh-copilot
After installing the Copilot in the CLI extension, you can update at any time by running:
gh extension upgrade gh-copilot