copilot-cl
https://docs.github.com/en/copilot/using-github-copilot/using-github-copilot-in-the-command-line
- GitHub CLI installed. For installation instructions for GitHub CLI, see the GitHub CLI repository.
- Copilot in the CLI extension installed. See “Installing GitHub Copilot in the CLI.”
❯ brew install gh
Warning: gh 2.56.0 is already installed and up-to-date.
❯ gh auth login
? What account do you want to log into? GitHub.com
? What is your preferred protocol for Git operations on this host? SSH
? Upload your SSH public key to your GitHub account? /Users/onesixx/.ssh/id_rsa_onesixx.pub
? Title for your SSH key: GitHub CLI
? How would you like to authenticate GitHub CLI? Login with a web browser
! First copy your one-time code: XXXX-XXXX
Press Enter to open github.com in your browser...
✓ Authentication complete.
- gh config set -h github.com git_protocol ssh
✓ Configured git protocol
✓ SSH key already existed on your GitHub account: /Users/onesixx/.ssh/id_rsa_onesixx.pub
✓ Logged in as onesixx
❯ gh extension install github/gh-copilot
✓ Installed extension github/gh-copilot
❯ gh extension upgrade gh-copilot
[copilot]: already up to date
✓ Successfully checked extension upgrades
사용 – command 설명
❯ gh copilot explain "sudo apt-get"
? Allow GitHub to collect optional usage data to help us improve? This data does not include your queries.
> Yes
Welcome to GitHub Copilot in the CLI!
version 1.0.4 (2024-06-13)
I'm powered by AI, so surprises and mistakes are possible. Make sure to verify any generated code or suggestions, and share feedback so that we can learn and improve. For more information, see https://gh.io/gh-copilot-transparency
Explanation:
• sudo is used to run a command with elevated rights, typically as the superuser.
• apt-get is the package management command-line tool for Debian-based systems.
• It is used to install, upgrade, or remove software packages.
• Running sudo apt-get without any options or arguments does not perform any specific action.
• It is generally followed by subcommands like install, update, upgrade, or remove to perform package
management tasks.