ChatGPT Code Review is an app designed to help software developers improve their code quality by leveraging the power of OpenAI's large language models. The app analyzes the code in a given GitHub repository and provides recommendations to enhance the code. It is a valuable tool for developers, allowing them to discover potential issues in their codebase.
To use ChatGPT Code Review and get recommendations for your code, follow these steps:
- Access the app: Open the ChatGPT Code Review app in your web browser.
- Enter the GitHub repository URL: In the input field labeled "GitHub Repository URL", enter the URL of the repository you'd like to analyze.
- Enter your OpenAI API Key: In the input field labeled "OpenAI API Key", enter your OpenAI API key. If you don't have one, you can obtain it from the OpenAI platform.
- Select file extensions: Choose the file extensions you want to analyze or add additional extensions in the provided input field.
- Clone the repository: Click the "Clone Repository" button. The app will display the files available for analysis in a tree structure.
- Select files to analyze: Check the boxes next to the files you want to analyze, then click the "Analyze Files" button.
- Review the recommendations: The recommendations will be displayed in a clear and structured format, with code snippets and suggested improvements. Review these recommendations to identify potential areas for improvement in your code.
Keep in mind that ChatGPT Code Review is an AI-powered tool, and while it can provide helpful insights, it may not always be perfect. It is essential to use your judgment and expertise when assessing the recommendations provided by the app.
Here's how to install and use ChatGPT Code Review on your local machine:
-
Clone the repository: Execute this on your local machine and navigate to the project directory:
git clone https://github.com/domvwt/chatgpt-code-review.git cd chatgpt-code-review
-
Set up a virtual environment: Run this command to establish a virtual environment:
python3 -m venv .venv
-
Switch on the virtual environment: Use the corresponding command to activate your virtual environment:
source .venv/bin/activate # Linux or macOS .venv\Scripts\activate # Windows
-
Deploy the application: Use this command to install the app and its dependencies:
pip install -e .
-
Launch the app: To get the app running, use this command:
streamlit run chatgpt_code_review/app.py