git-commit-message 0.9.1__tar.gz → 0.9.2__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.
- {git_commit_message-0.9.1 → git_commit_message-0.9.2}/PKG-INFO +35 -35
- {git_commit_message-0.9.1 → git_commit_message-0.9.2}/README.md +1 -1
- {git_commit_message-0.9.1 → git_commit_message-0.9.2}/pyproject.toml +7 -11
- {git_commit_message-0.9.1 → git_commit_message-0.9.2}/src/git_commit_message/_cli.py +3 -0
- git_commit_message-0.9.1/setup.cfg +0 -4
- git_commit_message-0.9.1/src/git_commit_message.egg-info/PKG-INFO +0 -329
- git_commit_message-0.9.1/src/git_commit_message.egg-info/SOURCES.txt +0 -19
- git_commit_message-0.9.1/src/git_commit_message.egg-info/dependency_links.txt +0 -1
- git_commit_message-0.9.1/src/git_commit_message.egg-info/entry_points.txt +0 -2
- git_commit_message-0.9.1/src/git_commit_message.egg-info/requires.txt +0 -4
- git_commit_message-0.9.1/src/git_commit_message.egg-info/top_level.txt +0 -1
- {git_commit_message-0.9.1 → git_commit_message-0.9.2}/UNLICENSE +0 -0
- {git_commit_message-0.9.1 → git_commit_message-0.9.2}/src/git_commit_message/__init__.py +0 -0
- {git_commit_message-0.9.1 → git_commit_message-0.9.2}/src/git_commit_message/__main__.py +0 -0
- {git_commit_message-0.9.1 → git_commit_message-0.9.2}/src/git_commit_message/_config.py +0 -0
- {git_commit_message-0.9.1 → git_commit_message-0.9.2}/src/git_commit_message/_gemini.py +0 -0
- {git_commit_message-0.9.1 → git_commit_message-0.9.2}/src/git_commit_message/_git.py +0 -0
- {git_commit_message-0.9.1 → git_commit_message-0.9.2}/src/git_commit_message/_gpt.py +0 -0
- {git_commit_message-0.9.1 → git_commit_message-0.9.2}/src/git_commit_message/_llamacpp.py +0 -0
- {git_commit_message-0.9.1 → git_commit_message-0.9.2}/src/git_commit_message/_llm.py +0 -0
- {git_commit_message-0.9.1 → git_commit_message-0.9.2}/src/git_commit_message/_ollama.py +0 -0
|
@@ -1,36 +1,31 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.3
|
|
2
2
|
Name: git-commit-message
|
|
3
|
-
Version: 0.9.
|
|
3
|
+
Version: 0.9.2
|
|
4
4
|
Summary: Generate Git commit messages from staged changes using LLM
|
|
5
|
-
Maintainer-email: Mina Her <minacle@live.com>
|
|
6
5
|
License: This is free and unencumbered software released into the public domain.
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
Project-URL: Homepage, https://github.com/minacle/git-commit-message
|
|
32
|
-
Project-URL: Repository, https://github.com/minacle/git-commit-message
|
|
33
|
-
Project-URL: Issues, https://github.com/minacle/git-commit-message/issues
|
|
6
|
+
|
|
7
|
+
Anyone is free to copy, modify, publish, use, compile, sell, or
|
|
8
|
+
distribute this software, either in source code form or as a compiled
|
|
9
|
+
binary, for any purpose, commercial or non-commercial, and by any
|
|
10
|
+
means.
|
|
11
|
+
|
|
12
|
+
In jurisdictions that recognize copyright laws, the author or authors
|
|
13
|
+
of this software dedicate any and all copyright interest in the
|
|
14
|
+
software to the public domain. We make this dedication for the benefit
|
|
15
|
+
of the public at large and to the detriment of our heirs and
|
|
16
|
+
successors. We intend this dedication to be an overt act of
|
|
17
|
+
relinquishment in perpetuity of all present and future rights to this
|
|
18
|
+
software under copyright law.
|
|
19
|
+
|
|
20
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
21
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
22
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
23
|
+
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
|
24
|
+
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
|
25
|
+
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
|
26
|
+
OTHER DEALINGS IN THE SOFTWARE.
|
|
27
|
+
|
|
28
|
+
For more information, please refer to <https://unlicense.org/>
|
|
34
29
|
Classifier: Development Status :: 4 - Beta
|
|
35
30
|
Classifier: Environment :: Console
|
|
36
31
|
Classifier: Intended Audience :: Developers
|
|
@@ -42,12 +37,17 @@ Classifier: Programming Language :: Python :: 3 :: Only
|
|
|
42
37
|
Classifier: Programming Language :: Python :: 3.13
|
|
43
38
|
Classifier: Programming Language :: Python :: 3.14
|
|
44
39
|
Classifier: Topic :: Software Development :: Version Control :: Git
|
|
40
|
+
Requires-Dist: babel>=2.18.0
|
|
41
|
+
Requires-Dist: google-genai>=1.73.1
|
|
42
|
+
Requires-Dist: ollama>=0.6.1
|
|
43
|
+
Requires-Dist: openai>=2.32.0
|
|
44
|
+
Maintainer: Mina Her
|
|
45
|
+
Maintainer-email: Mina Her <minacle@live.com>
|
|
45
46
|
Requires-Python: >=3.13
|
|
47
|
+
Project-URL: Homepage, https://github.com/minacle/git-commit-message
|
|
48
|
+
Project-URL: Repository, https://github.com/minacle/git-commit-message
|
|
49
|
+
Project-URL: Issues, https://github.com/minacle/git-commit-message/issues
|
|
46
50
|
Description-Content-Type: text/markdown
|
|
47
|
-
Requires-Dist: babel>=2.17.0
|
|
48
|
-
Requires-Dist: google-genai>=1.56.0
|
|
49
|
-
Requires-Dist: ollama>=0.4.0
|
|
50
|
-
Requires-Dist: openai>=2.6.1
|
|
51
51
|
|
|
52
52
|
# git-commit-message
|
|
53
53
|
|
|
@@ -294,7 +294,7 @@ git-commit-message --provider llamacpp --host http://192.168.1.100:8080
|
|
|
294
294
|
- `--amend`: generate a message suitable for amending the previous commit (diff is from the amended commit's parent to the staged index; if nothing is staged, this effectively becomes the diff introduced by `HEAD`)
|
|
295
295
|
- `--edit`: with `--commit`, open editor for final message
|
|
296
296
|
- `--host URL`: host URL for providers like Ollama or llama.cpp (default: `http://localhost:11434` for Ollama, `http://localhost:8080` for llama.cpp)
|
|
297
|
-
- `--co-author VALUE`: append `Co-authored-by:` trailer(s). Repeat to add multiple values. Accepted forms: `Name <email@example.com>` or `copilot`
|
|
297
|
+
- `--co-author VALUE`: append `Co-authored-by:` trailer(s). Repeat to add multiple values. Accepted forms: `Name <email@example.com>` or an alias keyword (`claude-code`, `codex`, `copilot`, `copilot-cli`; case-insensitive).
|
|
298
298
|
|
|
299
299
|
## Environment variables
|
|
300
300
|
|
|
@@ -243,7 +243,7 @@ git-commit-message --provider llamacpp --host http://192.168.1.100:8080
|
|
|
243
243
|
- `--amend`: generate a message suitable for amending the previous commit (diff is from the amended commit's parent to the staged index; if nothing is staged, this effectively becomes the diff introduced by `HEAD`)
|
|
244
244
|
- `--edit`: with `--commit`, open editor for final message
|
|
245
245
|
- `--host URL`: host URL for providers like Ollama or llama.cpp (default: `http://localhost:11434` for Ollama, `http://localhost:8080` for llama.cpp)
|
|
246
|
-
- `--co-author VALUE`: append `Co-authored-by:` trailer(s). Repeat to add multiple values. Accepted forms: `Name <email@example.com>` or `copilot`
|
|
246
|
+
- `--co-author VALUE`: append `Co-authored-by:` trailer(s). Repeat to add multiple values. Accepted forms: `Name <email@example.com>` or an alias keyword (`claude-code`, `codex`, `copilot`, `copilot-cli`; case-insensitive).
|
|
247
247
|
|
|
248
248
|
## Environment variables
|
|
249
249
|
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "git-commit-message"
|
|
3
|
-
version = "0.9.
|
|
3
|
+
version = "0.9.2"
|
|
4
4
|
description = "Generate Git commit messages from staged changes using LLM"
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
requires-python = ">=3.13"
|
|
7
7
|
dependencies = [
|
|
8
|
-
"babel>=2.
|
|
9
|
-
"google-genai>=1.
|
|
10
|
-
"ollama>=0.
|
|
11
|
-
"openai>=2.
|
|
8
|
+
"babel>=2.18.0",
|
|
9
|
+
"google-genai>=1.73.1",
|
|
10
|
+
"ollama>=0.6.1",
|
|
11
|
+
"openai>=2.32.0",
|
|
12
12
|
]
|
|
13
13
|
maintainers = [{ name = "Mina Her", email = "minacle@live.com" }]
|
|
14
14
|
license = { file = "UNLICENSE" }
|
|
@@ -30,12 +30,8 @@ classifiers = [
|
|
|
30
30
|
git-commit-message = "git_commit_message:main"
|
|
31
31
|
|
|
32
32
|
[build-system]
|
|
33
|
-
requires = ["
|
|
34
|
-
build-backend = "
|
|
35
|
-
|
|
36
|
-
[tool.setuptools]
|
|
37
|
-
package-dir = {"" = "src"}
|
|
38
|
-
packages = ["git_commit_message"]
|
|
33
|
+
requires = ["uv_build>=0.11.3,<0.12.0"]
|
|
34
|
+
build-backend = "uv_build"
|
|
39
35
|
|
|
40
36
|
[project.urls]
|
|
41
37
|
Homepage = "https://github.com/minacle/git-commit-message"
|
|
@@ -84,7 +84,10 @@ _CO_AUTHOR_LINE_RE: Final[Pattern[str]] = re.compile(
|
|
|
84
84
|
r"^\s*([^<>\s\n][^<>\n]*?)\s*<([^<>\s\n]+@[^<>\s\n]+)>\s*$"
|
|
85
85
|
)
|
|
86
86
|
_CO_AUTHOR_ALIASES: Final[dict[str, str]] = {
|
|
87
|
+
"claude-code": "Claude <noreply@anthropic.com>",
|
|
88
|
+
"codex": "Codex <noreply@openai.com>",
|
|
87
89
|
"copilot": "Copilot <copilot@github.com>",
|
|
90
|
+
"copilot-cli": "Copilot <223556219+Copilot@users.noreply.github.com>",
|
|
88
91
|
}
|
|
89
92
|
|
|
90
93
|
|
|
@@ -1,329 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: git-commit-message
|
|
3
|
-
Version: 0.9.1
|
|
4
|
-
Summary: Generate Git commit messages from staged changes using LLM
|
|
5
|
-
Maintainer-email: Mina Her <minacle@live.com>
|
|
6
|
-
License: This is free and unencumbered software released into the public domain.
|
|
7
|
-
|
|
8
|
-
Anyone is free to copy, modify, publish, use, compile, sell, or
|
|
9
|
-
distribute this software, either in source code form or as a compiled
|
|
10
|
-
binary, for any purpose, commercial or non-commercial, and by any
|
|
11
|
-
means.
|
|
12
|
-
|
|
13
|
-
In jurisdictions that recognize copyright laws, the author or authors
|
|
14
|
-
of this software dedicate any and all copyright interest in the
|
|
15
|
-
software to the public domain. We make this dedication for the benefit
|
|
16
|
-
of the public at large and to the detriment of our heirs and
|
|
17
|
-
successors. We intend this dedication to be an overt act of
|
|
18
|
-
relinquishment in perpetuity of all present and future rights to this
|
|
19
|
-
software under copyright law.
|
|
20
|
-
|
|
21
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
22
|
-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
23
|
-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
24
|
-
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
|
25
|
-
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
|
26
|
-
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
|
27
|
-
OTHER DEALINGS IN THE SOFTWARE.
|
|
28
|
-
|
|
29
|
-
For more information, please refer to <https://unlicense.org/>
|
|
30
|
-
|
|
31
|
-
Project-URL: Homepage, https://github.com/minacle/git-commit-message
|
|
32
|
-
Project-URL: Repository, https://github.com/minacle/git-commit-message
|
|
33
|
-
Project-URL: Issues, https://github.com/minacle/git-commit-message/issues
|
|
34
|
-
Classifier: Development Status :: 4 - Beta
|
|
35
|
-
Classifier: Environment :: Console
|
|
36
|
-
Classifier: Intended Audience :: Developers
|
|
37
|
-
Classifier: License :: OSI Approved :: The Unlicense (Unlicense)
|
|
38
|
-
Classifier: Operating System :: OS Independent
|
|
39
|
-
Classifier: Programming Language :: Python
|
|
40
|
-
Classifier: Programming Language :: Python :: 3
|
|
41
|
-
Classifier: Programming Language :: Python :: 3 :: Only
|
|
42
|
-
Classifier: Programming Language :: Python :: 3.13
|
|
43
|
-
Classifier: Programming Language :: Python :: 3.14
|
|
44
|
-
Classifier: Topic :: Software Development :: Version Control :: Git
|
|
45
|
-
Requires-Python: >=3.13
|
|
46
|
-
Description-Content-Type: text/markdown
|
|
47
|
-
Requires-Dist: babel>=2.17.0
|
|
48
|
-
Requires-Dist: google-genai>=1.56.0
|
|
49
|
-
Requires-Dist: ollama>=0.4.0
|
|
50
|
-
Requires-Dist: openai>=2.6.1
|
|
51
|
-
|
|
52
|
-
# git-commit-message
|
|
53
|
-
|
|
54
|
-
Generate a commit message from your staged changes using OpenAI, Google Gemini, Ollama, or llama.cpp.
|
|
55
|
-
|
|
56
|
-
[](https://asciinema.org/a/jk0phFqNnc5vaCiIZEYBwZOyN)
|
|
57
|
-
|
|
58
|
-
## Requirements
|
|
59
|
-
|
|
60
|
-
- Python 3.13+
|
|
61
|
-
- A Git repo with staged changes (`git add ...`) (or use `--amend` even if nothing is staged)
|
|
62
|
-
|
|
63
|
-
## Install
|
|
64
|
-
|
|
65
|
-
Install the latest released version from PyPI:
|
|
66
|
-
|
|
67
|
-
```sh
|
|
68
|
-
# User environment (recommended)
|
|
69
|
-
python -m pip install --user git-commit-message
|
|
70
|
-
|
|
71
|
-
# Or system/virtualenv as appropriate
|
|
72
|
-
python -m pip install git-commit-message
|
|
73
|
-
|
|
74
|
-
# Or with pipx for isolated CLI installs
|
|
75
|
-
pipx install git-commit-message
|
|
76
|
-
|
|
77
|
-
# Upgrade to the newest version
|
|
78
|
-
python -m pip install --upgrade git-commit-message
|
|
79
|
-
```
|
|
80
|
-
|
|
81
|
-
Quick check:
|
|
82
|
-
|
|
83
|
-
```sh
|
|
84
|
-
git-commit-message --help
|
|
85
|
-
```
|
|
86
|
-
|
|
87
|
-
## Setup
|
|
88
|
-
|
|
89
|
-
### OpenAI
|
|
90
|
-
|
|
91
|
-
```sh
|
|
92
|
-
export OPENAI_API_KEY="sk-..."
|
|
93
|
-
```
|
|
94
|
-
|
|
95
|
-
### Google Gemini
|
|
96
|
-
|
|
97
|
-
```sh
|
|
98
|
-
export GOOGLE_API_KEY="..."
|
|
99
|
-
```
|
|
100
|
-
|
|
101
|
-
### Ollama (local models)
|
|
102
|
-
|
|
103
|
-
1. Install Ollama: https://ollama.ai
|
|
104
|
-
2. Start the server:
|
|
105
|
-
|
|
106
|
-
```sh
|
|
107
|
-
ollama serve
|
|
108
|
-
```
|
|
109
|
-
|
|
110
|
-
3. Pull a model:
|
|
111
|
-
|
|
112
|
-
```sh
|
|
113
|
-
ollama pull mistral
|
|
114
|
-
```
|
|
115
|
-
|
|
116
|
-
Optional: set defaults:
|
|
117
|
-
|
|
118
|
-
```sh
|
|
119
|
-
export GIT_COMMIT_MESSAGE_PROVIDER=ollama
|
|
120
|
-
export OLLAMA_MODEL=mistral
|
|
121
|
-
```
|
|
122
|
-
|
|
123
|
-
### llama.cpp (local models)
|
|
124
|
-
|
|
125
|
-
1. Build and run llama.cpp server with your model:
|
|
126
|
-
|
|
127
|
-
```sh
|
|
128
|
-
llama-server -hf ggml-org/gpt-oss-20b-GGUF --host 0.0.0.0 --port 8080
|
|
129
|
-
```
|
|
130
|
-
|
|
131
|
-
2. The server runs on `http://localhost:8080` by default.
|
|
132
|
-
|
|
133
|
-
Optional: set defaults:
|
|
134
|
-
|
|
135
|
-
```sh
|
|
136
|
-
export GIT_COMMIT_MESSAGE_PROVIDER=llamacpp
|
|
137
|
-
export LLAMACPP_HOST=http://localhost:8080
|
|
138
|
-
```
|
|
139
|
-
|
|
140
|
-
Note (fish):
|
|
141
|
-
|
|
142
|
-
```fish
|
|
143
|
-
set -x OPENAI_API_KEY "sk-..."
|
|
144
|
-
```
|
|
145
|
-
|
|
146
|
-
## Install (editable)
|
|
147
|
-
|
|
148
|
-
```sh
|
|
149
|
-
python -m pip install -e .
|
|
150
|
-
```
|
|
151
|
-
|
|
152
|
-
## Usage
|
|
153
|
-
|
|
154
|
-
Generate and print a commit message:
|
|
155
|
-
|
|
156
|
-
```sh
|
|
157
|
-
git add -A
|
|
158
|
-
git-commit-message "optional extra context about the change"
|
|
159
|
-
```
|
|
160
|
-
|
|
161
|
-
Generate a single-line subject only (when no trailers are appended):
|
|
162
|
-
|
|
163
|
-
```sh
|
|
164
|
-
git-commit-message --one-line "optional context"
|
|
165
|
-
|
|
166
|
-
# with trailers, output is subject plus trailer lines
|
|
167
|
-
git-commit-message --one-line --co-author 'John Doe <john.doe@example.com>'
|
|
168
|
-
```
|
|
169
|
-
|
|
170
|
-
Use Conventional Commits constraints for the subject/footer only (body format is preserved):
|
|
171
|
-
|
|
172
|
-
```sh
|
|
173
|
-
git-commit-message --conventional
|
|
174
|
-
|
|
175
|
-
# can be combined with one-line mode
|
|
176
|
-
git-commit-message --conventional --one-line
|
|
177
|
-
|
|
178
|
-
# co-author trailers are appended after any existing footers
|
|
179
|
-
git-commit-message --conventional --co-author copilot
|
|
180
|
-
```
|
|
181
|
-
|
|
182
|
-
Select provider:
|
|
183
|
-
|
|
184
|
-
```sh
|
|
185
|
-
# OpenAI (default)
|
|
186
|
-
git-commit-message --provider openai
|
|
187
|
-
|
|
188
|
-
# Google Gemini (via google-genai)
|
|
189
|
-
git-commit-message --provider google
|
|
190
|
-
|
|
191
|
-
# Ollama
|
|
192
|
-
git-commit-message --provider ollama
|
|
193
|
-
|
|
194
|
-
# llama.cpp
|
|
195
|
-
git-commit-message --provider llamacpp
|
|
196
|
-
```
|
|
197
|
-
|
|
198
|
-
Commit immediately (optionally open editor):
|
|
199
|
-
|
|
200
|
-
```sh
|
|
201
|
-
git-commit-message --commit "refactor parser for speed"
|
|
202
|
-
git-commit-message --commit --edit "refactor parser for speed"
|
|
203
|
-
|
|
204
|
-
# add co-author trailers
|
|
205
|
-
git-commit-message --commit --co-author 'John Doe <john.doe@example.com>'
|
|
206
|
-
git-commit-message --commit --co-author 'John Doe <john.doe@example.com>' --co-author 'Jane Doe <jane.doe@example.com>'
|
|
207
|
-
git-commit-message --commit --co-author copilot
|
|
208
|
-
```
|
|
209
|
-
|
|
210
|
-
Amend the previous commit:
|
|
211
|
-
|
|
212
|
-
```sh
|
|
213
|
-
# print only (useful for pasting into a GUI editor)
|
|
214
|
-
git-commit-message --amend "optional context"
|
|
215
|
-
|
|
216
|
-
# amend immediately
|
|
217
|
-
git-commit-message --commit --amend "optional context"
|
|
218
|
-
|
|
219
|
-
# amend immediately, but open editor for final tweaks
|
|
220
|
-
git-commit-message --commit --amend --edit "optional context"
|
|
221
|
-
```
|
|
222
|
-
|
|
223
|
-
Limit subject length:
|
|
224
|
-
|
|
225
|
-
```sh
|
|
226
|
-
git-commit-message --one-line --max-length 50
|
|
227
|
-
```
|
|
228
|
-
|
|
229
|
-
Chunk/summarise long diffs by token budget:
|
|
230
|
-
|
|
231
|
-
```sh
|
|
232
|
-
# force a single summary pass over the whole diff (default)
|
|
233
|
-
git-commit-message --chunk-tokens 0
|
|
234
|
-
|
|
235
|
-
# chunk the diff into ~4000-token pieces before summarising
|
|
236
|
-
git-commit-message --chunk-tokens 4000
|
|
237
|
-
|
|
238
|
-
# note: for provider 'ollama', values >= 1 are not supported
|
|
239
|
-
# use 0 (single summary pass) or -1 (legacy one-shot)
|
|
240
|
-
git-commit-message --provider ollama --chunk-tokens 0
|
|
241
|
-
|
|
242
|
-
# disable summarisation and use the legacy one-shot prompt
|
|
243
|
-
git-commit-message --chunk-tokens -1
|
|
244
|
-
```
|
|
245
|
-
|
|
246
|
-
Adjust unified diff context lines:
|
|
247
|
-
|
|
248
|
-
```sh
|
|
249
|
-
# use 5 context lines around each change hunk
|
|
250
|
-
git-commit-message --diff-context 5
|
|
251
|
-
|
|
252
|
-
# include only changed lines (no surrounding context)
|
|
253
|
-
git-commit-message --diff-context 0
|
|
254
|
-
```
|
|
255
|
-
|
|
256
|
-
Select output language/locale (IETF language tag):
|
|
257
|
-
|
|
258
|
-
```sh
|
|
259
|
-
git-commit-message --language en-US
|
|
260
|
-
git-commit-message --language ko-KR
|
|
261
|
-
git-commit-message --language ja-JP
|
|
262
|
-
```
|
|
263
|
-
|
|
264
|
-
Print debug info:
|
|
265
|
-
|
|
266
|
-
```sh
|
|
267
|
-
git-commit-message --debug
|
|
268
|
-
```
|
|
269
|
-
|
|
270
|
-
Configure Ollama host (if running on a different machine):
|
|
271
|
-
|
|
272
|
-
```sh
|
|
273
|
-
git-commit-message --provider ollama --host http://192.168.1.100:11434
|
|
274
|
-
```
|
|
275
|
-
|
|
276
|
-
Configure llama.cpp host:
|
|
277
|
-
|
|
278
|
-
```sh
|
|
279
|
-
git-commit-message --provider llamacpp --host http://192.168.1.100:8080
|
|
280
|
-
```
|
|
281
|
-
|
|
282
|
-
## Options
|
|
283
|
-
|
|
284
|
-
- `--provider {openai,google,ollama,llamacpp}`: provider to use (default: `openai`)
|
|
285
|
-
- `--model MODEL`: model override (provider-specific; ignored for llama.cpp)
|
|
286
|
-
- `--language TAG`: output language/locale (default: `en-GB`)
|
|
287
|
-
- `--conventional`: apply Conventional Commits constraints to the subject and footer behavior. The body format is unchanged and still includes the translated `Rationale:` line. Breaking changes are expressed with `!` in the subject line, and `BREAKING CHANGE` footer lines are not generated.
|
|
288
|
-
- `--one-line`: output subject only when no trailers are appended; with `--co-author`, output is a single-line subject plus `Co-authored-by:` trailer lines
|
|
289
|
-
- `--max-length N`: max subject length (default: 72)
|
|
290
|
-
- `--chunk-tokens N`: token budget per diff chunk (`0` = single summary pass, `-1` disables summarisation). For `ollama`, values `>= 1` are not supported.
|
|
291
|
-
- `--diff-context N`: context lines in unified diff (`N >= 0`). If omitted, uses `GIT_COMMIT_MESSAGE_DIFF_CONTEXT` when set; otherwise uses Git default (usually `3`).
|
|
292
|
-
- `--debug`: print request/response details
|
|
293
|
-
- `--commit`: run `git commit -m <message>`
|
|
294
|
-
- `--amend`: generate a message suitable for amending the previous commit (diff is from the amended commit's parent to the staged index; if nothing is staged, this effectively becomes the diff introduced by `HEAD`)
|
|
295
|
-
- `--edit`: with `--commit`, open editor for final message
|
|
296
|
-
- `--host URL`: host URL for providers like Ollama or llama.cpp (default: `http://localhost:11434` for Ollama, `http://localhost:8080` for llama.cpp)
|
|
297
|
-
- `--co-author VALUE`: append `Co-authored-by:` trailer(s). Repeat to add multiple values. Accepted forms: `Name <email@example.com>` or `copilot` (alias, case-insensitive).
|
|
298
|
-
|
|
299
|
-
## Environment variables
|
|
300
|
-
|
|
301
|
-
Required:
|
|
302
|
-
|
|
303
|
-
- `OPENAI_API_KEY`: when provider is `openai`
|
|
304
|
-
- `GOOGLE_API_KEY`: when provider is `google`
|
|
305
|
-
|
|
306
|
-
Optional:
|
|
307
|
-
|
|
308
|
-
- `GIT_COMMIT_MESSAGE_PROVIDER`: default provider (`openai` by default). `--provider` overrides this.
|
|
309
|
-
- `GIT_COMMIT_MESSAGE_MODEL`: model override for any provider. `--model` overrides this.
|
|
310
|
-
- `OPENAI_MODEL`: OpenAI-only model override (used if `--model`/`GIT_COMMIT_MESSAGE_MODEL` are not set)
|
|
311
|
-
- `OLLAMA_MODEL`: Ollama-only model override (used if `--model`/`GIT_COMMIT_MESSAGE_MODEL` are not set)
|
|
312
|
-
- `OLLAMA_HOST`: Ollama server URL (default: `http://localhost:11434`)
|
|
313
|
-
- `LLAMACPP_HOST`: llama.cpp server URL (default: `http://localhost:8080`)
|
|
314
|
-
- `GIT_COMMIT_MESSAGE_LANGUAGE`: default language/locale (default: `en-GB`)
|
|
315
|
-
- `GIT_COMMIT_MESSAGE_CHUNK_TOKENS`: default chunk token budget (default: `0`; for `ollama`, values `>= 1` are not supported)
|
|
316
|
-
- `GIT_COMMIT_MESSAGE_DIFF_CONTEXT`: default unified diff context lines (`0` or greater). If unset, Git default is used (usually `3`).
|
|
317
|
-
|
|
318
|
-
Default models (if not overridden):
|
|
319
|
-
|
|
320
|
-
- OpenAI: `gpt-5-mini`
|
|
321
|
-
- Google: `gemini-2.5-flash`
|
|
322
|
-
- Ollama: `gpt-oss:20b`
|
|
323
|
-
- llama.cpp: uses pre-loaded model (model parameter is ignored)
|
|
324
|
-
|
|
325
|
-
## AI-generated code notice
|
|
326
|
-
|
|
327
|
-
Parts of this project were created with assistance from AI tools (e.g. large language models).
|
|
328
|
-
All AI-assisted contributions were reviewed and adapted by maintainers before inclusion.
|
|
329
|
-
If you need provenance for specific changes, please refer to the Git history and commit messages.
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
README.md
|
|
2
|
-
UNLICENSE
|
|
3
|
-
pyproject.toml
|
|
4
|
-
src/git_commit_message/__init__.py
|
|
5
|
-
src/git_commit_message/__main__.py
|
|
6
|
-
src/git_commit_message/_cli.py
|
|
7
|
-
src/git_commit_message/_config.py
|
|
8
|
-
src/git_commit_message/_gemini.py
|
|
9
|
-
src/git_commit_message/_git.py
|
|
10
|
-
src/git_commit_message/_gpt.py
|
|
11
|
-
src/git_commit_message/_llamacpp.py
|
|
12
|
-
src/git_commit_message/_llm.py
|
|
13
|
-
src/git_commit_message/_ollama.py
|
|
14
|
-
src/git_commit_message.egg-info/PKG-INFO
|
|
15
|
-
src/git_commit_message.egg-info/SOURCES.txt
|
|
16
|
-
src/git_commit_message.egg-info/dependency_links.txt
|
|
17
|
-
src/git_commit_message.egg-info/entry_points.txt
|
|
18
|
-
src/git_commit_message.egg-info/requires.txt
|
|
19
|
-
src/git_commit_message.egg-info/top_level.txt
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
git_commit_message
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|