Skip to content

🧠 GitHub Copilot for your command line

License

Notifications You must be signed in to change notification settings

loiccoyle/zsh-github-copilot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 

Repository files navigation

zsh-github-copilot

A zsh plugin for GitHub Copilot

Demo gif

✔️ Setup

Requires the GitHub CLI with the Copilot extension installed and configured.

🚀 Installation

Add the following to your .zshrc:

antigen bundle loiccoyle/zsh-github-copilot

Clone this repository into $ZSH_CUSTOM/plugins (by default ~/.oh-my-zsh/custom/plugins):

git clone https://github.com/loiccoyle/zsh-github-copilot ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-github-copilot

Add the plugin to the list of plugins for Oh My Zsh to load (inside ~/.zshrc):

plugins=(
    # other plugins...
    zsh-github-copilot
)

Add the following to your .zshrc:

zinit light loiccoyle/zsh-github-copilot

Add the following to your .zshrc:

zplug "loiccoyle/zsh-github-copilot"

Add the following to your .zshrc:

zpm load loiccoyle/zsh-github-copilot

🧠Usage

Bind the suggest and/or explain widgets:

bindkey '^\' zsh_gh_copilot_explain  # bind Ctrl+\ to explain
bindkey '^[\' zsh_gh_copilot_suggest  # bind Alt+\ to suggest

Explanations

To get command explanations, write out the command in your prompt and hit your keybind.

Suggestions

To get Copilot to suggest a command to fulfill a query, type out the query in your prompt and hit your suggest keybind.

🤩 Credit

This plugin draws from stefanheule/zsh-llm-suggestions