Code Broker is a sophisticated multi-agent system powered by Google's Agent Development Kit (ADK) and Gemini models. It employs a team of specialized AI agents to analyze your code, assess its quality, and generate comprehensive HTML reports.
- 🔍 Code Description: Analyzes structure, architecture, and logic.
- ✅ Correctness Assessment: Evaluates functionality, security, efficiency, and error handling.
- 🎨 Style Assessment: Checks readability, maintainability, linting scores, and best practices.
- 💡 Improvement Recommendations: Provides actionable suggestions to enhance your codebase.
- 📊 Comprehensive Reporting: Generates a beautiful interactive HTML report with all findings.
pip install code-brokerIf you want to run the latest version or contribute:
-
Clone the repository:
git clone https://github.com/Samir-atra/Code_broker_pkg.git cd code_broker -
Create a Virtual Environment (Recommended):
python3 -m venv .venv source .venv/bin/activate -
Install in Editable Mode:
pip install -e .
Before running Code Broker, you need to configure your API keys.
-
Create a
.envfile in your project root or the directory where you run the tool:touch .env
-
Add your credentials: Open
.envand add the following:# Required: Your Google Gemini API Key GOOGLE_API_KEY=your_gemini_api_key_here # Optional: For analyzing private GitHub repositories GITHUB_TOKEN=your_github_personal_access_token
🔑 Get your Google API Key here: Google AI Studio
Once installed, you can use the code-broker CLI command to analyze files, directories, or repositories.
code-broker /path/to/your/script.pycode-broker /path/to/your/project/srccode-broker https://github.com/username/repositoryAfter analysis, Code Broker will:
- Display a summary in your terminal.
- Generate a detailed HTML Report in the
reports/directory. - Automatically open the report in your default web browser.
Contributions are welcome! Please feel free to submit a Pull Request.