Skip to content

How we all expected GitHub Copilot in the CLI to be. No `suggest` bullshit

Notifications You must be signed in to change notification settings

math-x-io/zsh-copilot-ollama

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 

Repository files navigation

zsh-copilot

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

out.mp4

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 OPENAI API key with access to gpt-4 to use this plugin. Expose this via the OPENAI_API_KEY environment variable:

export OPENAI_API_KEY=<your-api-key>

I tried out using gpt-3 but the results were garbage.

To see available configurations, run:

zsh-copilot --help

Usage

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

Ollama Llama3 usage

Configuration

You need to have Ollama and llama3 installed :

curl -fsSL https://ollama.com/install.sh | sh
sudo systemctl start ollama
ollama pull llama3.1

Set Ollama active

Modify the zsh-copilot.plugin.zsh file to set the shortcut of your choice like this :

(( ! ${+ZSH_COPILOT_KEY_OPENAI} )) && typeset -g ZSH_COPILOT_KEY_OPENAI=''
(( ! ${+ZSH_COPILOT_KEY_OLLAMA} )) && typeset -g ZSH_COPILOT_KEY_OLLAMA='^z'

About

How we all expected GitHub Copilot in the CLI to be. No `suggest` bullshit

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 100.0%