This script allows you to quickly get AI-powered answers to your questions using OpenRouter's API with the Mistral 7B Instruct model.
- Simple command-line interface
- Secure API key storage
- Free to use (with OpenRouter's free tier)
- Download the script:
git clone https://github.com/Maksonik/terminal_ai_assistant- Go to the folder:
cd ./terminal_ai_assistant- Make it executable:
chmod +x ai_help- Move it to your bin directory for global access:
sudo mv ai_help /usr/local/bin/- Go to OpenRouter API Keys
- Click "Create new key"
- Copy the key (it should start with
sk-...)
- Simply run the script:
ai_help- The first time you run it:
- You'll be prompted to enter your OpenRouter API key
- The key will be securely stored in
.openrouter_keyin the current directory
- Subsequent runs will use the stored key.
- Bash shell
curl(usually pre-installed)jq(will be installed automatically if needed)
To completely remove the script, run the following commands:
sudo rm /usr/local/bin/ai_help
rm ~/.openrouter_key # or wherever you first ran it