acw 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
acw-0.1.0/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 auto-commit-wizard
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
acw-0.1.0/PKG-INFO ADDED
@@ -0,0 +1,230 @@
1
+ Metadata-Version: 2.4
2
+ Name: acw
3
+ Version: 0.1.0
4
+ Summary: The CLI tool for generating AI commit messages from git changes
5
+ Author: bossm0n5t3r
6
+ Author-email: bossm0n5t3r <bossm0n5t3r@gmail.com>
7
+ License-Expression: MIT
8
+ License-File: LICENSE
9
+ Requires-Dist: httpx>=0.28.1
10
+ Requires-Dist: litellm>=1.82.6
11
+ Requires-Dist: questionary>=2.1.1
12
+ Requires-Dist: rich==14.3.3
13
+ Requires-Python: >=3.11
14
+ Description-Content-Type: text/markdown
15
+
16
+ # ACW (Auto Commit Wizard)
17
+
18
+ AI를 활용해 Git 커밋 메시지를 생성하는 CLI 도구입니다.
19
+
20
+ `litellm` 기반으로 OpenAI, Anthropic, Google Gemini, Ollama, LM Studio 등 다양한 provider를 사용할 수 있습니다.
21
+
22
+ ## 주요 기능
23
+
24
+ - 설정 마법사(`acw config`)로 provider/model/API 키 환경변수/기본 옵션 설정
25
+ - `staged diff`(기본), `stash`, `ref` 기준 커밋 메시지 생성
26
+ - 프롬프트 템플릿 관리(`acw prompt`) 및 포맷별 기본 프롬프트 제공
27
+ - 로컬 LLM 서버 연결 진단(`acw doctor`)
28
+ - 후보 여러 개 생성 후 선택, JSON 출력, 파일 저장, 클립보드 복사 지원
29
+
30
+ ## 요구 사항
31
+
32
+ - Python 3.11+
33
+ - Git
34
+ - [uv](https://github.com/astral-sh/uv) 권장
35
+
36
+ ## 설치
37
+
38
+ PyPI 배포 버전을 `uv`로 설치:
39
+
40
+ ```bash
41
+ uv tool install acw
42
+ ```
43
+
44
+ 개발용(소스에서 실행):
45
+
46
+ ```bash
47
+ git clone https://github.com/auto-commit-wizard/acw.git
48
+ cd acw
49
+ uv sync
50
+ ```
51
+
52
+ ## 빠른 시작
53
+
54
+ 처음에는 설정 마법사를 실행하세요.
55
+
56
+ ```bash
57
+ acw config
58
+ ```
59
+
60
+ 가장 기본적인 실행은 다음과 같습니다.
61
+
62
+ ```bash
63
+ acw generate
64
+ ```
65
+
66
+ 참고:
67
+
68
+ - `acw`에 서브커맨드를 생략하면 내부적으로 `generate`로 동작합니다.
69
+ - 기본 생성 대상은 `staged` 변경사항입니다. (`git add`가 먼저 필요)
70
+
71
+ ## 명령어
72
+
73
+ ### `acw generate`
74
+
75
+ Git diff를 수집해 커밋 메시지를 생성합니다.
76
+
77
+ - `-p, --provider`: provider 지정
78
+ - `-m, --model`: 모델명 지정
79
+ - `-P, --profile`: profile 지정
80
+ - `-t, --prompt`: 프롬프트 이름 지정
81
+ - `-F, --prompt-file`: 프롬프트 파일 경로 지정
82
+ - `--print-prompt`: 최종 프롬프트 출력
83
+ - `-l, --language {ko,en}`: 출력 언어
84
+ - `-f, --format {plain,conventional,gitmoji}`: 메시지 포맷
85
+ - `-g, --generate`: 후보 개수
86
+ - `--from-stash`: stash 기준 diff 사용
87
+ - `--from-ref`: ref 기준 diff 사용
88
+ - `-x, --exclude`: 제외 패턴(반복 가능)
89
+ - `-s, --max-diff-size`: diff 최대 바이트
90
+ - `-y, --yes`: 확인 프롬프트 생략
91
+ - `-d, --dry-run`: 실제 커밋 없이 메시지 생성
92
+ - `-j, --json`: JSON 출력
93
+ - `-o, --output`: 메시지를 파일로 저장
94
+ - `-c, --clipboard`: 메시지를 클립보드로 복사
95
+ - `-n, --no-verify`: `git commit --no-verify` 사용
96
+ - `-a, --all`: 커밋 시 `git commit -a` 사용
97
+
98
+ 예시:
99
+
100
+ ```bash
101
+ # 메시지만 생성
102
+ uv run acw generate --dry-run
103
+
104
+ # 후보 3개 생성
105
+ uv run acw generate --generate 3
106
+
107
+ # 특정 브랜치 기준 diff
108
+ uv run acw generate --from-ref origin/main --dry-run
109
+
110
+ # stash 기준 diff
111
+ uv run acw generate --from-stash stash@{0} --dry-run
112
+
113
+ # JSON 출력
114
+ uv run acw generate --json --dry-run
115
+ ```
116
+
117
+ ### `acw config`
118
+
119
+ 설정 마법사 실행 또는 설정 삭제
120
+
121
+ ```bash
122
+ uv run acw config
123
+ uv run acw config --delete
124
+ ```
125
+
126
+ ### `acw prompt`
127
+
128
+ 프롬프트 템플릿 조회/관리
129
+
130
+ ```bash
131
+ uv run acw prompt --list
132
+ uv run acw prompt --name conventional --show
133
+ uv run acw prompt --name team --set "팀 규칙을 반영해 작성"
134
+ uv run acw prompt --name team --file ./prompt.md
135
+ uv run acw prompt --sync
136
+ ```
137
+
138
+ ### `acw doctor`
139
+
140
+ 로컬 provider(`ollama`, `lmstudio`) 연결 및 모델 가용성 점검
141
+
142
+ ```bash
143
+ uv run acw doctor --provider ollama
144
+ uv run acw doctor --provider lmstudio --timeout 60
145
+ ```
146
+
147
+ ## 설정 위치
148
+
149
+ 기본 설정 디렉터리:
150
+
151
+ - `~/.config/acw`
152
+
153
+ 환경변수로 변경 가능:
154
+
155
+ - `ACW_CONFIG_DIR`
156
+
157
+ 생성되는 주요 파일/디렉터리:
158
+
159
+ - `config.toml`
160
+ - `prompts/*.md`
161
+ - `profiles/*.toml`
162
+
163
+ ## 환경 변수
164
+
165
+ 기본 API 키 환경 변수 매핑:
166
+
167
+ - `OPENAI_API_KEY`
168
+ - `ANTHROPIC_API_KEY`
169
+ - `GEMINI_API_KEY`
170
+ - `OPENROUTER_API_KEY`
171
+ - `XAI_API_KEY`
172
+ - `GROQ_API_KEY`
173
+ - `DEEPSEEK_API_KEY`
174
+ - `COHERE_API_KEY`
175
+
176
+ ## 프로젝트 구조
177
+
178
+ ```text
179
+ acw/
180
+ ├── src/acw/
181
+ │ ├── __init__.py
182
+ │ ├── cli/
183
+ │ │ ├── __init__.py # CLI 진입점(main) 및 의존성 조립
184
+ │ │ ├── parser.py # argparse 파서/옵션 정의
185
+ │ │ ├── dispatch.py # 명령 디스패치
186
+ │ │ ├── commands.py # config/prompt/doctor 핸들러
187
+ │ │ ├── generate.py # generate 명령 오케스트레이션
188
+ │ │ └── helpers.py # git/clipboard/progress/interactive 보조 함수
189
+ │ ├── config/
190
+ │ │ ├── __init__.py
191
+ │ │ ├── shared.py # 공통 상수/타입/에러
192
+ │ │ ├── layout.py # 설정 파일 로드/저장, 디렉터리 관리
193
+ │ │ ├── resolver.py # 실행 시 최종 설정 해석
194
+ │ │ └── prompts.py # 프롬프트 파일 해석/병합
195
+ │ ├── diff_collector.py # diff 수집 및 exclude 필터링
196
+ │ ├── generate_input.py # 생성 입력 정규화
197
+ │ ├── generator.py # litellm 호출 및 후보 생성
198
+ │ ├── onboarding.py # 대화형 설정 마법사
199
+ │ ├── doctor.py # 로컬 provider 진단
200
+ │ ├── prompt_catalog.py # 내장 프롬프트 템플릿/카탈로그
201
+ │ └── models.py # provider별 추천 모델 enum
202
+ ├── tests/
203
+ │ ├── test_cli.py
204
+ │ ├── test_config.py
205
+ │ ├── test_diff_collector.py
206
+ │ ├── test_doctor.py
207
+ │ ├── test_generate_input.py
208
+ │ ├── test_generator.py
209
+ │ └── test_onboarding.py
210
+ ├── pyproject.toml
211
+ └── README.md
212
+ ```
213
+
214
+ ## 개발
215
+
216
+ 테스트:
217
+
218
+ ```bash
219
+ uv run pytest
220
+ ```
221
+
222
+ 타입 체크:
223
+
224
+ ```bash
225
+ uv run pyright
226
+ ```
227
+
228
+ ## 라이선스
229
+
230
+ - MIT ([LICENSE](./LICENSE))
acw-0.1.0/README.md ADDED
@@ -0,0 +1,215 @@
1
+ # ACW (Auto Commit Wizard)
2
+
3
+ AI를 활용해 Git 커밋 메시지를 생성하는 CLI 도구입니다.
4
+
5
+ `litellm` 기반으로 OpenAI, Anthropic, Google Gemini, Ollama, LM Studio 등 다양한 provider를 사용할 수 있습니다.
6
+
7
+ ## 주요 기능
8
+
9
+ - 설정 마법사(`acw config`)로 provider/model/API 키 환경변수/기본 옵션 설정
10
+ - `staged diff`(기본), `stash`, `ref` 기준 커밋 메시지 생성
11
+ - 프롬프트 템플릿 관리(`acw prompt`) 및 포맷별 기본 프롬프트 제공
12
+ - 로컬 LLM 서버 연결 진단(`acw doctor`)
13
+ - 후보 여러 개 생성 후 선택, JSON 출력, 파일 저장, 클립보드 복사 지원
14
+
15
+ ## 요구 사항
16
+
17
+ - Python 3.11+
18
+ - Git
19
+ - [uv](https://github.com/astral-sh/uv) 권장
20
+
21
+ ## 설치
22
+
23
+ PyPI 배포 버전을 `uv`로 설치:
24
+
25
+ ```bash
26
+ uv tool install acw
27
+ ```
28
+
29
+ 개발용(소스에서 실행):
30
+
31
+ ```bash
32
+ git clone https://github.com/auto-commit-wizard/acw.git
33
+ cd acw
34
+ uv sync
35
+ ```
36
+
37
+ ## 빠른 시작
38
+
39
+ 처음에는 설정 마법사를 실행하세요.
40
+
41
+ ```bash
42
+ acw config
43
+ ```
44
+
45
+ 가장 기본적인 실행은 다음과 같습니다.
46
+
47
+ ```bash
48
+ acw generate
49
+ ```
50
+
51
+ 참고:
52
+
53
+ - `acw`에 서브커맨드를 생략하면 내부적으로 `generate`로 동작합니다.
54
+ - 기본 생성 대상은 `staged` 변경사항입니다. (`git add`가 먼저 필요)
55
+
56
+ ## 명령어
57
+
58
+ ### `acw generate`
59
+
60
+ Git diff를 수집해 커밋 메시지를 생성합니다.
61
+
62
+ - `-p, --provider`: provider 지정
63
+ - `-m, --model`: 모델명 지정
64
+ - `-P, --profile`: profile 지정
65
+ - `-t, --prompt`: 프롬프트 이름 지정
66
+ - `-F, --prompt-file`: 프롬프트 파일 경로 지정
67
+ - `--print-prompt`: 최종 프롬프트 출력
68
+ - `-l, --language {ko,en}`: 출력 언어
69
+ - `-f, --format {plain,conventional,gitmoji}`: 메시지 포맷
70
+ - `-g, --generate`: 후보 개수
71
+ - `--from-stash`: stash 기준 diff 사용
72
+ - `--from-ref`: ref 기준 diff 사용
73
+ - `-x, --exclude`: 제외 패턴(반복 가능)
74
+ - `-s, --max-diff-size`: diff 최대 바이트
75
+ - `-y, --yes`: 확인 프롬프트 생략
76
+ - `-d, --dry-run`: 실제 커밋 없이 메시지 생성
77
+ - `-j, --json`: JSON 출력
78
+ - `-o, --output`: 메시지를 파일로 저장
79
+ - `-c, --clipboard`: 메시지를 클립보드로 복사
80
+ - `-n, --no-verify`: `git commit --no-verify` 사용
81
+ - `-a, --all`: 커밋 시 `git commit -a` 사용
82
+
83
+ 예시:
84
+
85
+ ```bash
86
+ # 메시지만 생성
87
+ uv run acw generate --dry-run
88
+
89
+ # 후보 3개 생성
90
+ uv run acw generate --generate 3
91
+
92
+ # 특정 브랜치 기준 diff
93
+ uv run acw generate --from-ref origin/main --dry-run
94
+
95
+ # stash 기준 diff
96
+ uv run acw generate --from-stash stash@{0} --dry-run
97
+
98
+ # JSON 출력
99
+ uv run acw generate --json --dry-run
100
+ ```
101
+
102
+ ### `acw config`
103
+
104
+ 설정 마법사 실행 또는 설정 삭제
105
+
106
+ ```bash
107
+ uv run acw config
108
+ uv run acw config --delete
109
+ ```
110
+
111
+ ### `acw prompt`
112
+
113
+ 프롬프트 템플릿 조회/관리
114
+
115
+ ```bash
116
+ uv run acw prompt --list
117
+ uv run acw prompt --name conventional --show
118
+ uv run acw prompt --name team --set "팀 규칙을 반영해 작성"
119
+ uv run acw prompt --name team --file ./prompt.md
120
+ uv run acw prompt --sync
121
+ ```
122
+
123
+ ### `acw doctor`
124
+
125
+ 로컬 provider(`ollama`, `lmstudio`) 연결 및 모델 가용성 점검
126
+
127
+ ```bash
128
+ uv run acw doctor --provider ollama
129
+ uv run acw doctor --provider lmstudio --timeout 60
130
+ ```
131
+
132
+ ## 설정 위치
133
+
134
+ 기본 설정 디렉터리:
135
+
136
+ - `~/.config/acw`
137
+
138
+ 환경변수로 변경 가능:
139
+
140
+ - `ACW_CONFIG_DIR`
141
+
142
+ 생성되는 주요 파일/디렉터리:
143
+
144
+ - `config.toml`
145
+ - `prompts/*.md`
146
+ - `profiles/*.toml`
147
+
148
+ ## 환경 변수
149
+
150
+ 기본 API 키 환경 변수 매핑:
151
+
152
+ - `OPENAI_API_KEY`
153
+ - `ANTHROPIC_API_KEY`
154
+ - `GEMINI_API_KEY`
155
+ - `OPENROUTER_API_KEY`
156
+ - `XAI_API_KEY`
157
+ - `GROQ_API_KEY`
158
+ - `DEEPSEEK_API_KEY`
159
+ - `COHERE_API_KEY`
160
+
161
+ ## 프로젝트 구조
162
+
163
+ ```text
164
+ acw/
165
+ ├── src/acw/
166
+ │ ├── __init__.py
167
+ │ ├── cli/
168
+ │ │ ├── __init__.py # CLI 진입점(main) 및 의존성 조립
169
+ │ │ ├── parser.py # argparse 파서/옵션 정의
170
+ │ │ ├── dispatch.py # 명령 디스패치
171
+ │ │ ├── commands.py # config/prompt/doctor 핸들러
172
+ │ │ ├── generate.py # generate 명령 오케스트레이션
173
+ │ │ └── helpers.py # git/clipboard/progress/interactive 보조 함수
174
+ │ ├── config/
175
+ │ │ ├── __init__.py
176
+ │ │ ├── shared.py # 공통 상수/타입/에러
177
+ │ │ ├── layout.py # 설정 파일 로드/저장, 디렉터리 관리
178
+ │ │ ├── resolver.py # 실행 시 최종 설정 해석
179
+ │ │ └── prompts.py # 프롬프트 파일 해석/병합
180
+ │ ├── diff_collector.py # diff 수집 및 exclude 필터링
181
+ │ ├── generate_input.py # 생성 입력 정규화
182
+ │ ├── generator.py # litellm 호출 및 후보 생성
183
+ │ ├── onboarding.py # 대화형 설정 마법사
184
+ │ ├── doctor.py # 로컬 provider 진단
185
+ │ ├── prompt_catalog.py # 내장 프롬프트 템플릿/카탈로그
186
+ │ └── models.py # provider별 추천 모델 enum
187
+ ├── tests/
188
+ │ ├── test_cli.py
189
+ │ ├── test_config.py
190
+ │ ├── test_diff_collector.py
191
+ │ ├── test_doctor.py
192
+ │ ├── test_generate_input.py
193
+ │ ├── test_generator.py
194
+ │ └── test_onboarding.py
195
+ ├── pyproject.toml
196
+ └── README.md
197
+ ```
198
+
199
+ ## 개발
200
+
201
+ 테스트:
202
+
203
+ ```bash
204
+ uv run pytest
205
+ ```
206
+
207
+ 타입 체크:
208
+
209
+ ```bash
210
+ uv run pyright
211
+ ```
212
+
213
+ ## 라이선스
214
+
215
+ - MIT ([LICENSE](./LICENSE))
@@ -0,0 +1,34 @@
1
+ [project]
2
+ name = "acw"
3
+ version = "0.1.0"
4
+ description = "The CLI tool for generating AI commit messages from git changes"
5
+ readme = "README.md"
6
+ authors = [
7
+ { name = "bossm0n5t3r", email = "bossm0n5t3r@gmail.com" }
8
+ ]
9
+ license = "MIT"
10
+ requires-python = ">=3.11"
11
+ license-files = ["LICENSE"]
12
+ dependencies = [
13
+ "httpx>=0.28.1",
14
+ "litellm>=1.82.6",
15
+ "questionary>=2.1.1",
16
+ "rich==14.3.3",
17
+ ]
18
+
19
+ [project.scripts]
20
+ acw = "acw:main"
21
+
22
+ [dependency-groups]
23
+ dev = [
24
+ "pytest>=9.0.2",
25
+ "pyright>=1.1.408",
26
+ "respx>=0.22.0",
27
+ ]
28
+
29
+ [tool.pytest.ini_options]
30
+ pythonpath = ["src"]
31
+
32
+ [build-system]
33
+ requires = ["uv_build>=0.11.2,<0.12.0"]
34
+ build-backend = "uv_build"
@@ -0,0 +1,3 @@
1
+ from acw.cli import main
2
+
3
+ __all__ = ["main"]