lgit-cli 3.7.0__py3-none-any.whl → 4.0.0__py3-none-any.whl
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.
- lgit/__init__.py +2 -2
- lgit/api.py +3 -3
- lgit/config.py +1 -1
- lgit/git.py +20 -12
- lgit/map_reduce.py +1 -1
- lgit/models.py +20 -24
- lgit/tokens.py +1 -1
- {lgit_cli-3.7.0.dist-info → lgit_cli-4.0.0.dist-info}/METADATA +6 -6
- {lgit_cli-3.7.0.dist-info → lgit_cli-4.0.0.dist-info}/RECORD +12 -12
- {lgit_cli-3.7.0.dist-info → lgit_cli-4.0.0.dist-info}/WHEEL +0 -0
- {lgit_cli-3.7.0.dist-info → lgit_cli-4.0.0.dist-info}/entry_points.txt +0 -0
- {lgit_cli-3.7.0.dist-info → lgit_cli-4.0.0.dist-info}/licenses/LICENSE +0 -0
lgit/__init__.py
CHANGED
|
@@ -6,9 +6,9 @@ from importlib import metadata
|
|
|
6
6
|
from typing import TYPE_CHECKING, Any
|
|
7
7
|
|
|
8
8
|
try:
|
|
9
|
-
__version__ = metadata.version("
|
|
9
|
+
__version__ = metadata.version("lgit-cli")
|
|
10
10
|
except metadata.PackageNotFoundError:
|
|
11
|
-
__version__ = "
|
|
11
|
+
__version__ = "4.0.0"
|
|
12
12
|
|
|
13
13
|
_CORE_MODEL_EXPORTS = (
|
|
14
14
|
"Mode",
|
lgit/api.py
CHANGED
|
@@ -148,7 +148,7 @@ async def run_oneshot(
|
|
|
148
148
|
built = replace(
|
|
149
149
|
built,
|
|
150
150
|
model=resolve_model_name(
|
|
151
|
-
str(getattr(config, "analysis_model", getattr(config, "model", "claude-opus-4.
|
|
151
|
+
str(getattr(config, "analysis_model", getattr(config, "model", "claude-opus-4.8")))
|
|
152
152
|
),
|
|
153
153
|
)
|
|
154
154
|
response = await _run_oneshot_response(config, built, markdown_output=markdown_output)
|
|
@@ -193,7 +193,7 @@ async def generate_conventional_analysis(
|
|
|
193
193
|
type_enum = list(getattr(config, "types", {}) or {"chore": None})
|
|
194
194
|
spec = OneShotSpec(
|
|
195
195
|
operation="analysis",
|
|
196
|
-
model=resolve_model_name(str(getattr(config, "analysis_model", getattr(config, "model", "claude-opus-4.
|
|
196
|
+
model=resolve_model_name(str(getattr(config, "analysis_model", getattr(config, "model", "claude-opus-4.8")))),
|
|
197
197
|
prompt_family="analysis",
|
|
198
198
|
prompt_variant=variant,
|
|
199
199
|
system_prompt=system_prompt,
|
|
@@ -365,7 +365,7 @@ async def generate_fast_commit(
|
|
|
365
365
|
type_enum = list(getattr(config, "types", {}) or {"chore": None})
|
|
366
366
|
spec = OneShotSpec(
|
|
367
367
|
operation="fast",
|
|
368
|
-
model=resolve_model_name(str(getattr(config, "analysis_model", getattr(config, "model", "claude-opus-4.
|
|
368
|
+
model=resolve_model_name(str(getattr(config, "analysis_model", getattr(config, "model", "claude-opus-4.8")))),
|
|
369
369
|
prompt_family="fast",
|
|
370
370
|
prompt_variant=variant,
|
|
371
371
|
system_prompt=system_prompt,
|
lgit/config.py
CHANGED
|
@@ -23,7 +23,7 @@ from .models import (
|
|
|
23
23
|
)
|
|
24
24
|
|
|
25
25
|
DEFAULT_API_BASE_URL = "http://localhost:4000"
|
|
26
|
-
DEFAULT_ANALYSIS_MODEL = "claude-opus-4.
|
|
26
|
+
DEFAULT_ANALYSIS_MODEL = "claude-opus-4.8"
|
|
27
27
|
DEFAULT_SUMMARY_MODEL = "claude-haiku-4-5"
|
|
28
28
|
DEFAULT_CONFIG_SUBPATH = Path(".config/llm-git/config.toml")
|
|
29
29
|
|
lgit/git.py
CHANGED
|
@@ -125,22 +125,30 @@ def _run_git_process(
|
|
|
125
125
|
disable_background_features: bool | None,
|
|
126
126
|
) -> tuple[tuple[str, ...], subprocess.CompletedProcess]:
|
|
127
127
|
argv = _git_argv(args)
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
128
|
+
# Always feed stdin as raw bytes. A text-mode pipe rewrites "\n" -> os.linesep
|
|
129
|
+
# on Windows, which corrupts patches piped to `git apply` (CRLF context no
|
|
130
|
+
# longer matches the LF index blob) and appends stray CR to commit messages
|
|
131
|
+
# and stdin-paths. Encoding here keeps the bytes byte-exact on every platform.
|
|
132
|
+
stdin_bytes = input_data.encode("utf-8") if isinstance(input_data, str) else input_data
|
|
133
|
+
completed = subprocess.run(
|
|
134
|
+
argv,
|
|
135
|
+
cwd=os.fspath(cwd),
|
|
136
|
+
input=stdin_bytes,
|
|
137
|
+
stdout=subprocess.PIPE,
|
|
138
|
+
stderr=subprocess.PIPE,
|
|
139
|
+
env=git_command_env(
|
|
134
140
|
env,
|
|
135
141
|
index_file=index_file,
|
|
136
142
|
disable_background_features=disable_background_features,
|
|
137
143
|
),
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
if text:
|
|
142
|
-
|
|
143
|
-
|
|
144
|
+
shell=False,
|
|
145
|
+
check=False,
|
|
146
|
+
)
|
|
147
|
+
if not text:
|
|
148
|
+
return argv, completed
|
|
149
|
+
stdout = completed.stdout.decode("utf-8", errors="replace").replace("\r\n", "\n")
|
|
150
|
+
stderr = completed.stderr.decode("utf-8", errors="replace").replace("\r\n", "\n")
|
|
151
|
+
return argv, subprocess.CompletedProcess(completed.args, completed.returncode, stdout, stderr)
|
|
144
152
|
|
|
145
153
|
|
|
146
154
|
def _raise_git_error(
|
lgit/map_reduce.py
CHANGED
|
@@ -153,7 +153,7 @@ async def run_map_reduce(*args: Any, **kwargs: Any) -> ConventionalAnalysis:
|
|
|
153
153
|
|
|
154
154
|
counter = counter or create_token_counter(config)
|
|
155
155
|
reduce_model = resolve_model_name(
|
|
156
|
-
str(model_name or getattr(config, "analysis_model", getattr(config, "model", "claude-opus-4.
|
|
156
|
+
str(model_name or getattr(config, "analysis_model", getattr(config, "model", "claude-opus-4.8")))
|
|
157
157
|
)
|
|
158
158
|
map_model = resolve_model_name(str(getattr(config, "summary_model", getattr(config, "model", reduce_model))))
|
|
159
159
|
observations = await observe_diff_files(str(diff), map_model, config, counter)
|
lgit/models.py
CHANGED
|
@@ -80,37 +80,33 @@ class ResolvedApiMode(StrEnum):
|
|
|
80
80
|
|
|
81
81
|
|
|
82
82
|
_MODEL_ALIASES = {
|
|
83
|
-
"sonnet": "claude-sonnet-4.
|
|
84
|
-
"s": "claude-sonnet-4.
|
|
85
|
-
"
|
|
86
|
-
"
|
|
87
|
-
"
|
|
83
|
+
"sonnet": "claude-sonnet-4.6",
|
|
84
|
+
"s": "claude-sonnet-4.6",
|
|
85
|
+
"sonnet-4.6": "claude-sonnet-4.6",
|
|
86
|
+
"opus": "claude-opus-4.8",
|
|
87
|
+
"o": "claude-opus-4.8",
|
|
88
|
+
"o4.8": "claude-opus-4.8",
|
|
88
89
|
"haiku": "claude-haiku-4-5",
|
|
89
90
|
"h": "claude-haiku-4-5",
|
|
90
|
-
"
|
|
91
|
-
"
|
|
92
|
-
"3.7": "claude-3.7-sonnet",
|
|
93
|
-
"sonnet-3.7": "claude-3.7-sonnet",
|
|
94
|
-
"gpt5": "gpt-5",
|
|
95
|
-
"g5": "gpt-5",
|
|
91
|
+
"gpt5": "gpt-5.5",
|
|
92
|
+
"g5": "gpt-5.5",
|
|
96
93
|
"gpt5-pro": "gpt-5-pro",
|
|
97
|
-
"gpt5-mini": "gpt-5-mini",
|
|
98
|
-
"gpt5-codex": "gpt-5-codex",
|
|
99
|
-
"
|
|
100
|
-
"
|
|
101
|
-
"
|
|
102
|
-
"
|
|
103
|
-
"
|
|
104
|
-
"
|
|
105
|
-
"
|
|
106
|
-
"g2.5": "gemini-2.5-pro",
|
|
107
|
-
"flash": "gemini-2.5-flash",
|
|
108
|
-
"g2.5-flash": "gemini-2.5-flash",
|
|
109
|
-
"flash-lite": "gemini-2.5-flash-lite",
|
|
94
|
+
"gpt5-mini": "gpt-5.4-mini",
|
|
95
|
+
"gpt5-codex": "gpt-5.3-codex",
|
|
96
|
+
"spark": "gpt-5.3-codex-spark",
|
|
97
|
+
"gemini": "gemini-3.5-flash",
|
|
98
|
+
"g3.5": "gemini-3.5-flash",
|
|
99
|
+
"flash": "gemini-3.5-flash",
|
|
100
|
+
"g3.5-flash": "gemini-3.5-flash",
|
|
101
|
+
"lite": "gemini-3.1-flash-lite",
|
|
102
|
+
"flash-lite": "gemini-3.1-flash-lite",
|
|
110
103
|
"qwen": "qwen-3-coder-480b",
|
|
111
104
|
"q480b": "qwen-3-coder-480b",
|
|
105
|
+
"glm": "glm-4.7",
|
|
106
|
+
"glm4.7": "glm-4.7",
|
|
112
107
|
"glm4.6": "glm-4.6",
|
|
113
108
|
"glm4.5": "glm-4.5",
|
|
109
|
+
"glm-flash": "glm-4.7-flash",
|
|
114
110
|
"glm-air": "glm-4.5-air",
|
|
115
111
|
}
|
|
116
112
|
|
lgit/tokens.py
CHANGED
|
@@ -62,7 +62,7 @@ def create_token_counter(config: object) -> TokenCounter:
|
|
|
62
62
|
return TokenCounter(
|
|
63
63
|
api_base_url=str(getattr(config, "api_base_url", "http://localhost:4000")),
|
|
64
64
|
api_key=getattr(config, "api_key", None),
|
|
65
|
-
model=str(getattr(config, "analysis_model", getattr(config, "model", "claude-opus-4.
|
|
65
|
+
model=str(getattr(config, "analysis_model", getattr(config, "model", "claude-opus-4.8"))),
|
|
66
66
|
timeout=float(getattr(config, "connect_timeout_secs", 10) or 10),
|
|
67
67
|
)
|
|
68
68
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: lgit-cli
|
|
3
|
-
Version:
|
|
3
|
+
Version: 4.0.0
|
|
4
4
|
Summary: AI-powered git commit message generator using Claude and other LLMs via OpenAI-compatible APIs
|
|
5
5
|
Project-URL: Homepage, https://github.com/can1357/llm-git
|
|
6
6
|
Project-URL: Repository, https://github.com/can1357/llm-git
|
|
@@ -32,7 +32,7 @@ Description-Content-Type: text/markdown
|
|
|
32
32
|
|
|
33
33
|
<p align="center">
|
|
34
34
|
<a href="https://github.com/can1357/llm-git/actions"><img src="https://img.shields.io/github/actions/workflow/status/can1357/llm-git/ci.yml?style=flat&colorA=222222&colorB=3FB950" alt="CI"></a>
|
|
35
|
-
<a href="https://pypi.org/project/
|
|
35
|
+
<a href="https://pypi.org/project/lgit-cli/"><img src="https://img.shields.io/pypi/v/lgit-cli?style=flat&colorA=222222&colorB=3FB950" alt="PyPI"></a>
|
|
36
36
|
<a href="https://github.com/can1357/llm-git/blob/main/LICENSE"><img src="https://img.shields.io/github/license/can1357/llm-git?style=flat&colorA=222222&colorB=58A6FF" alt="License"></a>
|
|
37
37
|
<a href="https://www.python.org"><img src="https://img.shields.io/badge/Python-3.14%2B-3FB950?style=flat&colorA=222222&logo=python&logoColor=white" alt="Python"></a>
|
|
38
38
|
</p>
|
|
@@ -57,7 +57,7 @@ Description-Content-Type: text/markdown
|
|
|
57
57
|
|
|
58
58
|
```bash
|
|
59
59
|
# Install
|
|
60
|
-
uv tool install
|
|
60
|
+
uv tool install lgit-cli
|
|
61
61
|
|
|
62
62
|
# Configure (pick one)
|
|
63
63
|
export LLM_GIT_API_KEY=your_anthropic_key # Direct Anthropic
|
|
@@ -264,9 +264,9 @@ default = true
|
|
|
264
264
|
### From PyPI
|
|
265
265
|
|
|
266
266
|
```bash
|
|
267
|
-
uv tool install
|
|
268
|
-
pipx install
|
|
269
|
-
pip install
|
|
267
|
+
uv tool install lgit-cli # recommended
|
|
268
|
+
pipx install lgit-cli # or
|
|
269
|
+
pip install lgit-cli
|
|
270
270
|
```
|
|
271
271
|
|
|
272
272
|
### From source
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
lgit/__init__.py,sha256=
|
|
1
|
+
lgit/__init__.py,sha256=r48CQ3GOxeFWuRfNxjDF5b7Bar3-oqX0gYzh_nQ26Lw,1767
|
|
2
2
|
lgit/__main__.py,sha256=VbaRO8-0ehWv7zA27BpyHYWTQVvt5M-aG5HnWr7ws0U,165
|
|
3
3
|
lgit/analysis.py,sha256=O-y9F9KTd2mjdYMEGShKS3Gjcm-KHC465FBnYyQsSlo,11115
|
|
4
|
-
lgit/api.py,sha256=
|
|
4
|
+
lgit/api.py,sha256=etFaIZ-45XZ5jeHmiHLW87uFJ4tBCK0ENuZ3Q5hEmYg,42899
|
|
5
5
|
lgit/cache.py,sha256=nSmQPVCYx1IJjSHeK6N7RrSvOHrTLHHOBrqvr3cLcxg,11064
|
|
6
6
|
lgit/changelog.py,sha256=prnmXTzmk1UF92OYPdRXxswKVU0Ppc8DyhZDXlAWeZg,18573
|
|
7
7
|
lgit/cli.py,sha256=zuKuKKRz3zSm9jg-FGBbspb9R_p8e7VUmgcDcDyPG5A,45309
|
|
8
8
|
lgit/compose.py,sha256=AI5Q5hRR95kiszUUK5rvfHg-J4rZS7mygpWJbNChQWE,82560
|
|
9
|
-
lgit/config.py,sha256=
|
|
9
|
+
lgit/config.py,sha256=vNY9z1ShooQiQ--tJiUEyTwHe2K1_piRSpIhDk8KhBY,14259
|
|
10
10
|
lgit/diffing.py,sha256=rak6qhGPZvs5tTitav4O6FmTEDdT2Coxp2hWC_OIK94,12882
|
|
11
11
|
lgit/errors.py,sha256=KJXkXDfy0Qy3RfqoeMrvnolIokhGnv6fVVGXByz7fFg,3266
|
|
12
|
-
lgit/git.py,sha256=
|
|
13
|
-
lgit/map_reduce.py,sha256=
|
|
12
|
+
lgit/git.py,sha256=xIqrva1gVxiwSpAbN6IjUIxStYN7ZVn-XZLFHdbSEmc,30037
|
|
13
|
+
lgit/map_reduce.py,sha256=Upz2hVBizZV8RcHC6aKuUEBzDg3dGSqcgCE2gJ3GJfQ,19862
|
|
14
14
|
lgit/markdown_output.py,sha256=4VW_omDZDtOLuKOqcV2XWqzt_xRYSQmBymxnx63cULI,26340
|
|
15
|
-
lgit/models.py,sha256=
|
|
15
|
+
lgit/models.py,sha256=VRcAqto5byS57Qm6v6wXbauS6IXIK4r1UgzAwxXZnlQ,29804
|
|
16
16
|
lgit/normalization.py,sha256=ki17fHAlQI24gB4LwcxeBxxWx7mMAOrz4--0TPhQN3o,11869
|
|
17
17
|
lgit/patch.py,sha256=N9zXWgb9CXa9irssZKCf1bJkGO38nskRvdHFKNoX-Bs,29506
|
|
18
18
|
lgit/profile.py,sha256=QAR5jEuS6za6iNjDapRcSjlSuREZDlYAB1gpPQOq1G0,12977
|
|
@@ -21,7 +21,7 @@ lgit/repo.py,sha256=EFV-_8O5g19v5Q3W9BkaGebddri3qSxwbl2MwqWO9Sk,8924
|
|
|
21
21
|
lgit/rewrite.py,sha256=9MMJlDzLMrRtLXbLSd_JhM3lHwYsWxhHfzcWcsWg0Ks,13518
|
|
22
22
|
lgit/style.py,sha256=IY7B6nfxuX85mIfnOVs4vGYzItRuoKH2lXC_4AdEvT8,7502
|
|
23
23
|
lgit/templates.py,sha256=Qd4rMEtTnAFuoU_um-HltmFiUTATySQ8Dj4zcLzkTyQ,12930
|
|
24
|
-
lgit/tokens.py,sha256=
|
|
24
|
+
lgit/tokens.py,sha256=BbAhjIUtCXVBStPXzq4ZeuZa8H5r9ZqZJUnA1XHD_MI,3123
|
|
25
25
|
lgit/validation.py,sha256=v0eV5YltBDM0aBDiqaCvdfbw3d1GALdMuDbHQ2GCNDE,18719
|
|
26
26
|
lgit/resources/__init__.py,sha256=w6eXZjQeAp_h24IJu_GhNIZelcSMuM3qk8GOmWLQPaQ,53
|
|
27
27
|
lgit/resources/commit_types.json,sha256=IPtUig1U8UAIFnfMVaszQFI_LOZIiaZ2yyE20J1FG1E,11900
|
|
@@ -47,8 +47,8 @@ lgit/testing/compare.py,sha256=jRY98uLclVPyQ7e1TMqFVz2cjUi6kwwn2dkQyR_xsgY,1834
|
|
|
47
47
|
lgit/testing/fixture.py,sha256=Hl8kTPuNg_I5PMTef0SvLBa4TnAAlB7v8JUYQIb9ggo,13544
|
|
48
48
|
lgit/testing/report.py,sha256=wb7YnP_lsYwsg5OIFtsIC1bMHtK42Mttul_zQcwRNpk,9036
|
|
49
49
|
lgit/testing/runner.py,sha256=yczDXUHYsN2KyTJtIQeiDuYGgQZZfHn6QT70gpsxvEg,9321
|
|
50
|
-
lgit_cli-
|
|
51
|
-
lgit_cli-
|
|
52
|
-
lgit_cli-
|
|
53
|
-
lgit_cli-
|
|
54
|
-
lgit_cli-
|
|
50
|
+
lgit_cli-4.0.0.dist-info/METADATA,sha256=cpcGMflRUrGcvkA5_HnYRtc4imOQ40gGDdoxPiu8Z_o,9621
|
|
51
|
+
lgit_cli-4.0.0.dist-info/WHEEL,sha256=mffPy8wBnZQn2VnJUU5jE99KsxaSfiyMHV9Yt0aLVxs,87
|
|
52
|
+
lgit_cli-4.0.0.dist-info/entry_points.txt,sha256=CUSsokc0V3oVHQ2Z1ocL09wV7Krhm0SSfLZpnRMBdA0,39
|
|
53
|
+
lgit_cli-4.0.0.dist-info/licenses/LICENSE,sha256=6dqVzjngLuIcUMd4wWLXPLpv-Pi8gySZAEE3hSN5iKw,1076
|
|
54
|
+
lgit_cli-4.0.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|