A self-contained tool for code review powered by 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>
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:plain
). Options:plain
,txt
(prettytable),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
- PLAIN: A human-readable plain txt file.
- TXT: A human-readable table (prettytable) with file paths and suggestions.
- JSON: A machine-readable format that can be parsed programmatically.
- XML: An alternative machine-readable format.
Dependencies
os
: Standard Python library for interacting with the operating system.json
: Standard Python library for working with JSON data.argparse
: Standard Python library for parsing command-line arguments.gpt4all
: A Python library for interfacing with GPT-4 models. Used to apply the AI models to the code.prettytable
: A Python library to print tabular data in a visually appealing ASCII table format.datetime
: Standard Python library for working with dates and times.console_progressbar
: A Python library for displaying progress bars in the console.
License
MIT License
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
File details
Details for the file gpt4all-code-review-0.21.tar.gz
.
File metadata
- Download URL: gpt4all-code-review-0.21.tar.gz
- Upload date:
- Size: 4.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 89538a1425532b0164042053d900554d7495bf0f765d0883305d51b39818e05c |
|
MD5 | 415491c82836b6be77d112230b5722e5 |
|
BLAKE2b-256 | d7bb5ceb0f7f346456519e2f14bdf1ee35dc28ae0b02e4c04a0ca43c88d29567 |
File details
Details for the file gpt4all_code_review-0.21-py3-none-any.whl
.
File metadata
- Download URL: gpt4all_code_review-0.21-py3-none-any.whl
- Upload date:
- Size: 5.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5e433957923998be6e2695fbd936454bebc32bfa45a021dcc6e17cb02931b11a |
|
MD5 | 83766bd3f19bb363b5b61d68aa6bcb93 |
|
BLAKE2b-256 | 824821b2712e21ce1af8b6db2bd41e02cd149436f0bfe679f335b726b8061d84 |