Skip to content

mihir20/codecriticAI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🚀 CodeCriticAI

AI-Powered Code Review Tool

PyPI version PyPI downloads License: MIT Python 3.10+

CodeCriticAI is a tool for performing AI-powered code reviews using Git diffs. It leverages OpenAI's API to analyze code changes and generate detailed reviews.

Features

  • Analyzes code changes using Git diffs
  • Utilizes OpenAI's API for code review
  • Generates HTML reports of the code review

TODOs

  • Add support for gemini as it has larger token window which will be helpful to review large prs
  • Add support to also add commit messages also in the prompt

Requirements

  • Python 3.6+
  • OpenAI API key
  • Git

🚀 Quick Start

Installation

pip install codecriticai

💡 Check out codecriticai on PyPI for the latest version and release notes.

Configuration

# Linux/macOS
export OPENAI_API_KEY=your-api-key-here

# Windows (PowerShell)
$env:OPENAI_API_KEY="your-api-key-here"

📚 Usage

# Review current directory changes
codecriticai

# Review specific directory
codecriticai --dir /path/to/repo

# Compare with different base branch
codecriticai --base develop

🤝 Contributing

We love contributions! Here's how you can help:

🛠️ Development Setup

  1. Clone the repository:
git clone https://github.com/mihir20/codecriticAI
cd codecriticAI
  1. Set up Python environment:

Using pyenv (Recommended)

# Install Python 3.13.0
pyenv install 3.13.0

# Create a virtual environment
pyenv virtualenv 3.13.0 codecriticAI-dev

# Activate the environment
pyenv activate codecriticAI-dev

Using venv (Alternative)

python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
  1. Install dependencies:
pip install -e .
  1. Run locally:
# Using Python module directly (recommended for development)
python -m codecriticAI.main --base main

# Or after installing in development mode
codecriticai --base main

💡 Note: Using pyenv is recommended as it provides better Python version management and isolation.

📝 License

This project is licensed under the MIT License - see the LICENSE file for details.

🌟 Show Your Support

If you find codecriticAI useful, please consider:

  • ⭐ Starring the repository
  • 🐛 Reporting issues
  • 🤝 Contributing to the code
  • 📢 Spreading the word

Made by Mihir Gandhi

About

CodeCriticAI is a tool for performing AI-powered code reviews using Git diffs.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages