zsh-ai is a lightweight AI assistant that enables users to convert natural language into shell commands with ease. With a tiny footprint and no dependencies, just type what you need and receive the exact command. Ideal for quick setups, this tool prioritizes user privacy while being fast and simple to use.
zsh-ai is a simple yet powerful tool that transforms natural language into shell commands instantly. Designed for efficiency and ease of use, it eliminates the need for complex setups and dependencies, allowing users to execute commands with minimal effort. Just type what you wish to accomplish in plain English, and zsh-ai will generate the exact command you need.
# what you want to do, providing a straightforward user experience.jq can enhance reliability.Here are a few commands that can be generated using zsh-ai:
$ # find all large files modified this week
$ find . -type f -size +50M -mtime -7
$ # kill process using port 3000
$ lsof -ti:3000 | xargs kill -9
$ # compress images in current directory
$ for img in *.{jpg,png}; do convert "$img" -quality 85 "$img"; done
By simply typing requests, zsh-ai takes care of the command generation for you.
jq is suggested.Homebrew (Recommended):
brew tap matheusml/zsh-ai
brew install zsh-ai
source $(brew --prefix)/share/zsh-ai/zsh-ai.plugin.zsh
Oh My Zsh:
git clone https://github.com/matheusml/zsh-ai ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-ai
Add zsh-ai to your plugins list in ~/.zshrc.
Manual Installation:
git clone https://github.com/matheusml/zsh-ai ~/.zsh-ai
echo "source ~/.zsh-ai/zsh-ai.plugin.zsh" >> ~/.zshrc
Set your Anthropic API key in your terminal:
export ANTHROPIC_API_KEY="your-api-key-here"
Make this change permanent by adding it to your ~/.zshrc file.
Community involvement is encouraged. Open issues or submit pull requests for significant changes.
No comments yet.
Sign in to be the first to comment.