CodeGuardAI is an application designed to enhance the code review process by automatically checking uncommitted changes and utilizing OpenAI's powerful code analysis capabilities to determine if the code is up to standard or requires improvements.
- Automated Code Analysis: Scans your uncommitted changes for potential issues.
- OpenAI Integration: Uses OpenAI's algorithms to assess code quality.
- Immediate Feedback: Provides suggestions for improvements before committing.
- Customizable Prompts: Includes a
prompts.ts
file to add prompts for different file extensions.
- Git
- Node.js
- An OpenAI API key
- Clone the repository:
git clone https://github.com/patrykswiatek/code-guard-ai.git
- Navigate to the cloned directory:
cd code-guard-ai
- Install the necessary dependencies:
npm install
- Create a .env file in the root directory with the following contents:
OPEN_AI_API_KEY=your_api_key_here OPEN_AI_MODEL=chosen_text_generation_model PROJECT_DIRECTORY=path_to_your_project
- Build the application:
npm run build
- Start the app:
npm start