An open API service indexing awesome lists of open source software.

https://github.com/kmesiab/ai-code-critic

AI Code Critic: An efficient desktop app leveraging ChatGPT for automated, language-agnostic code reviews. Streamlines code analysis with AI insights, enhancing code quality and developer productivity.
https://github.com/kmesiab/ai-code-critic

codereview fyne go golang openai openai-api tools

Last synced: 23 days ago
JSON representation

AI Code Critic: An efficient desktop app leveraging ChatGPT for automated, language-agnostic code reviews. Streamlines code analysis with AI insights, enhancing code quality and developer productivity.

Awesome Lists containing this project

README

          

# AI-Code-Critic ๐Ÿš€

![Golang](https://img.shields.io/badge/Go-00add8.svg?labelColor=171e21&style=for-the-badge&logo=go)

![Build](https://github.com/kmesiab/ai-code-critic/actions/workflows/go-build.yml/badge.svg)
![Build](https://github.com/kmesiab/ai-code-critic/actions/workflows/go-lint.yml/badge.svg)
![Build](https://github.com/kmesiab/ai-code-critic/actions/workflows/go-test.yml/badge.svg)
[![Go Report Card](https://goreportcard.com/badge/github.com/kmesiab/ai-code-critic)](https://goreportcard.com/report/github.com/kmesiab/ai-code-critic)

## Overview ๐ŸŒŸ

AI-Code-Critic is a desktop application designed to automate code reviews
across various programming languages, utilizing OpenAI's ChatGPT API.
It offers intelligent insights and suggestions to improve code quality
and developer efficiency.

## Features ๐Ÿ› ๏ธ

- **Language-Agnostic Analysis**: Compatible with multiple programming
languages.
- **AI-Powered Insights**: Employs ChatGPT for in-depth code analysis.
- **User-Friendly Interface**: Simple and intuitive GUI for effortless
usage, built with Fyne.

## Installation ๐Ÿ”ง

To install AI-Code-Critic, you need to have Go installed on your machine.
Follow these steps:

```bash
go install github.com/kmesiab/ai-code-critic@latest
```

Set your OpenAI API Key

```bash
echo "export OPENAI_API_KEY=sk-[SECRET]" > .env && source .env
```

Set your Ignore Files. These are file types that will be excluded from
code reviews. They should be a comma-separated list of file extensions.

ex:

```bash
echo "export IGNORE_FILES=.mod,.sum" > .env && source .env
````

To run the program:

```bash
./ai-code-critic
```

## Usage ๐Ÿ’ก

![Screenshot](https://github.com/kmesiab/ai-code-critic/assets/161768/8002cce3-5e62-41ae-8982-9a4257aa8207)

1. Click the "+" button and enter the url to a GitHub pull request.
2. Wait patiently while things happen.
3. The diff will be loaded in the right pane.
4. The report will appear shortly after in the left pane.

## Development and Testing ๐Ÿงช

### Building the Project ๐Ÿ—๏ธ

```bash
make build
```

### Running Tests โœ”๏ธ

```bash
make test
make test-verbose
make test-race
```

### Installing Tools ๐Ÿ› ๏ธ

```bash
make install-tools
```

### Linting ๐Ÿงน

```bash
make lint
make lint-markdown
```

## Contributing ๐Ÿค

### Forking and Sending a Pull Request

1. **Fork the Repository**: Click the 'Fork' button at the top right of this
page.
2. **Clone Your Fork**:

```bash
git clone https://github.com/kmesiab/ai-code-critic
cd ai-code-critic
```

3. **Create a New Branch**:

```bash
git checkout -b your-branch-name
```

4. **Make Your Changes**: Implement your changes or fix issues.
5. **Commit and Push**:

```bash
git commit -m "Add your commit message"
git push origin your-branch-name
```

6. **Create a Pull Request**: Go to your fork on GitHub and click the
'Compare & pull request' button.

## Github Guidelines

Please ensure your code adheres to the project's
[standards and guidelines](https://github.com/kmesiab/ai-code-critic/discussions/24).

### Quick Tips

Run `make lint` before committing to ensure your code is properly formatted.

1. **Always rebase, never merge commit**
2. Always use a description commit message
3. Separate your title from your description
4. Keep commit messages under 50 characters
5. Start your branch with `feat|bugfix|docs|style|refactor|perf|test`
6. Squash your commits into logical units of work

## License ๐Ÿ“

Information regarding the licensing of AI-Code-Critic will be included here.

---

*Note: This project is under active development. Additional features
and documentation will be updated in due course.* ๐ŸŒˆ