인공지능을 활용하여 Git 커밋 메시지를 자동으로 생성하는 도구
Project description
AI-Commiter
인공지능을 활용하여 Git 커밋 메시지를 자동으로 생성하는 도구입니다. 파일 변경 내역을 분석하고 OpenAI API를 통해 명확하고 구조화된 커밋 메시지를 생성합니다.
주요 기능
- 자동 커밋 메시지 생성: Git diff를 분석하여 의미 있는 커밋 메시지 생성
- Conventional Commits 지원: 표준화된 커밋 메시지 형식 사용
- 파일 분류 및 요약: 여러 파일 변경 시 카테고리별로 분류하여 요약 정보 제공
- 커스텀 프롬프트: 사용자 정의 프롬프트 템플릿 지원
- 자동 커밋: 생성된 메시지로 자동 커밋 옵션
- 다양한 모델 지원: OpenAI의 다양한 GPT 모델 선택 가능
설치 방법
PyPI 패키지로 설치 (권장)
# PyPI에서 패키지 설치
pip install ai-commiter
# OpenAI API 키 설정
export OPENAI_API_KEY=your-api-key-here
# Windows에서는
# set OPENAI_API_KEY=your-api-key-here
저장소에서 직접 설치
# 저장소 클론
git clone https://github.com/your-username/ai-commiter.git
cd ai-commiter
# 패키지로 설치
pip install -e .
# OpenAI API 키 설정
echo "OPENAI_API_KEY=your-api-key-here" > .env
사용 방법
기본 사용법
# 스테이지된 변경 사항에 대한 커밋 메시지 생성
ai-commit
# 생성된 메시지로 바로 커밋
ai-commit --commit
# 패키지 설치 없이 직접 실행할 경우
python -m ai_commiter.git_commit_ai
추가 옵션
# 특정 저장소 경로 지정
ai-commit --repo /path/to/repo --model gpt-4 --commit
# 파일 분류 기능 비활성화
ai-commit --no-categorize
# 스테이지되지 않은 모든 변경 사항 포함
ai-commit --all
# 다른 OpenAI 모델 사용
ai-commit --model gpt-4
# 커스텀 프롬프트 템플릿 사용
ai-commit --prompt my_custom_prompt.txt
커스텀 프롬프트 템플릿
커스텀 프롬프트 템플릿 파일을 만들어 AI가 생성하는 커밋 메시지의 스타일과 형식을 조정할 수 있습니다. 템플릿에는 {diff}와 {files} 변수를 사용할 수 있습니다.
예시 템플릿:
다음 변경 사항을 분석하여 한국어로 커밋 메시지만 출력해주세요:
커밋 메시지 형식: [타입] 내용
요구 사항
- Python 3.7 이상
- Git
- OpenAI API 키
라이센스
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
ai_commiter-0.1.0.tar.gz
(7.5 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ai_commiter-0.1.0.tar.gz.
File metadata
- Download URL: ai_commiter-0.1.0.tar.gz
- Upload date:
- Size: 7.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c14d474f4e1fedab539a3b6c816d468ef41c4d6a47647d05f5bf95448489893b
|
|
| MD5 |
9c5df6522351e1fa77a332c5ca4fff70
|
|
| BLAKE2b-256 |
07023f13fc8650f74a6d922dc6eed1643fa78b89e27c7624cc77841a5608b835
|
File details
Details for the file ai_commiter-0.1.0-py3-none-any.whl.
File metadata
- Download URL: ai_commiter-0.1.0-py3-none-any.whl
- Upload date:
- Size: 8.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
92b8d1b9fa8e89bfcf1ce4db69413d5ebf8c3e4fc5056cec5bc91098c7275a48
|
|
| MD5 |
650b518b0bcedbbe907c952839c36a0d
|
|
| BLAKE2b-256 |
59b84e37cc466e2272604be820a25c538444b72e6ac7ec1143cf32b6793bacad
|