Skip to content

An oh-my-zsh plugin that integrates the OLLAMA AI model to provide command suggestions

License

Notifications You must be signed in to change notification settings

keyvez/kollzsh

 
 

Repository files navigation

koll.zsh

  :###:
  :   :
  :   :
.'     '.
:       :
|_______|
|kollzsh|
|‐‐‐‐‐‐‐|
|       |
:_______:

koll.zsh: keyvez ollama for zsh

Kollzsh Demo

An oh-my-zsh plugin that integrates the OLLAMA AI model with fzf to provide intelligent command suggestions based on user input requirements.

Features

  • Intelligent Command Suggestions: Use OLLAMA to generate relevant MacOS terminal commands based on your query or input requirement.
  • FZF Integration: Interactively select suggested commands using FZF's fuzzy finder, ensuring you find the right command for your task.
  • Customizable: Configure default shortcut, OLLAMA model, and response number to suit your workflow.

Requirements

  • jq for parsing JSON responses
  • fzf for interactive selection of commands
  • curl for making API requests
  • OLLAMA server running

Configuration Variables

Variable Name Default Value Description
KOLLZSH_MODEL qwen2.5-coder:3b OLLAMA model to use (e.g., qwen2.5-coder:3b)
KOLLZSH_HOTKEY ^o (Ctrl-o) Default shortcut key for triggering the plugin
KOLLZSH_COMMAND_COUNT 5 Number of command suggestions displayed
KOLLZSH_URL http://localhost:11434 The URL of OLLAMA server host

Usage

  1. Clone the repository to oh-my-zsh custom plugin folder

    git clone https://github.com/keyvez/kollzsh.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/kollzsh
  2. Enable the plugin in ~/.zshrc:

    plugins=(
      [plugins...]
      kollzsh
    )
  3. Input what you want to do then trigger the plugin. Press the custom shortcut (default is Ctrl-o) to start the command suggestion process.

  4. Interact with FZF: Type a query or input requirement, and FZF will display suggested MacOS terminal commands. Select one to execute.

Get Started

Experience the power of AI-driven command suggestions in your MacOS terminal! This plugin is perfect for developers, system administrators, and anyone looking to streamline their workflow.

Let me know if you have any specific requests or changes!

Kollzsh Beer

About

An oh-my-zsh plugin that integrates the OLLAMA AI model to provide command suggestions

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 52.6%
  • Shell 47.4%