zsh-github-copilot

zsh-github-copilot

🧠 GitHub Copilot for your command line

Stars: 66

Visit
 screenshot

zsh-github-copilot is a `zsh` plugin that enhances the GitHub Copilot experience by providing keybinds to quickly access command explanations and get Copilot suggestions. It integrates seamlessly with GitHub CLI and offers a smooth setup process. Users can easily install the plugin using popular zsh plugin managers like antigen, oh-my-zsh, zinit, zplug, and zpm. By binding specific keys, users can access the 'suggest' and 'explain' functionalities to improve their coding workflow with GitHub Copilot. This plugin is designed to streamline the usage of GitHub Copilot within the zsh shell environment.

README:

zsh-github-copilot

A zsh plugin for GitHub Copilot

Demo gif

✔️ Setup

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

The plugin will check for the extension and other dependencies at source time, to disable this check, set the ZSH_GH_COPILOT_NO_CHECK environment variable to 1.

🚀 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:

For Linux/Windows

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

For Mac

bindkey '»' zsh_gh_copilot_explain  # bind Option+shift+\ to explain
bindkey '«' zsh_gh_copilot_suggest  # bind Option+\ 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

For Tasks:

Click tags to check more tools for each tasks

For Jobs:

Alternative AI tools for zsh-github-copilot

Similar Open Source Tools

For similar tasks

For similar jobs