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.
- 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.
To install AI-Code-Critic, you need to have Go installed on your machine. Follow these steps:
go install github.com/kmesiab/ai-code-critic@latest
Set your OpenAI API Key
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:
echo "export IGNORE_FILES=.mod,.sum" > .env && source .env
To run the program:
./ai-code-critic
- Click the "+" button and enter the url to a GitHub pull request.
- Wait patiently while things happen.
- The diff will be loaded in the right pane.
- The report will appear shortly after in the left pane.
make build
make test
make test-verbose
make test-race
make install-tools
make lint
make lint-markdown
-
Fork the Repository: Click the 'Fork' button at the top right of this page.
-
Clone Your Fork:
git clone https://github.com/kmesiab/ai-code-critic cd ai-code-critic
-
Create a New Branch:
git checkout -b your-branch-name
-
Make Your Changes: Implement your changes or fix issues.
-
Commit and Push:
git commit -m "Add your commit message" git push origin your-branch-name
-
Create a Pull Request: Go to your fork on GitHub and click the 'Compare & pull request' button.
Please ensure your code adheres to the project's standards and guidelines.
Run make lint
before committing to ensure your code is properly formatted.
- Always rebase, never merge commit
- Always use a description commit message
- Separate your title from your description
- Keep commit messages under 50 characters
- Start your branch with
feat|bugfix|docs|style|refactor|perf|test
- Squash your commits into logical units of work
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. 🌈