Myzel394 / zsh-copilot

How we all expected GitHub Copilot in the CLI to be. No `suggest` bullshit
97 stars 11 forks source link

zsh-copilot

Get suggestions truly in your shell. No suggest bullshit. Just press CTRL + Z and get your suggestion.

https://github.com/Myzel394/zsh-copilot/assets/50424412/ed2bc8ac-ce49-4012-ab73-53cf6f3151a2

Installation

Dependencies

Please make sure you have the following dependencies installed:

git clone https://github.com/Myzel394/zsh-copilot.git ~/.zsh-copilot
echo "source ~/.zsh-copilot/zsh-copilot.plugin.zsh" >> ~/.zshrc

Configuration

You need to have an API key for either OpenAI or Anthropic to use this plugin. Expose this via the appropriate environment variable:

For OpenAI (default):

export OPENAI_API_KEY=<your-openai-api-key>

For Anthropic:

export ANTHROPIC_API_KEY=<your-anthropic-api-key>

You can configure the AI provider using the ZSH_COPILOT_AI_PROVIDER variable:

export ZSH_COPILOT_AI_PROVIDER="openai"  # or "anthropic"

Other configuration options:

To see all available configurations and their current values, run:

zsh-copilot

Usage

Type in your command or your message and press CTRL + Z to get your suggestion!