CommitIQ is a modern Python backend service built with FastAPI designed to analyze the quality, clarity, and adherence to best practices of Git commit messages. It uses an AI model (simulated, ready for LLM integration) to provide objective feedback and a quality score, helping teams maintain high standards in their code history.
| Feature | Description |
|---|---|
| AI Quality Scoring | Provides a score (0-10) and structured feedback for each commit message, ensuring clarity and intent. |
| FastAPI Backend | Offers a clean, modern, and high-performance API endpoint (/analyze) for easy integration with frontend dashboards or CI/CD pipelines. |
| Git Log Extraction | Utilizes GitPython for efficient retrieval and parsing of commit history from any local repository. |
| Structured Output | Returns detailed analysis in a standard JSON format, ready for data visualization. |
- Python 3.9+
- Git installed on your system.
- A local Git repository for testing (CommitIQ itself is a good candidate!).
- Clone the repository:
git clone [https://github.com/ewhx-dev/CommitIQ.git](https://github.com/ewhx-dev/CommitIQ.git) cd CommitIQ - Install dependencies (FastAPI, Uvicorn, GitPython):
pip install -r requirements.txt
- Start the FastAPI server using Uvicorn:
The server will be accessible at
uvicorn backend.main:app --reload
http://127.0.0.1:8000.
Open your browser at http://127.0.0.1:8000/docs to access the Swagger UI interface and test the GET /analyze endpoint.
Example Call (using the current repository):
- Endpoint:
http://127.0.0.1:8000/analyze - Query Parameter:
repo_path=.
The project follows a standard backend service structure with a clear separation of concerns:
backend/main.py: The FastAPI application entry point, defining the API route.backend/core/analyzer.py: Contains the core logic for Git log extraction and the simulated AI analysis.requirements.txt: Lists all Python dependencies (fastapi,GitPython, etc.).
This project is designed to be easily upgraded:
- External LLM Integration: Replace the
_simulate_ai_analysisfunction inanalyzer.pywith an actual API call (using libraries likeopenaioranthropic) to leverage powerful models for deep qualitative analysis. - Frontend Dashboard: Build a companion React/Next.js frontend to visualize the average score, author contribution, and the distribution of scores across the project timeline.
Developed by [ewhx-dev]