Giter VIP home page Giter VIP logo

maestro's Introduction

AI-Powered Code Review

AI-Powered Code Review is an automated tool that leverages artificial intelligence to perform comprehensive code reviews on GitHub repositories. It aims to improve code quality, identify potential issues, and suggest improvements across various file types and programming languages.

Features

  • Automated code review using AI (supports multiple AI platforms)
  • GitHub integration for seamless repository analysis and pull request creation
  • Customizable file inclusion/exclusion patterns
  • Support for multiple programming languages and file types
  • Automatic exclusion of binary files
  • Resumable reviews with checkpoint system
  • Configurable review depth and token budget

Prerequisites

  • Python 3.12 or higher
  • Miniconda or Anaconda

Installation

  1. Clone the repository:
git clone https://github.com/yourusername/ai-powered-code-review.git
cd ai-powered-code-review
  1. Create and activate the Conda environment:
conda env create -f environment.yml
conda activate ai-code-review

Configuration

  1. Edit keys.yml and add your API keys:
github_token: "your_github_token_here"
ai_keys:
    anthropic:
    - "your_anthropic_api_key_1_here"
    - "your_anthropic_api_key_2_here"
    openai:
    - "your_openai_api_key_1_here"
    - "your_openai_api_key_2_here"

Alternatively, you can set the following environment variables:

  • GITHUB_TOKEN
  • ANTHROPIC_API_KEY (comma-separated if multiple)
  • OPENAI_API_KEY (comma-separated if multiple)

Usage

Run the main script with the GitHub repository URL you want to review:

python main.py https://github.com/username/repo-to-review

Additional options:

  • --review_depth: Choose between "minimum", "balanced", or "comprehensive" (default: "balanced")
  • --config: Specify a custom config file path (default: "config.yml")
  • --max_file_size: Set maximum file size to review in bytes (default: 1MB)

Example with options:

python main.py https://github.com/username/repo-to-review --review_depth comprehensive --max_file_size 2097152

Customizing Review Scope

Create a .aireviews file in the root of the repository you're reviewing to customize which files are included or excluded: ``` ### Include all files by default *

### Exclude specific directories
node_modules/
vendor/

### Exclude specific file types
*.log
*.tmp

### Include a specific file that would otherwise be excluded
!important_config.log
```

Contributing

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

maestro's People

Contributors

doriandarko avatar aliig avatar micksabox avatar definitelynotsoftware avatar emre-koc avatar jhsu avatar cocktailpeanut avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.