A standalone code review tool based on GPT4ALL.
Project description
Code Review Automation Tool
This program is designed to assist developers by automating the process of code review. By leveraging a pre-trained standalone machine learning model (e.g., GPT-4), it reads source code files and provides suggestions for improvements.
Features
- File Scanning: Ability to scan a single file or all files in the current directory.
- Multiple Output Formats: Results can be exported as plain text, JSON, or XML files.
- Customizable Model: Utilizes a customizable language model, allowing users to select the appropriate model for their needs.
Installation
Make sure you have Python 3.x installed.
pip install -r requirements.txt
or
pip3 install -r requirements.txt
Usage
You can run the program from the command line with various options:
gpt4all_code_review --file <file_path> --all
Options
h
,--help
: Show this help message and exit--model
: Specifies the model name. Default is"orca-mini-3b.ggmlv3.q4_0.bin"
.--file
: Specifies the file path to analyze. If not provided, all files in the current directory will be analyzed.--all
: Includes all files and folders in the current directory for scanning.--output
: Output type (default:txt
). Options:txt
,json
,xml
.--export
: Export to file (default:False
).--export-folder
: Export to folder (default:./code_review_results
).
Example
To analyze a single file:
gpt4all_code_review --file=./path/to/yourfile.py
To analyze all files in the current directory:
gpt4all_code_review --all
Output Formats
- Text: A human-readable table with file paths and suggestions.
- JSON: A machine-readable format that can be parsed programmatically.
- XML: An alternative machine-readable format.
Dependencies
gpt4all
: Library used for utilizing the GPT-4 model.prettytable
: Library used for rendering results in a table format.
License
MIT3
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for gpt4all_code_review-0.13-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e3ab9b2281a8da5f1a8d020224fd32eb88b76b64e1f6ad7aabcc1957d2645516 |
|
MD5 | 906254210d45dc5cf03aecfc8309a1cf |
|
BLAKE2b-256 | c648f767884f35fefb8504378c346cedc07590633be73dca5c6603d69eee72ee |