zsh-ai is a Zsh plugin that provides installation and management for AI development tools including OpenCode, Fabric, Ollama, and more.
This is a list of plugins that need to be installed previously to enjoy all the goodies of this configuration:
oh-my-zsh users
If you're using oh-my-zsh, install this plugin by doing the following:
- Go to your oh-my-zsh custom plugins directory -
cd ~/.oh-my-zsh/custom/plugins - Clone the plugin
bash git clone https://github.com/hadenlabs/zsh-aibash - Edit your
.zshrcand addplugins=( ... zsh-ai )to your list of plugins - Open a new terminal and enjoy!
antigen users
If you're using Antigen, install this plugin by doing the following:
- Add
antigen bundle hadenlabs/zsh-aito your.zshrcwhere you're adding your other plugins. - Either open a new terminal to force zsh to load the new plugin, or run
antigen bundle hadenlabs/zsh-aiin a running zsh session. - Enjoy!
antibody users
If you're using Antibody, install this plugin by doing the following:
- Add :
antibody bundle hadenlabs/zsh-ai
to your .zshrc where you're adding your other plugins.
- Either open a new terminal to force zsh to load the new plugin, or run
antibody bundle hadenlabs/zsh-aiin a running zsh session. - Enjoy!
Before getting started, ensure you have the following installed:
- Python (3.11 or higher) - Check with
python --version - Task (Taskfile runner) - Install with
brew install go-task/tap/go-taskor follow official installation
When cloning the repository for the first time, you need to download the Taskfile dependencies:
task --yesThis command downloads all the external Taskfile dependencies defined in the main Taskfile.yml.
Set up the development environment with all necessary dependencies:
task environmentThis command:
- Sets up the Python virtual environment with
uv - Prepares the development environment
Install all project dependencies and configure the development environment:
task setupThis command:
- Creates
.envfile from.env.exampleif it doesn't exist - Installs Python dependencies with
uv - Sets up pre-commit hooks
- Configures Git hooks
If you use OpenCode in this repository, you can scaffold a task template for a new feature under .jasper/.tmp/tasks/.
From the OpenCode TUI:
/task-template readme-refreshOr via CLI:
opencode run --command task-template readme-refreshtask setupInstall all AI packages defined in AI_PACKAGES.
ai::installInstall all packages defined in AI_PACKAGES array.
ai::packages::installExecute post-installation steps.
ai::post_installUpgrade AI packages (not yet implemented).
ai::upgradeInstall opencode CLI tool. Checks if opencode is already installed using which before attempting installation.
ai::opencode::installSync opencode configuration from local data/opencode/ directory to opencode config directory (~/.config/opencode/). Uses rsync for synchronization.
ai::opencode::syncInstall fabric CLI tool for AI patterns. Checks if fabric is already installed before attempting installation.
ai::fabric::installSync custom patterns from local data/patterns/ directory to fabric's patterns directory (~/.config/fabric/patterns/). Uses rsync for synchronization.
ai::fabric::patterns::syncUpdate fabric patterns from the official repository using fabric --updatepatterns.
ai::fabric::patterns::pullInstall ollama CLI tool for running LLMs locally. Checks if ollama is already installed before attempting installation.
ai::ollama::installList all installed ollama models.
ai::ollama::models::listDownload a model from ollama registry.
ai::ollama::models::pull llama3.2
ai::ollama::models::pull mistralInstall all default models defined in AI_OLLAMA_MODELS array.
ai::ollama::models::installInstall shimmy CLI tool for local LLM inference server. OpenAI API compatible. Downloads binary based on OS and architecture.
ai::shimmy::installInstall hf CLI tool (Hugging Face CLI). The new CLI for interacting with Hugging Face Hub - download models, upload files, manage cache, etc.
ai::hf::installInstall openclaw CLI tool for AI-powered code analysis and refactoring. Checks if openclaw is already installed before attempting installation.
ai::openclaw::installInstall tmuxai CLI tool. Checks if tmuxai is already installed before attempting installation.
ai::tmuxai::installInternal function that iterates through AI_PACKAGES and installs each one with appropriate handling.
ai::internal::packages::installInternal function that adds opencode binary path to PATH. Checks if ~/.opencode/bin exists and prepends it to PATH.
ai::internal::opencode::loadInternal function for opencode installation logic. Verifies if opencode exists before installing via curl.
ai::internal::opencode::installInternal function for fabric installation logic. Verifies if fabric exists before installing via curl.
ai::internal::fabric::installInternal function for syncing patterns using rsync.
ai::internal::fabric::patterns::syncInternal function for pulling patterns from fabric's official repository.
ai::internal::fabric::patterns::pullInternal function for ollama installation logic. Verifies if ollama exists before installing via curl.
ai::internal::ollama::installInternal function for listing installed ollama models.
ai::internal::ollama::models::listInternal function for downloading ollama models.
ai::internal::ollama::models::pull llama3.2Internal function for installing all default models from AI_OLLAMA_MODELS array.
ai::internal::ollama::models::installInternal function that adds shimmy binary path to PATH. Checks if ~/.local/bin exists and prepends it to PATH.
ai::internal::shimmy::loadInternal function for shimmy installation logic. Detects OS and architecture, downloads appropriate binary from GitHub releases.
ai::internal::shimmy::installInternal function for hf CLI installation logic. Downloads and installs Hugging Face CLI from official installer.
ai::internal::hf::installInternal function that adds openclaw binary path to PATH. Checks if ~/.local/bin exists and prepends it to PATH.
ai::internal::openclaw::loadInternal function for openclaw installation logic. Downloads the appropriate binary for the current architecture from GitHub releases.
ai::internal::openclaw::installInternal function for tmuxai installation logic. Verifies if tmuxai exists before installing via curl.
ai::internal::tmuxai::install| Variable | Description |
|---|---|
AI_PACKAGE_NAME |
Name of the package (default: ai) |
AI_TOOLS |
Array of AI tools to install |
AI_PACKAGES |
Array of all packages (combines AI_TOOLS) |
AI_MESSAGE_BREW |
Message for brew requirement |
AI_OPENCODE_ROOT_PATH |
Root path for opencode (default: ~/.opencode) |
AI_OPENCODE_BIN_PATH |
Binary path for opencode (default: ~/.opencode/bin) |
AI_FABRIC_PATTERNS_PATH |
Path to fabric patterns (default: ~/.config/fabric/patterns) |
AI_FABRIC_PATTERNS_SYNC_SOURCE |
Source path for custom patterns (ZSH_AI_PATH/data/patterns) |
AI_OLLAMA_MODELS_PATH |
Path to ollama models (default: ~/.ollama/models) |
AI_OLLAMA_MODELS |
Array of default ollama models to install |
AI_SHIMMY_BIN_PATH |
Binary path for shimmy (default: ~/.local/bin) |
AI_OPENCLAW_BIN_PATH |
Binary path for openclaw (default: ~/.local/bin) |
AI_INSTALL_URL_OPENCODE |
Installation URL for opencode |
AI_INSTALL_URL_FABRIC |
Installation URL for fabric |
AI_INSTALL_URL_OLLAMA |
Installation URL for ollama |
AI_INSTALL_URL_SHIMMY |
Installation URL for shimmy (GitHub releases) |
AI_INSTALL_URL_HF |
Installation URL for hf CLI |
AI_INSTALL_URL_OPENCLAW |
Installation URL for openclaw (GitHub releases) |
AI_APPLICATION_PATH |
Path to applications (macOS only) |
AI_ARCHITECTURE_NAME |
Architecture name (e.g., darwin-arm64, linux-amd64) |
File a GitHub issue.
See Contributing.
This Module follows the principles of Semantic Versioning (SemVer).
Using the given version number of MAJOR.MINOR.PATCH, we apply the following constructs:
- Use the
MAJORversion for incompatible changes. - Use the
MINORversion when adding functionality in a backwards compatible manner. - Use the
PATCHversion when introducing backwards compatible bug fixes.
- In the context of initial development, backwards compatibility in versions
0.0.zis not guaranteed whenzis increased. (Initial development) - In the context of pre-release, backwards compatibility in versions
0.y.zis not guaranteed whenyis increased. (Pre-release)
Copyright Β© 2018-2026 Hadenlabs
All other trademarks referenced herein are the property of their respective owners.
The code and styles are licensed under the LGPL-3.0 license See project license..
