Download the PHP package refactorlab/ai-code-reviewer without Composer

On this page you can find all versions of the php package refactorlab/ai-code-reviewer. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package ai-code-reviewer

AI Code Reviewer v1.0.0

Latest Version on Packagist GitHub Tests Action Status

Introduction

AI Code Reviewer is a powerful Laravel package that automatically analyzes GitHub pull requests using OpenAI's GPT-4. It helps improve code quality by identifying potential issues, bugs, and suggesting improvements - all without manual intervention.

The package listens for GitHub webhook events when pull requests are opened or updated, extracts the code changes, sends them to OpenAI for analysis, and then posts the AI-generated review comments directly back to the pull request on GitHub.

This intelligent code review assistant saves developer time, helps maintain coding standards, and can catch issues that might be missed during human review.

Features

Installation

You can install the package via composer:

The package will automatically register its service provider with Laravel's auto-discovery.

Configuration

Publish the configuration file:

This will create a config/aicode.php file where you can configure the package.

Required Environment Variables

Add the following to your .env file:

Detailed Configuration

The config/aicode.php file contains the following sections:

OpenAI Configuration

GitHub Configuration

File Filters

Review Settings

Usage

Setting up the GitHub Webhook

  1. Go to your GitHub repository's settings
  2. Click on "Webhooks" → "Add webhook"
  3. Set the Payload URL to:

  4. Select content type: application/json
  5. Enter your webhook secret (same as GITHUB_WEBHOOK_SECRET)
  6. Under "Which events would you like to trigger this webhook?", select "Pull requests"
  7. Ensure "Active" is checked and click "Add webhook"

Once set up, the AI Code Reviewer will automatically analyze new pull requests and post its review as comments.

Example GitHub PR Comments

When the AI Code Reviewer analyzes a pull request, it will post comments like these:

Example 1: Bug Detection

Example 2: Code Improvement

Example 3: Security Issue

Testing

Security

If you discover any security issues, please contact the author directly instead of using the issue tracker.

License

The MIT License (MIT). Please see License File for more information.

Changelog

Please see CHANGELOG for more information on what has changed recently.


All versions of ai-code-reviewer with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
illuminate/support Version ^11.0
illuminate/http Version ^11.0
illuminate/routing Version ^11.0
guzzlehttp/guzzle Version ^7.8
openai-php/client Version ^0.8.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package refactorlab/ai-code-reviewer contains the following files

Loading the files please wait ....