A command-line tool that lets you use plain English to run Linux commands safely and interactively.
Powered by an AI language model, it translates your requests into shell commands, reviews them for safety, and only executes them with your approval.
- π£οΈ Natural Language Input β Type what you want to do in Englishβno need to remember complex shell syntax.
- π€ AI-Powered Translation β Converts your prompt into a Linux shell command.
- π Safety First β Reviews generated commands for dangerous patterns before execution.
- π Interactive Confirmation β Always asks before running any command.
- π§© Extensible Design β Easily add features or integrate with different AI providers (OpenAI, Groq, etc.).
git clone https://github.com/yourusername/ai-shell.git
cd ai-shellpip install -r requirements.txtEdit the ai script and set your API key for your AI provider (OpenAI, Groq, etc.).
export GROQ_API_KEY="your-api-key" # or OPENAI_API_KEYchmod +x aimv ai ~/.local/bin/
echo 'export PATH="$PATH:$HOME/.local/bin"' >> ~/.bashrc
source ~/.bashrcalias ai="./ai"ai "Show all files modified today"Suggested command: find . -type f -newermt today
Execute this command? (y/n): y
Output:
./report.txt
./notes/meeting.txt
- Prompt β Enter your request in plain English.
- Review β See the suggested shell command before it runs.
- Approve or Cancel β Type
yto execute,nto cancel. - Error Feedback β Get a clear message if the command is unsafe or fails.
| Issue | Solution |
|---|---|
| Command not found | Ensure ai is in your PATH and is executable |
| API errors | Check your API key and internet connectivity |
| Permission denied | Run chmod +x ai to make the script executable |
- Fork the repository and submit pull requests.
- Suggest features or improvements via issues.
This project is licensed under the MIT License.
Enjoy a safer, smarter, and more intuitive Linux command-line experience!