AI-powered code reviews
MIT License
Get review suggestions to changes in your git working directory or to any committed changes in your current branch against a target branch and let these suggestions get applied to your code with an informative commit message.
[!NOTE] Review suggestions will only be applied to files without unstaged changes, so that nothing is overridden.
rgpt review
: Reviews all changes in your working directory and applies review suggestions to related files autonomously.rgpt review --readonly
: Reviews all changes without applying the suggestions to the code.rgpt review --guided
: User needs to confirm review process for each file. Useful if not all files should get reviewed.rgpt review --target $BRANCH
: Reviews all committed changes in your current branch compared to $BRANCH
.rgpt review --gpt4
: Use GPT-4 model (default is GPT-3.5).rgpt commit
: Generates a commit message for your staged changes.Create your personal OpenAI Api key and add it as $OPENAI_API_KEY
to your environment with:
export OPENAI_API_KEY=<YOUR_API_KEY>
Install with pipx
:
pipx install gitreview-gpt
[!NOTE] It is recommended to use
pipx
for installation, nonetheless it is also possible to usepip
.