Skip to content

OskarSzafer/open-cli-copilot

Repository files navigation

open-cli-copilot

Copilot-like autosuggestions generation for zsh.

Extends the zsh-autosuggestions plugin by adding an LLM-based autosuggestion strategy and natural language command generation within the terminal.

demo.mp4

Installation

  1. Clone the project repository to a location of your choice:

    git clone https://github.com/OskarSzafer/open-cli-copilot.git
  2. Inside the project repository, create a Python venv and install requirements:

    python -m venv venv && ./venv/bin/pip install -r requirements.txt
  3. Source the main script and export your API-key by adding the following lines to ~/.zshrc:

    export GOOGLE_API_KEY=<your_token>
    source ~/path/to/open-cli-copilot/copilot.zsh

    You can obtain your API key from: Google AI Studio

  4. Start a new terminal session.

Requirements

  • Zsh>=4.3.11
  • Zsh-autosuggestions>=0.7.0
  • Python>=3.9

Roadmap

  • Improve handling of special characters in buffer
  • Resolve conflicts with the zsh history widget
  • Integrate with open-source LLMs using Hugging Face Transformers

Acknowledgements

Thanks to all contributors for their help in making open-cli-copilot better!

Your contributions are greatly appreciated! 🙌

License

This project is licensed under the MIT License - see the LICENSE file for details.