[![PyPI version](https://badge.fury.io/py/gpt4all-code-review.svg)](https://badge.fury.io/py/gpt4all-code-review) [![Downloads](https://static.pepy.tech/personalized-badge/gpt4all-code-review?period=total&units=international_system&left_color=black&right_color=green&left_text=Downloads)](https://pepy.tech/project/gpt4all-code-review) [![PyPI license](https://img.shields.io/pypi/l/ansicolortags.svg)](https://pypi.python.org/pypi/ansicolortags/)
[![PyPI format](https://img.shields.io/pypi/format/gpt4all-code-review.svg)](https://pypi.python.org/pypi/gpt4all-code-review/)
# 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.
```bash
pip install -r requirements.txt
```
or
```bash
pip3 install -r requirements.txt
```
## Usage
You can run the program from the command line with various options:
```bash
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:
```bash
gpt4all_code_review --file=./path/to/yourfile.py
```
To analyze all files in the current directory:
```bash
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
Raw data
{
"_id": null,
"home_page": "https://github.com/chigwell/gpt4all-code-review",
"name": "gpt4all-code-review",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "",
"author": "Evgenii Evstafev",
"author_email": "chigwel@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/d7/bb/5ceb0f7f346456519e2f14bdf1ee35dc28ae0b02e4c04a0ca43c88d29567/gpt4all-code-review-0.21.tar.gz",
"platform": null,
"description": "[![PyPI version](https://badge.fury.io/py/gpt4all-code-review.svg)](https://badge.fury.io/py/gpt4all-code-review) [![Downloads](https://static.pepy.tech/personalized-badge/gpt4all-code-review?period=total&units=international_system&left_color=black&right_color=green&left_text=Downloads)](https://pepy.tech/project/gpt4all-code-review) [![PyPI license](https://img.shields.io/pypi/l/ansicolortags.svg)](https://pypi.python.org/pypi/ansicolortags/)\n[![PyPI format](https://img.shields.io/pypi/format/gpt4all-code-review.svg)](https://pypi.python.org/pypi/gpt4all-code-review/)\n \n# Code Review Automation Tool\n\nThis 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.\n\n## Features\n\n- **File Scanning:** Ability to scan a single file or all files in the current directory.\n- **Multiple Output Formats:** Results can be exported as plain text, JSON, or XML files.\n- **Customizable Model:** Utilizes a customizable language model, allowing users to select the appropriate model for their needs.\n\n## Installation\n\nMake sure you have Python 3.x installed.\n\n```bash\npip install -r requirements.txt\n```\nor\n```bash\npip3 install -r requirements.txt\n```\n\n## Usage\n\nYou can run the program from the command line with various options:\n\n```bash\ngpt4all_code_review --file <file_path>\n```\n\n### Options\n\n- `h`, `--help`: Show this help message and exit\n- `--model`: Specifies the model name. Default is `\"orca-mini-3b.ggmlv3.q4_0.bin\"`.\n- `--file`: Specifies the file path to analyze. If not provided, all files in the current directory will be analyzed.\n- `--all`: Includes all files and folders in the current directory for scanning.\n- `--output`: Output type (default: `plain`). Options: `plain`, `txt` (prettytable), `json`, `xml`.\n- `--export`: Export to file (default: `False`).\n- `--export-folder`: Export to folder (default: `./code_review_results`).\n### Example\n\nTo analyze a single file:\n\n```bash\ngpt4all_code_review --file=./path/to/yourfile.py\n```\n\nTo analyze all files in the current directory:\n\n```bash\ngpt4all_code_review --all\n```\n\n## Output Formats\n\n- **PLAIN:** A human-readable plain txt file.\n- **TXT:** A human-readable table (prettytable) with file paths and suggestions.\n- **JSON:** A machine-readable format that can be parsed programmatically.\n- **XML:** An alternative machine-readable format.\n\n## Dependencies\n\n- `os`: Standard Python library for interacting with the operating system.\n- `json`: Standard Python library for working with JSON data.\n- `argparse`: Standard Python library for parsing command-line arguments.\n- `gpt4all`: A Python library for interfacing with GPT-4 models. Used to apply the AI models to the code.\n- `prettytable`: A Python library to print tabular data in a visually appealing ASCII table format.\n- `datetime`: Standard Python library for working with dates and times.\n- `console_progressbar`: A Python library for displaying progress bars in the console.\n\n## License\n\nMIT License\n",
"bugtrack_url": null,
"license": "",
"summary": "A self-contained tool for code review powered by GPT4ALL.",
"version": "0.21",
"project_urls": {
"Homepage": "https://github.com/chigwell/gpt4all-code-review"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "824821b2712e21ce1af8b6db2bd41e02cd149436f0bfe679f335b726b8061d84",
"md5": "83766bd3f19bb363b5b61d68aa6bcb93",
"sha256": "5e433957923998be6e2695fbd936454bebc32bfa45a021dcc6e17cb02931b11a"
},
"downloads": -1,
"filename": "gpt4all_code_review-0.21-py3-none-any.whl",
"has_sig": false,
"md5_digest": "83766bd3f19bb363b5b61d68aa6bcb93",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 5302,
"upload_time": "2023-08-06T11:32:54",
"upload_time_iso_8601": "2023-08-06T11:32:54.634832Z",
"url": "https://files.pythonhosted.org/packages/82/48/21b2712e21ce1af8b6db2bd41e02cd149436f0bfe679f335b726b8061d84/gpt4all_code_review-0.21-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "d7bb5ceb0f7f346456519e2f14bdf1ee35dc28ae0b02e4c04a0ca43c88d29567",
"md5": "415491c82836b6be77d112230b5722e5",
"sha256": "89538a1425532b0164042053d900554d7495bf0f765d0883305d51b39818e05c"
},
"downloads": -1,
"filename": "gpt4all-code-review-0.21.tar.gz",
"has_sig": false,
"md5_digest": "415491c82836b6be77d112230b5722e5",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 4638,
"upload_time": "2023-08-06T11:33:02",
"upload_time_iso_8601": "2023-08-06T11:33:02.538190Z",
"url": "https://files.pythonhosted.org/packages/d7/bb/5ceb0f7f346456519e2f14bdf1ee35dc28ae0b02e4c04a0ca43c88d29567/gpt4all-code-review-0.21.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-08-06 11:33:02",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "chigwell",
"github_project": "gpt4all-code-review",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "gpt4all-code-review"
}