Using GitHub Copilot CLI
·
1 min read
Copilot CLI is now in public beta. I hadn’t tried it before, but now I’ve given it a shot. Here’s how to use it and my thoughts on it.
Current CLI version: version 0.5.4-beta (2024-01-04)
Requirements
Like GitHub Copilot, requires a paid subscription
Installation
# Install GitHub CLI
brew install gh
# Update GitHub CLI
brew upgrade gh
# Login to GitHub
gh auth login
# Install copilot
gh extension install github/gh-copilot
After the above installation, you can use it normally
Usage
Currently, the CLI functionality is quite simple:
Explain commands
gh copilot explain "git push"
Suggest commands
gh copilot suggest "install git"
Currently, you cannot set custom prompts, so the returned results will be in English, but command prompts can be described in Chinese since the underlying OpenAI supports multiple languages
That’s all there is to the CLI functionality. Looking forward to continued CLI updates, such as supporting system prompts or supporting chat rather than being limited to commands.