Code Monkey home page Code Monkey logo

chatgpt-code-review's Introduction

ChatGPT-Code-Review

ChatGPT-Code-Review is a Rust application that uses the OpenAI GPT-3.5 language model to review code. It accepts a local path to a folder containing code, and generates a review for each file in the folder and its subdirectories.

The program prompts the user for an OpenAI API key, which is required to use the GPT-3.5 model. Once the API key is provided, the program generates code reviews using GPT-3.5 and prints the results to the console. Additionally, the program saves the reviews to a file named "review.txt" in the current directory.

Getting Started

To use ChatGPT-Code-Review, you will need to obtain an OpenAI API key. You can sign up for an API key on the OpenAI website.

Once you have an API key, you can either compile the program in Rust or download the latest release.

To compile the program in Rust, run the following command:

cargo build --release This will generate an executable in the target/release directory.

To run the program, navigate to the directory containing the executable and run the following command:

./chatgpt-code-review The program will prompt you for your OpenAI API key and the path to the folder containing the code you want to review. Once you provide this information, the program will generate a review for each file in the folder and its subdirectories.

Output

The output of the program is printed to the console and saved to a file named "review.txt" in the current directory. Each review consists of the file path and the review text generated by GPT-3.5.

Here's an example of what the output might look like:

File: /path/to/file1.py
Review:
This code is well-organized and easy to read. The variable names are clear and descriptive, and the function names are consistent with Python naming conventions. Overall, this is a well-written and maintainable code.

File: /path/to/file2.js
Review:
The code contains some syntax errors and undefined variables. Additionally, the use of nested callbacks makes the code difficult to follow. I would recommend refactoring this code to use Promises or async/await to improve readability and maintainability.

Contributing

We welcome contributions to ChatGPT-Code-Review! If you have any feedback, suggestions or bug reports, please feel free to open an issue or submit a pull request.

chatgpt-code-review's People

Contributors

gorgarp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

chatgpt-code-review's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.