Buddy is a CLI tool that leverages Groq's LLMs to help you write, explain, and refactor code directly from your terminal.
pip install buddy-ai-cliOr install from source:
git clone https://github.com/yeabwang/buddy.git
cd buddy
pip install .Buddy uses Groq. You need to set your API key first.
buddy config --key <YOUR_GROQ_API_KEY>Run buddy config without arguments to check your API key status and install dependencies from a requirements.txt if present in your current directory.
buddy configAsk a question in a text file and get the code output.
# Create a question file
echo "Write a Python script to scrape a website" > question.txt
# Generate code
buddy code question.txt -a scraper.pyGet a clear explanation of what a code file does.
buddy explain complex_script.pyRefactor code to be cleaner and more efficient.
# Print refactored code to stdout
buddy refactor legacy_code.py
# Save refactored code to a file
buddy refactor legacy_code.py -o clean_code.py-m, --model: Specify the LLM model to use (default:openai/gpt-oss-20b).buddy code question.txt -a answer.py -m llama3-70b-8192
MIT