GitHub Copilot (CLI)

Tips and tricks for setting up and using GitHub Copilot with the CLI.

Install and Setup

# install 
brew install gh
# configure authentication
gh auth login
# install the copilot extension
gh extension install github/gh-copilot
# upgrade the copilot extension
gh extension upgrade gh-copilot
# disable usage data
gh copilot config

Usage

gh copilot <command> "prompt"

Commands

  • config - adjust data collection

  • explain - explain a command

  • suggest - suggest a command

Explain

  • Prompting Copilot to explain a command to me.

Suggest

  • Prompting Copilot to build me a command and then providing feedback to improve the command.

Useful Resources

Last updated