Skip to main content

A self-contained tool for code review powered by GPT4ALL.

Project description

PyPI version Downloads License: MIT PyPI format LinkedIn

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 gpt4all-code-review

For updates, use:

pip install gpt4all-code-review --upgrade

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gpt4all_code_review-2025.5.9.1718.tar.gz (4.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gpt4all_code_review-2025.5.9.1718-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

Details for the file gpt4all_code_review-2025.5.9.1718.tar.gz.

File metadata

File hashes

Hashes for gpt4all_code_review-2025.5.9.1718.tar.gz
Algorithm Hash digest
SHA256 b5f3b0a55044d1d7eaa5211a21542e63f0637c873889feef67010adfa394d053
MD5 39b47755bbf9a30a5f9957ac548557c3
BLAKE2b-256 50d5a1ab16666d6e8b86345648bd46b50779ae0ace6c11709d057e2326926fa1

See more details on using hashes here.

File details

Details for the file gpt4all_code_review-2025.5.9.1718-py3-none-any.whl.

File metadata

File hashes

Hashes for gpt4all_code_review-2025.5.9.1718-py3-none-any.whl
Algorithm Hash digest
SHA256 817e2b191a76d38d0e518c71a715c1c0513e500fa185c6a97af36c71d19a2972
MD5 8dee7dfbf252d642dd2fbde98a5de366
BLAKE2b-256 addcf63b0c14737841b936dc40267cf402f3423868dcabb1ccdb010854098e0a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page