Code Monkey home page Code Monkey logo

zsh-ollama-command's Introduction

zsh-ollama-command

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
ZSH_OLLAMA_MODEL llama3 OLLAMA model to use (e.g., llama3)
ZSH_OLLAMA_COMMANDS_HOTKEY Ctrl-o Default shortcut key for triggering the plugin
ZSH_OLLAMA_COMMANDS 5 Number of command suggestions displayed
ZSH_OLLAMA_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/plutowang/zsh-ollama-command.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-ollama-command
  2. Enable the plugin in ~/.zshrc:

    plugins=(
      [plugins...]
      zsh-ollama-command
    )
  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!

zsh-ollama-command's People

Contributors

plutowang avatar bwang06 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.