Zsh Ollama Command
An oh-my-zsh plugin that integrates the OLLAMA AI model to provide command suggestions
Install / Use
npx skills add plutowang/zsh-ollama-commandInstalls into whichever agent you are using.
README
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
jqfor parsing JSON responsesfzffor interactive selection of commandscurlfor making API requestsOLLAMAserver 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
-
Clone the repository to
oh-my-zshcustom plugin foldergit clone https://github.com/plutowang/zsh-ollama-command.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-ollama-command -
Enable the plugin in ~/.zshrc:
plugins=( [plugins...] zsh-ollama-command ) -
Input what you want to do then trigger the plugin. Press the custom shortcut (default is Ctrl-o) to start the command suggestion process.
-
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!
Related Skills
node-connect
385.5kDiagnose OpenClaw Android, iOS, or macOS node pairing, QR/setup code, route, auth, and connection failures.
blender-python-addon
40.5kBlender Python add-on rules for operators, panels, properties, registration, testing, and API-safe scripting
flutter-development-guidelines-cursorrules-prompt-file
40.5kCursor rules for Flutter development with MVVM architecture, Riverpod state management, Material widgets, and Dart style guidelines.
commit-push-pr
140.6kCommit, push, and open a PR
