AIReview

AIReview is a command-line tool that leverages LLM to provide code reviews for your Git changes.

While searching for code review services, I found that most options were quite expensive—around $20 per seat. That seemed costly, so I thought, why not build a basic CLI tool instead? And that’s how AIReview was born.

The process is simple. Whenever you run git add on your files, AIReview extracts the Git diff, along with the relevant code files, and sends them to an LLM for review. The review is based on a prompt that you define in a configuration file. You then run AIReview via the CLI to generate the review output.

nstalling AIReview is straightforward. You can install it using pip:

pip install aireview

After installation, you need to create a configuration file (aiconfig) inside your project. Here’s an example:

[ai]
model = gpt-4
api_key = your_openai_api_key
base_url = https://api.openai.com/v1  # Optional: for custom OpenAI-compatible endpoints

[review]
output = ai-review.md # Output file for the review comments

[context]
project_context = Your project context description... # Example, I am working on Nodejs, typescript project

[prompt]
prompt_template = Your custom review prompt... # Example, Review the changes and provide feedback on the code quality and best practices

Since AIReview uses the OpenAI package, you can integrate any OpenAI-compatible LLMs. If you plan to use OpenAI models, you don’t need to specify the base_url. Personally, I use Gemini 2.0 Flash.

Try it out and let me know what you think!

no responses for AIReview

    Leave a Reply