gptreview

0.0.3 • Public • Published

gptreview

gptreview is a command-line tool that leverages OpenAI's GPT-3.5 to provide code reviews for Git branch differences. Get insightful code reviews in your preferred language, directly from the command line!

Requirements

An OpenAI API key

Usage

Set your OpenAI API key as an environment variable:

export OPENAI_API_KEY=yourapikey

Run gptreview with the following command:

npx gptreview [options]

Command Line Options

-l, --lang <language>: Specify the language for the code review (default: "english").

-s, --source <sourceBranch>: Specify the source branch for the code review (default: current branch).

-t, --target <targetBranch>: Specify the target branch for the code review (default: "main").

-p, --show-prompt: Show the prompt sent to ChatGPT (default: false).
npx gptreview -l japanese -s feature-branch -t main

This will provide a code review in Japanese, comparing the feature-branch to the main branch.

License

MIT License

Disclaimer

This tool is not a substitute for professional code reviews conducted by experienced developers. The quality of the review depends on the performance of the GPT-3.5 model, which may not always provide accurate or optimal recommendations. Use this tool at your own risk and always double-check the suggestions provided.

Readme

Keywords

Package Sidebar

Install

npm i gptreview

Weekly Downloads

3

Version

0.0.3

License

MIT

Unpacked Size

20.1 kB

Total Files

5

Last publish

Collaborators

  • islandryu