Skip to content

yeabwang/buddy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Buddy - AI Coding Assistant

Buddy is a CLI tool that leverages Groq's LLMs to help you write, explain, and refactor code directly from your terminal.

Installation

pip install buddy-ai-cli

Or install from source:

git clone https://github.com/yeabwang/buddy.git
cd buddy
pip install .

Configuration

1. Set up API Key

Buddy uses Groq. You need to set your API key first.

buddy config --key <YOUR_GROQ_API_KEY>

2. Health Check & Dependencies

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 config

Usage

Generate Code

Ask 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.py

Explain Code

Get a clear explanation of what a code file does.

buddy explain complex_script.py

Refactor Code

Refactor 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

Options

  • -m, --model: Specify the LLM model to use (default: openai/gpt-oss-20b).
    buddy code question.txt -a answer.py -m llama3-70b-8192

License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages