Personally, I run a lot of commands in my terminal every day, and between the small parameters I forget, the slightly complex command sequences, or the long-winded commands, it takes me a bit of time.
But luckily, zsh-copilot came into my life a few months ago, and I can’t live without it now.
This amazing plugin uses the power of AI, directly integrated into your trusty Zsh thanks to zsh-autosuggestions.
To enjoy it, it’s simple. Install the following dependencies:
Clone the zsh-copilot repository into your Zsh plugins folder:
git clone https://github.com/Myzel394/zsh-copilot.git ~/.zsh-copilot
Then add the following line to your .zshrc file with this command:
echo "source ~/.zsh-copilot/zsh-copilot.plugin.zsh" >> ~/.zshrc
Don’t forget to restart your shell to apply the changes.
Oh yes, I almost forgot! For the magic to happen, you’ll also need an OpenAI API key. So, it will cost a bit of money, but considering everything this plugin will bring you, it’s well worth the investment!
Once everything is set up, you just need to start typing your usual commands and press Ctrl+Z whenever you need a hand. And that’s when the magic happens! Zsh-copilot will analyze what you’re doing and suggest the most relevant follow-up. You can even ask it what you’re trying to do, and it will suggest the right command.
You’ll see, it’s amazing. At first, it feels a bit like cheating, but soon you realize how practical it is.
At the same time, I discovered Zsh AutoSuggestions, which is also super handy for finding the commands you regularly type.
In short, as usual, productivity x10 with these kinds of little tools. Check out the GitHub page for more information.