[Improvement]: Improve Copilot in the CLI docs based on feedback (#50101)
Co-authored-by: Jess Hosman <1183847+jhosman@users.noreply.github.com>
This commit is contained in:
@@ -1,39 +0,0 @@
|
||||
---
|
||||
title: Enabling GitHub Copilot in the CLI
|
||||
intro: 'You can enable or disable {% data variables.product.prodname_copilot_cli %} for your organization{% ifversion ghec %} or enterprise{% endif %}.'
|
||||
versions:
|
||||
feature: copilot-in-the-cli
|
||||
topics:
|
||||
- Copilot
|
||||
- CLI
|
||||
shortTitle: Enabling Copilot in the CLI
|
||||
---
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note:** 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.
|
||||
|
||||
{% endnote %}
|
||||
|
||||
You can enable or disable {% data variables.product.prodname_copilot_cli_short %} for your organization{% ifversion ghec %} or enterprise{% endif %} in the {% data variables.product.prodname_copilot_short %} settings.
|
||||
|
||||
To use {% data variables.product.prodname_copilot_cli %}, after it has been enabled, users must install the {% data variables.product.prodname_copilot_cli %} extension, see "[AUTOTITLE](/copilot/github-copilot-in-the-cli/using-github-copilot-in-the-cli)."
|
||||
|
||||
## 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 %}
|
||||
1. 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 %}
|
||||
@@ -9,7 +9,8 @@ topics:
|
||||
- CLI
|
||||
children:
|
||||
- /about-github-copilot-in-the-cli
|
||||
- /enabling-github-copilot-in-the-cli
|
||||
- /setting-up-github-copilot-in-the-cli
|
||||
- /using-github-copilot-in-the-cli
|
||||
- /configuring-github-copilot-in-the-cli
|
||||
---
|
||||
---
|
||||
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
---
|
||||
title: Setting up GitHub Copilot in the CLI
|
||||
intro: 'Learn how to enable and install {% data variables.product.prodname_copilot_cli %}.'
|
||||
versions:
|
||||
feature: copilot-in-the-cli
|
||||
topics:
|
||||
- Copilot
|
||||
- CLI
|
||||
shortTitle: Setting up Copilot in the CLI
|
||||
redirect_from:
|
||||
- /copilot/github-copilot-in-the-cli/enabling-github-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 %}
|
||||
1. 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 %}
|
||||
|
||||
1. If you are have not already authenticated with your {% data variables.product.prodname_dotcom %} account, run the following command in your terminal.
|
||||
|
||||
```shell copy
|
||||
gh auth login
|
||||
```
|
||||
|
||||
1. To install the {% data variables.product.prodname_copilot_cli_short %} extension, run the following command.
|
||||
|
||||
```shell copy
|
||||
gh extension install github/gh-copilot
|
||||
```
|
||||
|
||||
1. To update {% data variables.product.prodname_copilot_cli_short %}, run the following command.
|
||||
|
||||
```shell copy
|
||||
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](/copilot/github-copilot-in-the-cli/using-github-copilot-in-the-cli)." If you want to configure usage analytics and the default behavior for the execute command option, see "[AUTOTITLE](/copilot/github-copilot-in-the-cli/configuring-github-copilot-in-the-cli)."
|
||||
@@ -1,7 +1,6 @@
|
||||
---
|
||||
title: Using GitHub Copilot in the CLI
|
||||
intro: 'You can use `gh`, the {% data variables.product.prodname_dotcom %} command line interface, to work with {% data variables.product.prodname_copilot_cli %}.'
|
||||
product: '{% data reusables.gated-features.copilot-in-cli %}'
|
||||
versions:
|
||||
feature: copilot-in-the-cli
|
||||
topics:
|
||||
@@ -16,32 +15,28 @@ shortTitle: Using Copilot in the CLI
|
||||
|
||||
{% data reusables.copilot.copilot-cli-about %} You can ask {% data variables.product.prodname_copilot_cli_short %} to suggest a command for your use case, with `gh copilot suggest`, or to explain a command you're curious about, with `gh copilot explain`.
|
||||
|
||||
Additionally, you can use `gh copilot --help` for general help or `gh copilot SUBCOMMAND --help` for help with a specific subcommand.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
- To use {% data variables.product.prodname_copilot_cli_short %} you must have an active {% data variables.product.prodname_copilot %} subscription. For more information, see "[AUTOTITLE](/billing/managing-billing-for-github-copilot/about-billing-for-github-copilot)."
|
||||
- To use {% data variables.product.prodname_copilot_cli_short %} you must have {% data variables.product.prodname_cli %} installed. {% data reusables.cli.cli-installation %}
|
||||
To access {% data variables.product.prodname_copilot_cli %} you will need the following.
|
||||
|
||||
## Installing {% data variables.product.prodname_copilot_cli_short %}
|
||||
|
||||
If you have not already done so, run `gh auth login` to authenticate with your {% data variables.product.prodname_dotcom %} account.
|
||||
|
||||
To install the {% data variables.product.prodname_copilot_cli_short %} extension, run `gh extension install github/gh-copilot`.
|
||||
|
||||
To update {% data variables.product.prodname_copilot_cli_short %}, run `gh extension upgrade gh-copilot`.
|
||||
|
||||
To use `gh` to work with {% data variables.product.prodname_copilot %}, type `gh copilot SUBCOMMAND`. Additionally, you can use `gh copilot --help` for general help or `gh copilot SUBCOMMAND --help` for help with a specific subcommand.
|
||||
- **Subscription to {% data variables.product.prodname_copilot %}**: You must have an active {% data variables.product.prodname_copilot %} subscription. For more information, see "[AUTOTITLE](/billing/managing-billing-for-github-copilot/about-billing-for-github-copilot)."
|
||||
- **Access to {% data variables.product.prodname_copilot_cli_short %}**: 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 grant you access to {% data variables.product.prodname_copilot_cli_short %}. For more information, see "[AUTOTITLE](/copilot/github-copilot-in-the-cli/setting-up-github-copilot-in-the-cli)."
|
||||
- **Install {% data variables.product.prodname_cli %}**: You must have {% data variables.product.prodname_cli %} installed. {% data reusables.cli.cli-installation %}
|
||||
- **Install the {% data variables.product.prodname_copilot_cli_short %} extension**: Additionally, you must have the {% data variables.product.prodname_copilot_cli_short %} extension installed. For more information, see "[Installing {% data variables.product.prodname_copilot_cli_short %}](/copilot/github-copilot-in-the-cli/setting-up-github-copilot-in-the-cli)."
|
||||
|
||||
## Asking {% data variables.product.prodname_copilot_cli_short %} to explain a command
|
||||
|
||||
You can ask {% data variables.product.prodname_copilot_cli_short %} to explain a command for you by running:
|
||||
|
||||
```shell
|
||||
```shell copy
|
||||
gh copilot explain
|
||||
```
|
||||
|
||||
Alternatively, you can add the command you want explained directly to the prompt:
|
||||
|
||||
```shell
|
||||
```shell copy
|
||||
gh copilot explain "sudo apt-get"
|
||||
```
|
||||
|
||||
@@ -51,7 +46,7 @@ gh copilot explain "sudo apt-get"
|
||||
|
||||
You can ask {% data variables.product.prodname_copilot_cli_short %} to suggest a command for you by running:
|
||||
|
||||
```shell
|
||||
```shell copy
|
||||
gh copilot suggest
|
||||
```
|
||||
|
||||
@@ -59,7 +54,7 @@ This will start an interactive experience to get the command you need. {% data v
|
||||
|
||||
If you already know what command you need, you can also include that in the prompt. For example, if you want to install Git, you can ask {% data variables.product.prodname_copilot_cli_short %} to suggest a command for you:
|
||||
|
||||
```shell
|
||||
```shell copy
|
||||
gh copilot suggest "Install git"
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user