3.4 KiB
title, intro, versions, topics, shortTitle, redirect_from
| title | intro | versions | topics | shortTitle | redirect_from | |||||
|---|---|---|---|---|---|---|---|---|---|---|
| Setting up GitHub Copilot in the CLI | Learn how to enable and install {% data variables.product.prodname_copilot_cli %}. |
|
|
Setting up Copilot in the CLI |
|
If you have a {% data variables.product.prodname_copilot_for_individuals %} subscription, you can install the {% data variables.product.prodname_copilot_cli %} extension without needing to enable it for your organization.
If you are part of an organization{% ifversion ghec %} or enterprise{% endif %} with a {% data variables.product.prodname_copilot_for_business %}{% ifversion ghec %} or {% data variables.product.prodname_copilot_enterprise %}{% endif %} subscription, the organization{% ifversion ghec %} or enterprise{% endif %} owner will need to enable {% data variables.product.prodname_copilot_cli_short %} in the {% data variables.product.prodname_copilot_short %} settings. You can then install the {% data variables.product.prodname_copilot_cli %} extension.
Enabling or disabling {% data variables.product.prodname_copilot_cli_short %} at the organization level
An organization owner can enable or disable {% data variables.product.prodname_copilot_cli_short %} for the organization. {% ifversion ghec %}You may not be able to configure this setting for your organization, if an enterprise owner has set a policy at the enterprise level.{% endif %}
{% data reusables.profile.access_org %} {% data reusables.profile.org_settings %} {% data reusables.copilot.policy-settings %}
- To the right of "{% data variables.product.prodname_copilot_cli_short %}", select the dropdown menu, then click Enabled or Disabled.
{% ifversion ghec %}
Enabling or disabling {% data variables.product.prodname_copilot_cli_short %} at the enterprise level
An enterprise owner can choose whether to enable a feature for all organizations, disable for all organizations, or allow each organization to choose its own policy for the feature.
{% data reusables.copilot.copilot-cli-enable %}
{% endif %}
Installing {% data variables.product.prodname_copilot_cli_short %}
To install {% data variables.product.prodname_copilot_cli_short %}, you must have {% data variables.product.prodname_cli %} installed. {% data reusables.cli.cli-installation %}
-
If you are have not already authenticated with your {% data variables.product.prodname_dotcom %} account, run the following command in your terminal.
gh auth login -
To install the {% data variables.product.prodname_copilot_cli_short %} extension, run the following command.
gh extension install github/gh-copilot -
To update {% data variables.product.prodname_copilot_cli_short %}, run the following command.
gh extension upgrade gh-copilot
To use gh to work with {% data variables.product.prodname_copilot %}, type gh copilot SUBCOMMAND, for example, gh copilot explain.
Next steps
You successfully installed {% data variables.product.prodname_copilot_cli_short %}. To learn more about how to use it, see "AUTOTITLE." If you want to configure usage analytics and the default behavior for the execute command option, see "AUTOTITLE."