Skip to content

Samir-atra/Code_broker_pkg

Repository files navigation

🕵️‍♂️ Code Broker: Multi-Agent Code Assessment System

Donate

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.

✨ Features

  • 🔍 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.

🚀 Installation

📦 From PyPI (Coming Soon)

pip install code-broker

🛠️ From Source (Development)

If you want to run the latest version or contribute:

  1. Clone the repository:

    git clone https://github.com/Samir-atra/Code_broker_pkg.git
    cd code_broker
  2. Create a Virtual Environment (Recommended):

    python3 -m venv .venv
    source .venv/bin/activate
  3. Install in Editable Mode:

    pip install -e .

⚙️ Configuration

Before running Code Broker, you need to configure your API keys.

  1. Create a .env file in your project root or the directory where you run the tool:

    touch .env
  2. Add your credentials: Open .env and 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


🏃‍♂️ Usage

Once installed, you can use the code-broker CLI command to analyze files, directories, or repositories.

📝 Analyze a Local File

code-broker /path/to/your/script.py

📂 Analyze a Directory

code-broker /path/to/your/project/src

🌐 Analyze a GitHub Repository

code-broker https://github.com/username/repository

📄 Output

After analysis, Code Broker will:

  1. Display a summary in your terminal.
  2. Generate a detailed HTML Report in the reports/ directory.
  3. Automatically open the report in your default web browser.

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

About

PIP package for the code broker agent

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages