A Python application that converts natural language into terminal commands using Groq's LLM API. Simply describe what you want to do, and the assistant will generate and execute the appropriate command.
- Convert natural language to terminal commands
- Get explanations of what each command does
- Execute commands in a new terminal window
- Cross-platform support (Linux, macOS, Windows)
- Powered by Groq's DeepSeek model
- Install dependencies:
bash pip install openai python-dotenv
-
Get a Groq API key from console.groq.com
-
Create a
.envfile:
GROQ_API_KEY=your_api_key_hereRun the assistant:
python terminal_assistant.pyExample:
What command would you like to generate? show all running processes
Explanation: Lists all running processes with detailed information
Generated command: ps aux
Would you like to execute this command? (y/n):
- Your request is sent to Groq's LLM API
- The model generates a command and explanation
- You can review both before execution
- If approved, the command runs in a new terminal window
- Python 3.6+
- OpenAI Python package (for Groq API compatibility)
- python-dotenv
- A Groq API key
- Commands execute in a new terminal window
- You must approve each command before execution
- API key is stored securely in
.env