LLM Zsh Plugin
March 2, 2025 ยท View on GitHub
Supercharge your shell with LLM command completion ๐
A Zsh plugin providing command completion for the LLM CLI tool by Simon Willison. Supports all LLM commands, model names, and options with intelligent context-aware completion.
๐ Features
- ๐ฏ Complete command-line options for all LLM commands
- ๐ค Dynamic model name completion
- ๐ Context-aware subcommand completion
- ๐ง Supports all major LLM operations:
prompt- Execute promptschat- Interactive chat sessionsmodels- Model managementtemplates- Template handling- And much more!
๐ฆ Installation
Using Oh My Zsh
- Clone this repository:
git clone https://github.com/eliyastein/llm-zsh-plugin ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/llm
- Add
llmto your plugins in~/.zshrc:
plugins=(... llm)
- Reload your shell:
source ~/.zshrc
Manual Installation
- Clone the repository:
git clone https://github.com/eliyastein/llm-zsh-plugin ~/.zsh/llm-zsh-plugin
- Source the plugin in your
~/.zshrc:
source ~/.zsh/llm-zsh-plugin/llm.plugin.zsh
- Add the completions directory to your fpath (before
compinit):
fpath=(~/.zsh/llm-zsh-plugin/completions $fpath)
- Reload your shell:
exec zsh
๐ฎ Usage
Just start typing an LLM command and press Tab to see available completions:
llm [Tab] # Show all main commands
llm prompt -[Tab] # Show prompt options
llm models [Tab] # Show model subcommands
๐ค Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork it
- Create your feature branch (
git checkout -b feature/amazing) - Commit your changes (
git commit -am 'Add amazing feature') - Push to the branch (
git push origin feature/amazing) - Create a new Pull Request
๐ License
MIT License - feel free to use this plugin in your own projects!
Built with โค๏ธ by Eliya Stein