Install GitHub Copilot CLI Extension | Generated by AI
The command gh extension install github/gh-copilot
installs the GitHub Copilot extension for the GitHub CLI, enabling Copilot features like command-line suggestions and explanations. For enterprise users, whether this command applies depends on specific conditions:
- Enterprise Configuration: Enterprise users can use the Copilot CLI extension if their organization or enterprise has a GitHub Copilot Business or Copilot Enterprise subscription and the CLI feature is enabled by administrators. If the organization owner or enterprise administrator has disabled Copilot in the CLI, the extension cannot be used, even if installed.
- Authentication: Enterprise users must authenticate to the GitHub CLI with a GitHub account that has an assigned Copilot seat. For managed user accounts on GitHub Enterprise Cloud (GHE.com), additional setup may be required, such as updating settings before signing in.
- Installation Requirements: The GitHub CLI must be installed prior to running the command. The installation process itself is the same for enterprise and individual users, but enterprise policies may restrict usage.
Steps for Enterprise Users:
- Ensure GitHub CLI is installed (see GitHub CLI repository for instructions).
- Verify with your enterprise administrator that Copilot CLI is enabled for your organization.
- Run
gh extension install github/gh-copilot
in your terminal. - Authenticate using
gh auth login
with your enterprise-assigned GitHub account. - If using a managed user account on GHE.com, follow additional setup steps outlined in Using GitHub Copilot with an account on GHE.com.
If your enterprise restricts CLI access or hasn’t enabled Copilot, the extension may install but won’t function. Check with your admin for policy details.
Installing GitHub Copilot in the CLI Setting up GitHub Copilot for your enterprise