Your personal code reviewer powered by LLMs (OpenAI GPT-3.5/4) & Embeddings ⚡️ Improve code quality and catch bugs before you break production 🚀 Lives in your Github/GitLab/Azure DevOps CI
MIT License
Code Review GPT uses Large Language Models to review code in your CI/CD pipeline. It helps streamline the code review process by providing feedback on code that may have issues or areas for improvement.
It should pick up on common issues such as:
It can also be run locally in your command line to review staged files.
Code Review GPT is in alpha and should be used for fun only. It may provide useful feedback but please check any suggestions thoroughly.
https://github.com/mattzcarey/code-review-gpt/assets/77928207/92029baf-f691-465f-8d15-e1363fcb808e
See the package documentation for more information.
See the action documentation for more information.
Clone the repository:
git clone https://github.com/mattzcarey/code-review-gpt.git
cd code-review-gpt && cd packages/code-review-gpt
Install dependencies:
npm install
Set up the API key:
When used globally you should run export OPENAI_API_KEY=YOUR_API_KEY
(or similar for your operating system) in your terminal to set the API key.
Run the application:
npm start
See the package.json file for all the npm commands you can run.
We use release-please on this project. If you want to create a new release from your PR, please make sure your PR title follows the Conventional Commits format. The release-please bot will automatically create a new release for you when your PR is merged.
Thanks to our wonderful contributors!
The roadmap shifts the focus to a Github app which can be installed on any repo. This will allow for a more seamless UX and better features including a chatbot to discuss the PR and make suggestions.
The code-review-gpt package will continue to be maintained and improved based on the feedback from the Github app.