Skip to content

Instantly share code, notes, and snippets.

@kaangiray26
Last active August 9, 2024 09:34
Show Gist options
  • Select an option

  • Save kaangiray26/c18c8d7c644d0bf6b06c8fe58e794f17 to your computer and use it in GitHub Desktop.

Select an option

Save kaangiray26/c18c8d7c644d0bf6b06c8fe58e794f17 to your computer and use it in GitHub Desktop.
Using GitHub Copilot in the CLI

Installation

Make sure you're logged in.

gh auth login

Then, you can install the extension via:

gh extension install github/gh-copilot

At anytime, you can update the extension via:

gh extension upgrade gh-copilot

Usage examples

Usage is simple:

gh copilot [command] 

Where it has 2 different options for the [command] parameter:

explain     Explain a command
suggest     Suggest a command

Using suggest:

gh copilot suggest -t shell "copy a local file to a server via ssh"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment