KAI is an innovative cli tool that leverages AI to generate, select, and execute Linux commands with unprecedented ease and safety. It transforms command-line interactions into an intelligent, interactive experience.
-
π€ AI-Powered Command Generation
- Generates multiple command suggestions for any task
- Utilizes advanced language models to create diverse solutions
-
π Interactive Command Selection
- Displays multiple command options
- Allows user to choose the most suitable command
-
π‘οΈ Advanced Safety Mechanisms
- Checks for potentially dangerous commands
- Provides confirmation prompts
- Prevents accidental system damage
-
π Flexible Command Editing
- Allows up to 3 command modifications
- Provides an intuitive editing interface
- Bash (4.0+)
jq
- Command-line JSON processorcurl
- Transfer data from or to a server- Groq API Key
# Clone the repository
git clone https://github.com/yourusername/aicommand.git
# Navigate to the directory
cd kai
# Make the script executable
chmod +x kai
# Set up your Groq API key
export GROQ_API_KEY='your_api_key_here'
# Basic usage
./kai "Find empty files"
# Other potential queries
./kai "List large files"
./kai "Monitor system resources"
./kai "Backup important directories"
- Query Input: Describe your task
- AI Generation: Receive 5 command suggestions
- Interactive Selection: Choose your preferred command
- Command Editing: Modify if needed
- Safe Execution: Confirm before running
The script includes multiple safety features:
- Dangerous command pattern detection
- User confirmation prompts
- Limited edit attempts
- Explicit execution confirmation
bash
jq
curl
- GROQ API KEY
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature
) - Commit your changes (
git commit -m 'Add some AmazingFeature'
) - Push to the branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
This tool is designed to assist and enhance command-line productivity. Always review commands before execution and understand their potential impact.
Happy Commanding! ππ¨βπ»π©βπ»