A minimal, production-grade local CLI tool that uses Groq's llama-3.3-70b-versatile model.
Designed as a thin client: cloud reasoning, local control.
- Model: Strictly
llama-3.3-70b-versatile. - No Local Models: Lightweight, relies on Groq API.
- Linux-First: System prompt enforces Linux assumptions.
- Safe: No automatic command execution.
- Structured: Concise, markdown formatted output.
To install globally so you can run ai from any folder:
Run the install script:
./install_windows.ps1Run the install helper from Windows:
./install_wsl.batOr manually inside WSL:
chmod +x install_linux.sh
./install_linux.sh
source ~/.bashrcIf you prefer to install manually:
pip install .Note: You may need to manually add your Python Scripts folder to your PATH.
You must set your API key environment variable:
Windows:
[System.Environment]::SetEnvironmentVariable('GROQ_API_KEY', 'your_key_here', [System.EnvironmentVariableTarget]::User)
# Restart terminal to applyLinux / WSL:
echo 'export GROQ_API_KEY="your_key_here"' >> ~/.bashrc
source ~/.bashrcThe tool exposes a single command ai. You can use it with or without quotes.
ai instruction
# or
ai "instruction"1. Basic Query:
ai Explain the difference between TCP and UDP headers2. Coding Help:
ai Write a Python script to recursively list all parsing errors in a log file3. System Command Execution:
You can ask the AI to generate and execute commands for you using the -e (or --execute) flag.
The tool will propose a command and ask for your confirmation before running it.
ai -e "Find all files larger than 10MB in /var/log"Output:
Proposed Command:
find /var/log -type f -size +10M
Execute this command? [y/N]: y
...
- Authentication Error: Ensure
GROQ_API_KEYis set correctly. - Rate Limit: The free tier of Groq has limits. Wait a moment and try again.
- Timeout: Requests exceeding 30s may time out.
Since you are strictly using llama-3.3-70b-versatile with Linux-first assumptions, WSL is an ideal environment.
-
Access the directory: Navigate to your cloned repository:
cd groq-cli -
Install: We recommend using a virtual environment in WSL to avoid conflicts with apt-managed python.
python3 -m venv venv source venv/bin/activate pip install -e .
-
Set API Key:
export GROQ_API_KEY="gsk_..."
-
Run:
ai "List the top 5 largest files in the current directory"
Contributions are welcome! Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests.
This project is licensed under the MIT License - see the LICENSE file for details.