enhanced-git 1.0.0__tar.gz → 1.0.4__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.
- {enhanced_git-1.0.0 → enhanced_git-1.0.4}/.github/workflows/release.yml +2 -0
- {enhanced_git-1.0.0 → enhanced_git-1.0.4}/PKG-INFO +37 -3
- {enhanced_git-1.0.0 → enhanced_git-1.0.4}/README.md +36 -2
- {enhanced_git-1.0.0 → enhanced_git-1.0.4}/gitai/config.py +17 -6
- {enhanced_git-1.0.0 → enhanced_git-1.0.4}/pyproject.toml +2 -1
- {enhanced_git-1.0.0 → enhanced_git-1.0.4}/.gitai.toml +0 -0
- {enhanced_git-1.0.0 → enhanced_git-1.0.4}/.github/workflows/ci.yml +0 -0
- {enhanced_git-1.0.0 → enhanced_git-1.0.4}/.gitignore +0 -0
- {enhanced_git-1.0.0 → enhanced_git-1.0.4}/.pre-commit-config.yaml +0 -0
- {enhanced_git-1.0.0 → enhanced_git-1.0.4}/CONTRIBUTING.md +0 -0
- {enhanced_git-1.0.0 → enhanced_git-1.0.4}/LICENSE +0 -0
- {enhanced_git-1.0.0 → enhanced_git-1.0.4}/Makefile +0 -0
- {enhanced_git-1.0.0 → enhanced_git-1.0.4}/gitai/__init__.py +0 -0
- {enhanced_git-1.0.0 → enhanced_git-1.0.4}/gitai/changelog.py +0 -0
- {enhanced_git-1.0.0 → enhanced_git-1.0.4}/gitai/cli.py +0 -0
- {enhanced_git-1.0.0 → enhanced_git-1.0.4}/gitai/commit.py +0 -0
- {enhanced_git-1.0.0 → enhanced_git-1.0.4}/gitai/constants.py +0 -0
- {enhanced_git-1.0.0 → enhanced_git-1.0.4}/gitai/diff.py +0 -0
- {enhanced_git-1.0.0 → enhanced_git-1.0.4}/gitai/hook.py +0 -0
- {enhanced_git-1.0.0 → enhanced_git-1.0.4}/gitai/providers/__init__.py +0 -0
- {enhanced_git-1.0.0 → enhanced_git-1.0.4}/gitai/providers/base.py +0 -0
- {enhanced_git-1.0.0 → enhanced_git-1.0.4}/gitai/providers/ollama_provider.py +0 -0
- {enhanced_git-1.0.0 → enhanced_git-1.0.4}/gitai/providers/openai_provider.py +0 -0
- {enhanced_git-1.0.0 → enhanced_git-1.0.4}/gitai/util.py +0 -0
- {enhanced_git-1.0.0 → enhanced_git-1.0.4}/tests/__init__.py +0 -0
- {enhanced_git-1.0.0 → enhanced_git-1.0.4}/tests/test_changelog.py +0 -0
- {enhanced_git-1.0.0 → enhanced_git-1.0.4}/tests/test_diff.py +0 -0
- {enhanced_git-1.0.0 → enhanced_git-1.0.4}/tests/test_hook_integration.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: enhanced-git
|
3
|
-
Version: 1.0.
|
3
|
+
Version: 1.0.4
|
4
4
|
Summary: Generate Conventional Commit messages and changelog sections using AI
|
5
5
|
Project-URL: Homepage, https://github.com/mxzahid/git-ai
|
6
6
|
Project-URL: Repository, https://github.com/mxzahid/git-ai
|
@@ -63,10 +63,10 @@ Use Local models with Ollama or OpenAI, gracefully degrades when no AI is availa
|
|
63
63
|
|
64
64
|
```bash
|
65
65
|
# using pipx (recommended)
|
66
|
-
pipx install git
|
66
|
+
pipx install enhanced-git
|
67
67
|
|
68
68
|
# or using pip
|
69
|
-
pip install git
|
69
|
+
pip install enhanced-git
|
70
70
|
```
|
71
71
|
|
72
72
|
### Setup (Optional AI Integration)
|
@@ -168,6 +168,40 @@ git-ai changelog --since v1.0.0 --to main
|
|
168
168
|
- `OLLAMA_BASE_URL`: Ollama server URL (default: http://localhost:11434)
|
169
169
|
- `OLLAMA_MODEL`: Ollama model name (default: qwen2.5-coder:3b)
|
170
170
|
|
171
|
+
### Configuration File
|
172
|
+
|
173
|
+
GitAI supports optional configuration via a `.gitai.toml` file in your git repository root. This allows you to customize behavior beyond environment variables.
|
174
|
+
|
175
|
+
**Auto-detection**: GitAI automatically detects your LLM provider based on environment variables (no config file needed!):
|
176
|
+
- If `OPENAI_API_KEY` is set → uses OpenAI
|
177
|
+
- If `OLLAMA_BASE_URL` or `OLLAMA_MODEL` is set → uses Ollama
|
178
|
+
- Otherwise → falls back to OpenAI
|
179
|
+
|
180
|
+
**Custom configuration**: Create `.gitai.toml` in your project root for advanced settings:
|
181
|
+
|
182
|
+
```toml
|
183
|
+
[llm]
|
184
|
+
provider = "ollama" # "openai" | "ollama"
|
185
|
+
model = "qwen2.5-coder:3b" # I suggest using one of: qwen2.5-coder:3b, qwen2.5-coder:1.5b, codellama:7b, deepseek-coder:6.7b
|
186
|
+
max_tokens = 300
|
187
|
+
temperature = 0.1
|
188
|
+
timeout_seconds = 45
|
189
|
+
|
190
|
+
[commit]
|
191
|
+
style = "conventional" # "conventional" | "plain"
|
192
|
+
scope_detection = true
|
193
|
+
include_body = true
|
194
|
+
include_footers = true
|
195
|
+
wrap_width = 72
|
196
|
+
|
197
|
+
[changelog]
|
198
|
+
grouping = "type" # group by Conventional Commit type
|
199
|
+
heading_style = "keep-a-changelog"
|
200
|
+
|
201
|
+
[debug]
|
202
|
+
debug_mode = false
|
203
|
+
```
|
204
|
+
|
171
205
|
## How It Works
|
172
206
|
|
173
207
|
### Commit Message Generation
|
@@ -22,10 +22,10 @@ Use Local models with Ollama or OpenAI, gracefully degrades when no AI is availa
|
|
22
22
|
|
23
23
|
```bash
|
24
24
|
# using pipx (recommended)
|
25
|
-
pipx install git
|
25
|
+
pipx install enhanced-git
|
26
26
|
|
27
27
|
# or using pip
|
28
|
-
pip install git
|
28
|
+
pip install enhanced-git
|
29
29
|
```
|
30
30
|
|
31
31
|
### Setup (Optional AI Integration)
|
@@ -127,6 +127,40 @@ git-ai changelog --since v1.0.0 --to main
|
|
127
127
|
- `OLLAMA_BASE_URL`: Ollama server URL (default: http://localhost:11434)
|
128
128
|
- `OLLAMA_MODEL`: Ollama model name (default: qwen2.5-coder:3b)
|
129
129
|
|
130
|
+
### Configuration File
|
131
|
+
|
132
|
+
GitAI supports optional configuration via a `.gitai.toml` file in your git repository root. This allows you to customize behavior beyond environment variables.
|
133
|
+
|
134
|
+
**Auto-detection**: GitAI automatically detects your LLM provider based on environment variables (no config file needed!):
|
135
|
+
- If `OPENAI_API_KEY` is set → uses OpenAI
|
136
|
+
- If `OLLAMA_BASE_URL` or `OLLAMA_MODEL` is set → uses Ollama
|
137
|
+
- Otherwise → falls back to OpenAI
|
138
|
+
|
139
|
+
**Custom configuration**: Create `.gitai.toml` in your project root for advanced settings:
|
140
|
+
|
141
|
+
```toml
|
142
|
+
[llm]
|
143
|
+
provider = "ollama" # "openai" | "ollama"
|
144
|
+
model = "qwen2.5-coder:3b" # I suggest using one of: qwen2.5-coder:3b, qwen2.5-coder:1.5b, codellama:7b, deepseek-coder:6.7b
|
145
|
+
max_tokens = 300
|
146
|
+
temperature = 0.1
|
147
|
+
timeout_seconds = 45
|
148
|
+
|
149
|
+
[commit]
|
150
|
+
style = "conventional" # "conventional" | "plain"
|
151
|
+
scope_detection = true
|
152
|
+
include_body = true
|
153
|
+
include_footers = true
|
154
|
+
wrap_width = 72
|
155
|
+
|
156
|
+
[changelog]
|
157
|
+
grouping = "type" # group by Conventional Commit type
|
158
|
+
heading_style = "keep-a-changelog"
|
159
|
+
|
160
|
+
[debug]
|
161
|
+
debug_mode = false
|
162
|
+
```
|
163
|
+
|
130
164
|
## How It Works
|
131
165
|
|
132
166
|
### Commit Message Generation
|
@@ -66,20 +66,31 @@ class Config:
|
|
66
66
|
config_data = load_toml_config(config_path)
|
67
67
|
|
68
68
|
llm_data = config_data.get("llm", {})
|
69
|
+
|
70
|
+
# auto-detect provider based on available environment variables
|
71
|
+
configured_provider = llm_data.get("provider")
|
72
|
+
if configured_provider is None:
|
73
|
+
if os.getenv("OPENAI_API_KEY"):
|
74
|
+
configured_provider = "openai"
|
75
|
+
elif os.getenv("OLLAMA_BASE_URL") or os.getenv("OLLAMA_MODEL"):
|
76
|
+
configured_provider = "ollama"
|
77
|
+
else:
|
78
|
+
configured_provider = None # fallback
|
79
|
+
|
69
80
|
llm_config = LLMConfig(
|
70
|
-
provider=
|
71
|
-
model=llm_data.get("model", "gpt-4o-mini"),
|
81
|
+
provider=configured_provider,
|
82
|
+
model=llm_data.get("model", "gpt-4o-mini" if configured_provider == "openai" else "qwen2.5-coder:3b"),
|
72
83
|
max_tokens=llm_data.get("max_tokens", 300),
|
73
84
|
temperature=llm_data.get("temperature", 0.0),
|
74
85
|
timeout_seconds=llm_data.get("timeout_seconds", 45),
|
75
86
|
api_key=(
|
76
87
|
os.getenv("OPENAI_API_KEY")
|
77
|
-
if
|
88
|
+
if configured_provider == "openai"
|
78
89
|
else None
|
79
90
|
),
|
80
91
|
base_url=(
|
81
92
|
os.getenv("OLLAMA_BASE_URL", "http://localhost:11434")
|
82
|
-
if
|
93
|
+
if configured_provider == "ollama"
|
83
94
|
else None
|
84
95
|
),
|
85
96
|
)
|
@@ -115,6 +126,6 @@ class Config:
|
|
115
126
|
if self.llm.provider == "openai":
|
116
127
|
return self.llm.api_key is not None
|
117
128
|
elif self.llm.provider == "ollama":
|
118
|
-
# for
|
119
|
-
return self.llm.base_url is not None
|
129
|
+
# for ollama we assume it's available if base_url is set or model is configured
|
130
|
+
return self.llm.base_url is not None or os.getenv("OLLAMA_MODEL") is not None
|
120
131
|
return False
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
4
4
|
|
5
5
|
[project]
|
6
6
|
name = "enhanced-git"
|
7
|
-
version = "1.0.
|
7
|
+
version = "1.0.4"
|
8
8
|
description = "Generate Conventional Commit messages and changelog sections using AI"
|
9
9
|
readme = "README.md"
|
10
10
|
license = {text = "MIT"}
|
@@ -52,6 +52,7 @@ docs = [
|
|
52
52
|
|
53
53
|
[project.scripts]
|
54
54
|
enhanced-git = "gitai.cli:app"
|
55
|
+
git-ai = "gitai.cli:app"
|
55
56
|
|
56
57
|
[project.urls]
|
57
58
|
Homepage = "https://github.com/mxzahid/git-ai"
|
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
|
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
|
File without changes
|
File without changes
|
File without changes
|