gac 1.12.1__tar.gz → 2.7.3__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.
- {gac-1.12.1 → gac-2.7.3}/PKG-INFO +80 -23
- {gac-1.12.1 → gac-2.7.3}/README.md +78 -22
- {gac-1.12.1 → gac-2.7.3}/pyproject.toml +1 -0
- {gac-1.12.1 → gac-2.7.3}/src/gac/__version__.py +1 -1
- {gac-1.12.1 → gac-2.7.3}/src/gac/ai.py +36 -2
- {gac-1.12.1 → gac-2.7.3}/src/gac/ai_utils.py +54 -15
- gac-2.7.3/src/gac/auth_cli.py +69 -0
- {gac-1.12.1 → gac-2.7.3}/src/gac/cli.py +40 -2
- {gac-1.12.1 → gac-2.7.3}/src/gac/config.py +6 -0
- {gac-1.12.1 → gac-2.7.3}/src/gac/constants.py +171 -2
- {gac-1.12.1 → gac-2.7.3}/src/gac/git.py +111 -12
- gac-2.7.3/src/gac/init_cli.py +483 -0
- gac-2.7.3/src/gac/language_cli.py +253 -0
- gac-2.7.3/src/gac/main.py +767 -0
- gac-2.7.3/src/gac/oauth/__init__.py +1 -0
- gac-2.7.3/src/gac/oauth/claude_code.py +397 -0
- {gac-1.12.1 → gac-2.7.3}/src/gac/preprocess.py +3 -3
- gac-2.7.3/src/gac/prompt.py +785 -0
- {gac-1.12.1 → gac-2.7.3}/src/gac/providers/__init__.py +8 -0
- gac-2.7.3/src/gac/providers/claude_code.py +102 -0
- gac-2.7.3/src/gac/providers/custom_anthropic.py +133 -0
- gac-2.7.3/src/gac/providers/custom_openai.py +99 -0
- gac-2.7.3/src/gac/providers/mistral.py +38 -0
- {gac-1.12.1 → gac-2.7.3}/src/gac/security.py +1 -1
- gac-2.7.3/src/gac/utils.py +371 -0
- gac-2.7.3/src/gac/workflow_utils.py +134 -0
- gac-1.12.1/src/gac/init_cli.py +0 -122
- gac-1.12.1/src/gac/main.py +0 -355
- gac-1.12.1/src/gac/prompt.py +0 -548
- gac-1.12.1/src/gac/utils.py +0 -132
- {gac-1.12.1 → gac-2.7.3}/.gitignore +0 -0
- {gac-1.12.1 → gac-2.7.3}/LICENSE +0 -0
- {gac-1.12.1 → gac-2.7.3}/src/gac/__init__.py +0 -0
- {gac-1.12.1 → gac-2.7.3}/src/gac/config_cli.py +0 -0
- {gac-1.12.1 → gac-2.7.3}/src/gac/diff_cli.py +0 -0
- {gac-1.12.1 → gac-2.7.3}/src/gac/errors.py +0 -0
- {gac-1.12.1 → gac-2.7.3}/src/gac/providers/anthropic.py +0 -0
- {gac-1.12.1 → gac-2.7.3}/src/gac/providers/cerebras.py +0 -0
- {gac-1.12.1 → gac-2.7.3}/src/gac/providers/chutes.py +0 -0
- {gac-1.12.1 → gac-2.7.3}/src/gac/providers/deepseek.py +0 -0
- {gac-1.12.1 → gac-2.7.3}/src/gac/providers/fireworks.py +0 -0
- {gac-1.12.1 → gac-2.7.3}/src/gac/providers/gemini.py +0 -0
- {gac-1.12.1 → gac-2.7.3}/src/gac/providers/groq.py +0 -0
- {gac-1.12.1 → gac-2.7.3}/src/gac/providers/lmstudio.py +0 -0
- {gac-1.12.1 → gac-2.7.3}/src/gac/providers/minimax.py +0 -0
- {gac-1.12.1 → gac-2.7.3}/src/gac/providers/ollama.py +0 -0
- {gac-1.12.1 → gac-2.7.3}/src/gac/providers/openai.py +0 -0
- {gac-1.12.1 → gac-2.7.3}/src/gac/providers/openrouter.py +0 -0
- {gac-1.12.1 → gac-2.7.3}/src/gac/providers/streamlake.py +0 -0
- {gac-1.12.1 → gac-2.7.3}/src/gac/providers/synthetic.py +0 -0
- {gac-1.12.1 → gac-2.7.3}/src/gac/providers/together.py +0 -0
- {gac-1.12.1 → gac-2.7.3}/src/gac/providers/zai.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: gac
|
|
3
|
-
Version:
|
|
3
|
+
Version: 2.7.3
|
|
4
4
|
Summary: LLM-powered Git commit message generator with multi-provider support
|
|
5
5
|
Project-URL: Homepage, https://github.com/cellwebb/gac
|
|
6
6
|
Project-URL: Documentation, https://github.com/cellwebb/gac#readme
|
|
@@ -25,6 +25,7 @@ Requires-Dist: click>=8.3.0
|
|
|
25
25
|
Requires-Dist: halo
|
|
26
26
|
Requires-Dist: httpcore>=1.0.9
|
|
27
27
|
Requires-Dist: httpx>=0.28.0
|
|
28
|
+
Requires-Dist: prompt-toolkit>=3.0.36
|
|
28
29
|
Requires-Dist: pydantic>=2.12.0
|
|
29
30
|
Requires-Dist: python-dotenv>=1.1.1
|
|
30
31
|
Requires-Dist: questionary
|
|
@@ -40,6 +41,9 @@ Requires-Dist: twine; extra == 'dev'
|
|
|
40
41
|
Description-Content-Type: text/markdown
|
|
41
42
|
|
|
42
43
|
<!-- markdownlint-disable MD013 -->
|
|
44
|
+
<!-- markdownlint-disable MD033 MD036 -->
|
|
45
|
+
|
|
46
|
+
<div align="center">
|
|
43
47
|
|
|
44
48
|
# 🚀 Git Auto Commit (gac)
|
|
45
49
|
|
|
@@ -49,12 +53,14 @@ Description-Content-Type: text/markdown
|
|
|
49
53
|
[](https://app.codecov.io/gh/cellwebb/gac)
|
|
50
54
|
[](https://github.com/astral-sh/ruff)
|
|
51
55
|
[](https://mypy-lang.org/)
|
|
52
|
-
[](docs/CONTRIBUTING.md)
|
|
56
|
+
[](docs/en/CONTRIBUTING.md)
|
|
53
57
|
[](LICENSE)
|
|
54
58
|
|
|
55
|
-
**
|
|
59
|
+
**English** | [简体中文](docs/zh-CN/README.md) | [繁體中文](docs/zh-TW/README.md) | [日本語](docs/ja/README.md) | [한국어](docs/ko/README.md) | [हिन्दी](docs/hi/README.md) | [Tiếng Việt](docs/vi/README.md) | [Français](docs/fr/README.md) | [Русский](docs/ru/README.md) | [Español](docs/es/README.md) | [Português](docs/pt/README.md) | [Norsk](docs/no/README.md) | [Svenska](docs/sv/README.md) | [Deutsch](docs/de/README.md) | [Nederlands](docs/nl/README.md) | [Italiano](docs/it/README.md)
|
|
60
|
+
|
|
61
|
+
**LLM-powered commit messages that understand your code!**
|
|
56
62
|
|
|
57
|
-
**
|
|
63
|
+
**Automate your commits!** Replace `git commit -m "..."` with `gac` for contextual, well-formatted commit messages generated by large language models!
|
|
58
64
|
|
|
59
65
|
---
|
|
60
66
|
|
|
@@ -66,18 +72,22 @@ Intelligent, contextual messages that explain the **why** behind your changes:
|
|
|
66
72
|
|
|
67
73
|
---
|
|
68
74
|
|
|
75
|
+
</div>
|
|
76
|
+
|
|
77
|
+
<!-- markdownlint-enable MD033 MD036 -->
|
|
78
|
+
|
|
69
79
|
## Quick Start
|
|
70
80
|
|
|
71
|
-
### Use without installing
|
|
81
|
+
### Use gac without installing
|
|
72
82
|
|
|
73
83
|
```bash
|
|
74
|
-
uvx gac init
|
|
84
|
+
uvx gac init # Configure your provider, model, and language
|
|
75
85
|
uvx gac # Generate and commit with LLM
|
|
76
86
|
```
|
|
77
87
|
|
|
78
88
|
That's it! Review the generated message and confirm with `y`.
|
|
79
89
|
|
|
80
|
-
### Install gac
|
|
90
|
+
### Install and use gac
|
|
81
91
|
|
|
82
92
|
```bash
|
|
83
93
|
uv tool install gac
|
|
@@ -85,21 +95,29 @@ gac init
|
|
|
85
95
|
gac
|
|
86
96
|
```
|
|
87
97
|
|
|
98
|
+
### Upgrade installed gac
|
|
99
|
+
|
|
100
|
+
```bash
|
|
101
|
+
uv tool upgrade gac
|
|
102
|
+
```
|
|
103
|
+
|
|
88
104
|
---
|
|
89
105
|
|
|
90
106
|
## Key Features
|
|
91
107
|
|
|
92
108
|
### 🌐 **Supported Providers**
|
|
93
109
|
|
|
94
|
-
- **Anthropic** • **Cerebras** • **Chutes.ai** • **
|
|
95
|
-
- **
|
|
96
|
-
- **
|
|
110
|
+
- **Anthropic** • **Cerebras** • **Chutes.ai** • **Claude Code** • **DeepSeek**
|
|
111
|
+
- **Fireworks** • **Gemini** • **Groq** • **LM Studio** • **MiniMax** • **Mistral** • **Ollama**
|
|
112
|
+
- **OpenAI** • **OpenRouter** • **Streamlake** • **Synthetic.new** • **Together AI**
|
|
113
|
+
- **Z.AI** • **Z.AI Coding** • **Custom Endpoints (Anthropic/OpenAI)**
|
|
97
114
|
|
|
98
115
|
### 🧠 **Smart LLM Analysis**
|
|
99
116
|
|
|
100
117
|
- **Understands intent**: Analyzes code structure, logic, and patterns to understand the "why" behind your changes, not just what changed
|
|
101
118
|
- **Semantic awareness**: Recognizes refactoring, bug fixes, features, and breaking changes to generate contextually appropriate messages
|
|
102
119
|
- **Intelligent filtering**: Prioritizes meaningful changes while ignoring generated files, dependencies, and artifacts
|
|
120
|
+
- **Intelligent commit grouping** - Automatically group related changes into multiple logical commits with `--group`
|
|
103
121
|
|
|
104
122
|
### 📝 **Multiple Message Formats**
|
|
105
123
|
|
|
@@ -107,9 +125,16 @@ gac
|
|
|
107
125
|
- **Standard** (default): Summary with bullet points explaining implementation details
|
|
108
126
|
- **Verbose** (-v flag): Comprehensive explanations including motivation, technical approach, and impact analysis
|
|
109
127
|
|
|
128
|
+
### 🌍 **Multilingual Support**
|
|
129
|
+
|
|
130
|
+
- **25+ languages**: Generate commit messages in English, Chinese, Japanese, Korean, Spanish, French, German, and 20+ more languages
|
|
131
|
+
- **Flexible translation**: Choose to keep conventional commit prefixes in English for tool compatibility, or fully translate them
|
|
132
|
+
- **Multiple workflows**: Set a default language with `gac language`, or use `-l <language>` flag for one-time overrides
|
|
133
|
+
- **Native script support**: Full support for non-Latin scripts including CJK, Cyrillic, Arabic, and more
|
|
134
|
+
|
|
110
135
|
### 💻 **Developer Experience**
|
|
111
136
|
|
|
112
|
-
- **Interactive feedback**:
|
|
137
|
+
- **Interactive feedback**: Type `r` to reroll, `e` to edit in-place with vi/emacs keybindings, or directly type your feedback like `make it shorter` or `focus on the bug fix`
|
|
113
138
|
- **One-command workflows**: Complete workflows with flags like `gac -ayp` (stage all, auto-confirm, push)
|
|
114
139
|
- **Git integration**: Respects pre-commit and lefthook hooks, running them before expensive LLM operations
|
|
115
140
|
|
|
@@ -132,7 +157,7 @@ git add .
|
|
|
132
157
|
# Generate and commit with LLM
|
|
133
158
|
gac
|
|
134
159
|
|
|
135
|
-
# Review → y (commit) | n (cancel) | r (reroll)
|
|
160
|
+
# Review → y (commit) | n (cancel) | r (reroll) | e (edit) | or type feedback
|
|
136
161
|
```
|
|
137
162
|
|
|
138
163
|
### Common Commands
|
|
@@ -160,6 +185,9 @@ gac -v -s
|
|
|
160
185
|
# Quick one-liner for small changes
|
|
161
186
|
gac -o
|
|
162
187
|
|
|
188
|
+
# Group changes into logically related commits
|
|
189
|
+
gac -ag
|
|
190
|
+
|
|
163
191
|
# Debug what the LLM sees
|
|
164
192
|
gac --show-prompt
|
|
165
193
|
|
|
@@ -167,26 +195,42 @@ gac --show-prompt
|
|
|
167
195
|
gac --skip-secret-scan
|
|
168
196
|
```
|
|
169
197
|
|
|
170
|
-
### Interactive
|
|
198
|
+
### Interactive Feedback System
|
|
171
199
|
|
|
172
|
-
Not happy with the result?
|
|
200
|
+
Not happy with the result? You have several options:
|
|
173
201
|
|
|
174
202
|
```bash
|
|
175
|
-
# Simple reroll
|
|
203
|
+
# Simple reroll (no feedback)
|
|
176
204
|
r
|
|
177
205
|
|
|
178
|
-
#
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
206
|
+
# Edit in-place with rich terminal editing
|
|
207
|
+
e
|
|
208
|
+
# Uses prompt_toolkit for multi-line editing with vi/emacs keybindings
|
|
209
|
+
# Press Esc+Enter or Ctrl+S to submit, Ctrl+C to cancel
|
|
210
|
+
|
|
211
|
+
# Or just type your feedback directly!
|
|
212
|
+
make it shorter and focus on the performance improvement
|
|
213
|
+
use conventional commit format with scope
|
|
214
|
+
explain the security implications
|
|
215
|
+
|
|
216
|
+
# Press Enter on empty input to see the prompt again
|
|
182
217
|
```
|
|
183
218
|
|
|
219
|
+
The edit feature (`e`) provides rich in-place terminal editing, allowing you to:
|
|
220
|
+
|
|
221
|
+
- **Edit naturally**: Multi-line editing with familiar vi/emacs key bindings
|
|
222
|
+
- **Make quick fixes**: Correct typos, adjust wording, or refine formatting
|
|
223
|
+
- **Add details**: Include information the LLM might have missed
|
|
224
|
+
- **Restructure**: Reorganize bullet points or change the message structure
|
|
225
|
+
|
|
184
226
|
---
|
|
185
227
|
|
|
186
228
|
## Configuration
|
|
187
229
|
|
|
188
230
|
Run `gac init` to configure your provider interactively, or set environment variables:
|
|
189
231
|
|
|
232
|
+
Need to change providers or models later without touching language settings? Use `gac model` for a streamlined flow that skips the language prompts.
|
|
233
|
+
|
|
190
234
|
```bash
|
|
191
235
|
# Example configuration
|
|
192
236
|
GAC_MODEL=anthropic:your-model-name
|
|
@@ -196,13 +240,26 @@ ANTHROPIC_API_KEY=your_key_here
|
|
|
196
240
|
|
|
197
241
|
See `.gac.env.example` for all available options.
|
|
198
242
|
|
|
243
|
+
**Want commit messages in another language?** Run `gac language` to select from 25+ languages including Español, Français, 日本語, and more.
|
|
244
|
+
|
|
245
|
+
**Want to customize commit message style?** See [docs/CUSTOM_SYSTEM_PROMPTS.md](docs/en/CUSTOM_SYSTEM_PROMPTS.md) for guidance on writing custom system prompts.
|
|
246
|
+
|
|
247
|
+
---
|
|
248
|
+
|
|
249
|
+
## Project Analytics
|
|
250
|
+
|
|
251
|
+
📊 **[View live usage analytics and statistics →](https://clickpy.clickhouse.com/dashboard/gac)**
|
|
252
|
+
|
|
253
|
+
Track real-time installation metrics and package download statistics.
|
|
254
|
+
|
|
199
255
|
---
|
|
200
256
|
|
|
201
257
|
## Getting Help
|
|
202
258
|
|
|
203
|
-
- **Full documentation**: [USAGE.md](USAGE.md) - Complete CLI reference
|
|
204
|
-
- **
|
|
205
|
-
- **
|
|
259
|
+
- **Full documentation**: [docs/USAGE.md](docs/en/USAGE.md) - Complete CLI reference
|
|
260
|
+
- **Custom prompts**: [docs/CUSTOM_SYSTEM_PROMPTS.md](docs/en/CUSTOM_SYSTEM_PROMPTS.md) - Customize commit message style
|
|
261
|
+
- **Troubleshooting**: [docs/TROUBLESHOOTING.md](docs/en/TROUBLESHOOTING.md) - Common issues and solutions
|
|
262
|
+
- **Contributing**: [docs/CONTRIBUTING.md](docs/en/CONTRIBUTING.md) - Development setup and guidelines
|
|
206
263
|
|
|
207
264
|
---
|
|
208
265
|
|
|
@@ -212,7 +269,7 @@ See `.gac.env.example` for all available options.
|
|
|
212
269
|
|
|
213
270
|
Made with ❤️ for developers who want better commit messages
|
|
214
271
|
|
|
215
|
-
[⭐ Star us on GitHub](https://github.com/cellwebb/gac) • [🐛 Report issues](https://github.com/cellwebb/gac/issues) • [📖 Full docs](USAGE.md)
|
|
272
|
+
[⭐ Star us on GitHub](https://github.com/cellwebb/gac) • [🐛 Report issues](https://github.com/cellwebb/gac/issues) • [📖 Full docs](docs/en/USAGE.md)
|
|
216
273
|
|
|
217
274
|
</div>
|
|
218
275
|
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
<!-- markdownlint-disable MD013 -->
|
|
2
|
+
<!-- markdownlint-disable MD033 MD036 -->
|
|
3
|
+
|
|
4
|
+
<div align="center">
|
|
2
5
|
|
|
3
6
|
# 🚀 Git Auto Commit (gac)
|
|
4
7
|
|
|
@@ -8,12 +11,14 @@
|
|
|
8
11
|
[](https://app.codecov.io/gh/cellwebb/gac)
|
|
9
12
|
[](https://github.com/astral-sh/ruff)
|
|
10
13
|
[](https://mypy-lang.org/)
|
|
11
|
-
[](docs/CONTRIBUTING.md)
|
|
14
|
+
[](docs/en/CONTRIBUTING.md)
|
|
12
15
|
[](LICENSE)
|
|
13
16
|
|
|
14
|
-
**
|
|
17
|
+
**English** | [简体中文](docs/zh-CN/README.md) | [繁體中文](docs/zh-TW/README.md) | [日本語](docs/ja/README.md) | [한국어](docs/ko/README.md) | [हिन्दी](docs/hi/README.md) | [Tiếng Việt](docs/vi/README.md) | [Français](docs/fr/README.md) | [Русский](docs/ru/README.md) | [Español](docs/es/README.md) | [Português](docs/pt/README.md) | [Norsk](docs/no/README.md) | [Svenska](docs/sv/README.md) | [Deutsch](docs/de/README.md) | [Nederlands](docs/nl/README.md) | [Italiano](docs/it/README.md)
|
|
18
|
+
|
|
19
|
+
**LLM-powered commit messages that understand your code!**
|
|
15
20
|
|
|
16
|
-
**
|
|
21
|
+
**Automate your commits!** Replace `git commit -m "..."` with `gac` for contextual, well-formatted commit messages generated by large language models!
|
|
17
22
|
|
|
18
23
|
---
|
|
19
24
|
|
|
@@ -25,18 +30,22 @@ Intelligent, contextual messages that explain the **why** behind your changes:
|
|
|
25
30
|
|
|
26
31
|
---
|
|
27
32
|
|
|
33
|
+
</div>
|
|
34
|
+
|
|
35
|
+
<!-- markdownlint-enable MD033 MD036 -->
|
|
36
|
+
|
|
28
37
|
## Quick Start
|
|
29
38
|
|
|
30
|
-
### Use without installing
|
|
39
|
+
### Use gac without installing
|
|
31
40
|
|
|
32
41
|
```bash
|
|
33
|
-
uvx gac init
|
|
42
|
+
uvx gac init # Configure your provider, model, and language
|
|
34
43
|
uvx gac # Generate and commit with LLM
|
|
35
44
|
```
|
|
36
45
|
|
|
37
46
|
That's it! Review the generated message and confirm with `y`.
|
|
38
47
|
|
|
39
|
-
### Install gac
|
|
48
|
+
### Install and use gac
|
|
40
49
|
|
|
41
50
|
```bash
|
|
42
51
|
uv tool install gac
|
|
@@ -44,21 +53,29 @@ gac init
|
|
|
44
53
|
gac
|
|
45
54
|
```
|
|
46
55
|
|
|
56
|
+
### Upgrade installed gac
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
uv tool upgrade gac
|
|
60
|
+
```
|
|
61
|
+
|
|
47
62
|
---
|
|
48
63
|
|
|
49
64
|
## Key Features
|
|
50
65
|
|
|
51
66
|
### 🌐 **Supported Providers**
|
|
52
67
|
|
|
53
|
-
- **Anthropic** • **Cerebras** • **Chutes.ai** • **
|
|
54
|
-
- **
|
|
55
|
-
- **
|
|
68
|
+
- **Anthropic** • **Cerebras** • **Chutes.ai** • **Claude Code** • **DeepSeek**
|
|
69
|
+
- **Fireworks** • **Gemini** • **Groq** • **LM Studio** • **MiniMax** • **Mistral** • **Ollama**
|
|
70
|
+
- **OpenAI** • **OpenRouter** • **Streamlake** • **Synthetic.new** • **Together AI**
|
|
71
|
+
- **Z.AI** • **Z.AI Coding** • **Custom Endpoints (Anthropic/OpenAI)**
|
|
56
72
|
|
|
57
73
|
### 🧠 **Smart LLM Analysis**
|
|
58
74
|
|
|
59
75
|
- **Understands intent**: Analyzes code structure, logic, and patterns to understand the "why" behind your changes, not just what changed
|
|
60
76
|
- **Semantic awareness**: Recognizes refactoring, bug fixes, features, and breaking changes to generate contextually appropriate messages
|
|
61
77
|
- **Intelligent filtering**: Prioritizes meaningful changes while ignoring generated files, dependencies, and artifacts
|
|
78
|
+
- **Intelligent commit grouping** - Automatically group related changes into multiple logical commits with `--group`
|
|
62
79
|
|
|
63
80
|
### 📝 **Multiple Message Formats**
|
|
64
81
|
|
|
@@ -66,9 +83,16 @@ gac
|
|
|
66
83
|
- **Standard** (default): Summary with bullet points explaining implementation details
|
|
67
84
|
- **Verbose** (-v flag): Comprehensive explanations including motivation, technical approach, and impact analysis
|
|
68
85
|
|
|
86
|
+
### 🌍 **Multilingual Support**
|
|
87
|
+
|
|
88
|
+
- **25+ languages**: Generate commit messages in English, Chinese, Japanese, Korean, Spanish, French, German, and 20+ more languages
|
|
89
|
+
- **Flexible translation**: Choose to keep conventional commit prefixes in English for tool compatibility, or fully translate them
|
|
90
|
+
- **Multiple workflows**: Set a default language with `gac language`, or use `-l <language>` flag for one-time overrides
|
|
91
|
+
- **Native script support**: Full support for non-Latin scripts including CJK, Cyrillic, Arabic, and more
|
|
92
|
+
|
|
69
93
|
### 💻 **Developer Experience**
|
|
70
94
|
|
|
71
|
-
- **Interactive feedback**:
|
|
95
|
+
- **Interactive feedback**: Type `r` to reroll, `e` to edit in-place with vi/emacs keybindings, or directly type your feedback like `make it shorter` or `focus on the bug fix`
|
|
72
96
|
- **One-command workflows**: Complete workflows with flags like `gac -ayp` (stage all, auto-confirm, push)
|
|
73
97
|
- **Git integration**: Respects pre-commit and lefthook hooks, running them before expensive LLM operations
|
|
74
98
|
|
|
@@ -91,7 +115,7 @@ git add .
|
|
|
91
115
|
# Generate and commit with LLM
|
|
92
116
|
gac
|
|
93
117
|
|
|
94
|
-
# Review → y (commit) | n (cancel) | r (reroll)
|
|
118
|
+
# Review → y (commit) | n (cancel) | r (reroll) | e (edit) | or type feedback
|
|
95
119
|
```
|
|
96
120
|
|
|
97
121
|
### Common Commands
|
|
@@ -119,6 +143,9 @@ gac -v -s
|
|
|
119
143
|
# Quick one-liner for small changes
|
|
120
144
|
gac -o
|
|
121
145
|
|
|
146
|
+
# Group changes into logically related commits
|
|
147
|
+
gac -ag
|
|
148
|
+
|
|
122
149
|
# Debug what the LLM sees
|
|
123
150
|
gac --show-prompt
|
|
124
151
|
|
|
@@ -126,26 +153,42 @@ gac --show-prompt
|
|
|
126
153
|
gac --skip-secret-scan
|
|
127
154
|
```
|
|
128
155
|
|
|
129
|
-
### Interactive
|
|
156
|
+
### Interactive Feedback System
|
|
130
157
|
|
|
131
|
-
Not happy with the result?
|
|
158
|
+
Not happy with the result? You have several options:
|
|
132
159
|
|
|
133
160
|
```bash
|
|
134
|
-
# Simple reroll
|
|
161
|
+
# Simple reroll (no feedback)
|
|
135
162
|
r
|
|
136
163
|
|
|
137
|
-
#
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
164
|
+
# Edit in-place with rich terminal editing
|
|
165
|
+
e
|
|
166
|
+
# Uses prompt_toolkit for multi-line editing with vi/emacs keybindings
|
|
167
|
+
# Press Esc+Enter or Ctrl+S to submit, Ctrl+C to cancel
|
|
168
|
+
|
|
169
|
+
# Or just type your feedback directly!
|
|
170
|
+
make it shorter and focus on the performance improvement
|
|
171
|
+
use conventional commit format with scope
|
|
172
|
+
explain the security implications
|
|
173
|
+
|
|
174
|
+
# Press Enter on empty input to see the prompt again
|
|
141
175
|
```
|
|
142
176
|
|
|
177
|
+
The edit feature (`e`) provides rich in-place terminal editing, allowing you to:
|
|
178
|
+
|
|
179
|
+
- **Edit naturally**: Multi-line editing with familiar vi/emacs key bindings
|
|
180
|
+
- **Make quick fixes**: Correct typos, adjust wording, or refine formatting
|
|
181
|
+
- **Add details**: Include information the LLM might have missed
|
|
182
|
+
- **Restructure**: Reorganize bullet points or change the message structure
|
|
183
|
+
|
|
143
184
|
---
|
|
144
185
|
|
|
145
186
|
## Configuration
|
|
146
187
|
|
|
147
188
|
Run `gac init` to configure your provider interactively, or set environment variables:
|
|
148
189
|
|
|
190
|
+
Need to change providers or models later without touching language settings? Use `gac model` for a streamlined flow that skips the language prompts.
|
|
191
|
+
|
|
149
192
|
```bash
|
|
150
193
|
# Example configuration
|
|
151
194
|
GAC_MODEL=anthropic:your-model-name
|
|
@@ -155,13 +198,26 @@ ANTHROPIC_API_KEY=your_key_here
|
|
|
155
198
|
|
|
156
199
|
See `.gac.env.example` for all available options.
|
|
157
200
|
|
|
201
|
+
**Want commit messages in another language?** Run `gac language` to select from 25+ languages including Español, Français, 日本語, and more.
|
|
202
|
+
|
|
203
|
+
**Want to customize commit message style?** See [docs/CUSTOM_SYSTEM_PROMPTS.md](docs/en/CUSTOM_SYSTEM_PROMPTS.md) for guidance on writing custom system prompts.
|
|
204
|
+
|
|
205
|
+
---
|
|
206
|
+
|
|
207
|
+
## Project Analytics
|
|
208
|
+
|
|
209
|
+
📊 **[View live usage analytics and statistics →](https://clickpy.clickhouse.com/dashboard/gac)**
|
|
210
|
+
|
|
211
|
+
Track real-time installation metrics and package download statistics.
|
|
212
|
+
|
|
158
213
|
---
|
|
159
214
|
|
|
160
215
|
## Getting Help
|
|
161
216
|
|
|
162
|
-
- **Full documentation**: [USAGE.md](USAGE.md) - Complete CLI reference
|
|
163
|
-
- **
|
|
164
|
-
- **
|
|
217
|
+
- **Full documentation**: [docs/USAGE.md](docs/en/USAGE.md) - Complete CLI reference
|
|
218
|
+
- **Custom prompts**: [docs/CUSTOM_SYSTEM_PROMPTS.md](docs/en/CUSTOM_SYSTEM_PROMPTS.md) - Customize commit message style
|
|
219
|
+
- **Troubleshooting**: [docs/TROUBLESHOOTING.md](docs/en/TROUBLESHOOTING.md) - Common issues and solutions
|
|
220
|
+
- **Contributing**: [docs/CONTRIBUTING.md](docs/en/CONTRIBUTING.md) - Development setup and guidelines
|
|
165
221
|
|
|
166
222
|
---
|
|
167
223
|
|
|
@@ -171,7 +227,7 @@ See `.gac.env.example` for all available options.
|
|
|
171
227
|
|
|
172
228
|
Made with ❤️ for developers who want better commit messages
|
|
173
229
|
|
|
174
|
-
[⭐ Star us on GitHub](https://github.com/cellwebb/gac) • [🐛 Report issues](https://github.com/cellwebb/gac/issues) • [📖 Full docs](USAGE.md)
|
|
230
|
+
[⭐ Star us on GitHub](https://github.com/cellwebb/gac) • [🐛 Report issues](https://github.com/cellwebb/gac/issues) • [📖 Full docs](docs/en/USAGE.md)
|
|
175
231
|
|
|
176
232
|
</div>
|
|
177
233
|
|
|
@@ -13,12 +13,16 @@ from gac.providers import (
|
|
|
13
13
|
call_anthropic_api,
|
|
14
14
|
call_cerebras_api,
|
|
15
15
|
call_chutes_api,
|
|
16
|
+
call_claude_code_api,
|
|
17
|
+
call_custom_anthropic_api,
|
|
18
|
+
call_custom_openai_api,
|
|
16
19
|
call_deepseek_api,
|
|
17
20
|
call_fireworks_api,
|
|
18
21
|
call_gemini_api,
|
|
19
22
|
call_groq_api,
|
|
20
23
|
call_lmstudio_api,
|
|
21
24
|
call_minimax_api,
|
|
25
|
+
call_mistral_api,
|
|
22
26
|
call_ollama_api,
|
|
23
27
|
call_openai_api,
|
|
24
28
|
call_openrouter_api,
|
|
@@ -39,11 +43,13 @@ def generate_commit_message(
|
|
|
39
43
|
max_tokens: int = EnvDefaults.MAX_OUTPUT_TOKENS,
|
|
40
44
|
max_retries: int = EnvDefaults.MAX_RETRIES,
|
|
41
45
|
quiet: bool = False,
|
|
46
|
+
is_group: bool = False,
|
|
47
|
+
skip_success_message: bool = False,
|
|
42
48
|
) -> str:
|
|
43
49
|
"""Generate a commit message using direct API calls to AI providers.
|
|
44
50
|
|
|
45
51
|
Args:
|
|
46
|
-
model: The model to use in provider:model_name format (e.g., 'anthropic:claude-
|
|
52
|
+
model: The model to use in provider:model_name format (e.g., 'anthropic:claude-haiku-4-5')
|
|
47
53
|
prompt: Either a string prompt (for backward compatibility) or tuple of (system_prompt, user_prompt)
|
|
48
54
|
temperature: Controls randomness (0.0-1.0), lower values are more deterministic
|
|
49
55
|
max_tokens: Maximum tokens in the response
|
|
@@ -57,7 +63,7 @@ def generate_commit_message(
|
|
|
57
63
|
AIError: If generation fails after max_retries attempts
|
|
58
64
|
|
|
59
65
|
Example:
|
|
60
|
-
>>> model = "anthropic:claude-
|
|
66
|
+
>>> model = "anthropic:claude-haiku-4-5"
|
|
61
67
|
>>> system_prompt, user_prompt = build_prompt("On branch main", "diff --git a/README.md b/README.md")
|
|
62
68
|
>>> generate_commit_message(model, (system_prompt, user_prompt))
|
|
63
69
|
'docs: Update README with installation instructions'
|
|
@@ -83,13 +89,17 @@ def generate_commit_message(
|
|
|
83
89
|
provider_funcs = {
|
|
84
90
|
"anthropic": call_anthropic_api,
|
|
85
91
|
"cerebras": call_cerebras_api,
|
|
92
|
+
"claude-code": call_claude_code_api,
|
|
86
93
|
"chutes": call_chutes_api,
|
|
94
|
+
"custom-anthropic": call_custom_anthropic_api,
|
|
95
|
+
"custom-openai": call_custom_openai_api,
|
|
87
96
|
"deepseek": call_deepseek_api,
|
|
88
97
|
"fireworks": call_fireworks_api,
|
|
89
98
|
"gemini": call_gemini_api,
|
|
90
99
|
"groq": call_groq_api,
|
|
91
100
|
"lm-studio": call_lmstudio_api,
|
|
92
101
|
"minimax": call_minimax_api,
|
|
102
|
+
"mistral": call_mistral_api,
|
|
93
103
|
"ollama": call_ollama_api,
|
|
94
104
|
"openai": call_openai_api,
|
|
95
105
|
"openrouter": call_openrouter_api,
|
|
@@ -110,6 +120,8 @@ def generate_commit_message(
|
|
|
110
120
|
max_tokens=max_tokens,
|
|
111
121
|
max_retries=max_retries,
|
|
112
122
|
quiet=quiet,
|
|
123
|
+
is_group=is_group,
|
|
124
|
+
skip_success_message=skip_success_message,
|
|
113
125
|
)
|
|
114
126
|
except AIError:
|
|
115
127
|
# Re-raise AIError exceptions as-is to preserve error classification
|
|
@@ -117,3 +129,25 @@ def generate_commit_message(
|
|
|
117
129
|
except Exception as e:
|
|
118
130
|
logger.error(f"Failed to generate commit message: {e}")
|
|
119
131
|
raise AIError.model_error(f"Failed to generate commit message: {e}") from e
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
def generate_grouped_commits(
|
|
135
|
+
model: str,
|
|
136
|
+
prompt: list[dict[str, str]],
|
|
137
|
+
temperature: float,
|
|
138
|
+
max_tokens: int,
|
|
139
|
+
max_retries: int,
|
|
140
|
+
quiet: bool = False,
|
|
141
|
+
skip_success_message: bool = False,
|
|
142
|
+
) -> str:
|
|
143
|
+
"""Generate grouped commits JSON response."""
|
|
144
|
+
return generate_commit_message(
|
|
145
|
+
model=model,
|
|
146
|
+
prompt=prompt,
|
|
147
|
+
temperature=temperature,
|
|
148
|
+
max_tokens=max_tokens,
|
|
149
|
+
max_retries=max_retries,
|
|
150
|
+
quiet=quiet,
|
|
151
|
+
is_group=True,
|
|
152
|
+
skip_success_message=skip_success_message,
|
|
153
|
+
)
|