gac 1.10.2__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.
Files changed (53) hide show
  1. {gac-1.10.2 → gac-2.7.3}/PKG-INFO +91 -34
  2. gac-2.7.3/README.md +234 -0
  3. {gac-1.10.2 → gac-2.7.3}/pyproject.toml +1 -0
  4. {gac-1.10.2 → gac-2.7.3}/src/gac/__version__.py +1 -1
  5. {gac-1.10.2 → gac-2.7.3}/src/gac/ai.py +42 -2
  6. {gac-1.10.2 → gac-2.7.3}/src/gac/ai_utils.py +57 -15
  7. gac-2.7.3/src/gac/auth_cli.py +69 -0
  8. {gac-1.10.2 → gac-2.7.3}/src/gac/cli.py +40 -2
  9. {gac-1.10.2 → gac-2.7.3}/src/gac/config.py +6 -0
  10. {gac-1.10.2 → gac-2.7.3}/src/gac/constants.py +171 -2
  11. {gac-1.10.2 → gac-2.7.3}/src/gac/git.py +111 -12
  12. gac-2.7.3/src/gac/init_cli.py +483 -0
  13. gac-2.7.3/src/gac/language_cli.py +253 -0
  14. gac-2.7.3/src/gac/main.py +767 -0
  15. gac-2.7.3/src/gac/oauth/__init__.py +1 -0
  16. gac-2.7.3/src/gac/oauth/claude_code.py +397 -0
  17. {gac-1.10.2 → gac-2.7.3}/src/gac/preprocess.py +3 -3
  18. gac-2.7.3/src/gac/prompt.py +785 -0
  19. {gac-1.10.2 → gac-2.7.3}/src/gac/providers/__init__.py +14 -0
  20. gac-2.7.3/src/gac/providers/claude_code.py +102 -0
  21. gac-2.7.3/src/gac/providers/custom_anthropic.py +133 -0
  22. gac-2.7.3/src/gac/providers/custom_openai.py +99 -0
  23. gac-2.7.3/src/gac/providers/deepseek.py +38 -0
  24. {gac-1.10.2 → gac-2.7.3}/src/gac/providers/gemini.py +35 -22
  25. gac-2.7.3/src/gac/providers/minimax.py +38 -0
  26. gac-2.7.3/src/gac/providers/mistral.py +38 -0
  27. gac-2.7.3/src/gac/providers/together.py +38 -0
  28. {gac-1.10.2 → gac-2.7.3}/src/gac/security.py +1 -1
  29. gac-2.7.3/src/gac/utils.py +371 -0
  30. gac-2.7.3/src/gac/workflow_utils.py +134 -0
  31. gac-1.10.2/README.md +0 -178
  32. gac-1.10.2/src/gac/init_cli.py +0 -119
  33. gac-1.10.2/src/gac/main.py +0 -355
  34. gac-1.10.2/src/gac/prompt.py +0 -548
  35. gac-1.10.2/src/gac/utils.py +0 -132
  36. {gac-1.10.2 → gac-2.7.3}/.gitignore +0 -0
  37. {gac-1.10.2 → gac-2.7.3}/LICENSE +0 -0
  38. {gac-1.10.2 → gac-2.7.3}/src/gac/__init__.py +0 -0
  39. {gac-1.10.2 → gac-2.7.3}/src/gac/config_cli.py +0 -0
  40. {gac-1.10.2 → gac-2.7.3}/src/gac/diff_cli.py +0 -0
  41. {gac-1.10.2 → gac-2.7.3}/src/gac/errors.py +0 -0
  42. {gac-1.10.2 → gac-2.7.3}/src/gac/providers/anthropic.py +0 -0
  43. {gac-1.10.2 → gac-2.7.3}/src/gac/providers/cerebras.py +0 -0
  44. {gac-1.10.2 → gac-2.7.3}/src/gac/providers/chutes.py +0 -0
  45. {gac-1.10.2 → gac-2.7.3}/src/gac/providers/fireworks.py +0 -0
  46. {gac-1.10.2 → gac-2.7.3}/src/gac/providers/groq.py +0 -0
  47. {gac-1.10.2 → gac-2.7.3}/src/gac/providers/lmstudio.py +0 -0
  48. {gac-1.10.2 → gac-2.7.3}/src/gac/providers/ollama.py +0 -0
  49. {gac-1.10.2 → gac-2.7.3}/src/gac/providers/openai.py +0 -0
  50. {gac-1.10.2 → gac-2.7.3}/src/gac/providers/openrouter.py +0 -0
  51. {gac-1.10.2 → gac-2.7.3}/src/gac/providers/streamlake.py +0 -0
  52. {gac-1.10.2 → gac-2.7.3}/src/gac/providers/synthetic.py +0 -0
  53. {gac-1.10.2 → 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: 1.10.2
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,35 +53,41 @@ Description-Content-Type: text/markdown
49
53
  [![codecov](https://codecov.io/gh/cellwebb/gac/branch/main/graph/badge.svg)](https://app.codecov.io/gh/cellwebb/gac)
50
54
  [![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
51
55
  [![mypy](https://img.shields.io/badge/mypy-checked-blue.svg)](https://mypy-lang.org/)
52
- [![Contributions welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg)](docs/CONTRIBUTING.md)
56
+ [![Contributions welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg)](docs/en/CONTRIBUTING.md)
53
57
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
54
58
 
55
- **LLM-powered commit messages that understand your code.**
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
- **Tired of writing commit messages?** Replace `git commit -m "..."` with `gac` for contextual, well-formatted commit messages generated by large language models.
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
 
61
67
  ## What You Get
62
68
 
63
- Instead of generic messages like `"update stuff"`, `"fix bug"`, or `"add feature"`, you get intelligent, contextual messages that explain the **why** behind your changes:
69
+ Intelligent, contextual messages that explain the **why** behind your changes:
64
70
 
65
71
  ![GAC generating a contextual commit message](assets/gac-simple-usage.png)
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 # Configure your LLM provider
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 globally
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** • **Fireworks** • **Gemini**
95
- - **Groq** • **LM Studio** • **Ollama** • **OpenAI** • **OpenRouter**
96
- - **Streamlake** • **Synthetic.new** • **Z.AI** • **Z.AI Coding**
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**: Regenerate messages with specific requests like `r "make it shorter"` or `r "focus on the bug fix"`
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,21 +157,21 @@ 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
139
164
 
140
- | Command | Description |
141
- | --------------- | ---------------------------------------------- |
142
- | `gac` | Generate commit message |
143
- | `gac -y` | Auto-confirm (no review needed) |
144
- | `gac -a` | Stage all + commit |
145
- | `gac -o` | One-line message only |
146
- | `gac -v` | Detailed verbose format |
147
- | `gac -h "hint"` | Add context for LLM (e.g., `gac -h "bug fix"`) |
148
- | `gac -s` | Include scope (e.g., feat(auth):) |
149
- | `gac -p` | Commit and push |
165
+ | Command | Description |
166
+ | --------------- | ----------------------------------------------------------------------- |
167
+ | `gac` | Generate commit message |
168
+ | `gac -y` | Auto-confirm (no review needed) |
169
+ | `gac -a` | Stage all before generating commit message |
170
+ | `gac -o` | One-line message for trivial changes |
171
+ | `gac -v` | Verbose format with Motivation, Technical Approach, and Impact Analysis |
172
+ | `gac -h "hint"` | Add context for LLM (e.g., `gac -h "bug fix"`) |
173
+ | `gac -s` | Include scope (e.g., feat(auth):) |
174
+ | `gac -p` | Commit and push |
150
175
 
151
176
  ### Power User Examples
152
177
 
@@ -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 Reroll System
198
+ ### Interactive Feedback System
171
199
 
172
- Not happy with the result? Use the reroll feature for intelligent regeneration:
200
+ Not happy with the result? You have several options:
173
201
 
174
202
  ```bash
175
- # Simple regeneration (uses previous context)
203
+ # Simple reroll (no feedback)
176
204
  r
177
205
 
178
- # With specific feedback
179
- r make it shorter and focus on the performance improvement
180
- r use conventional commit format with scope
181
- r explain the security implications
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
- - **Troubleshooting**: [TROUBLESHOOTING.md](docs/TROUBLESHOOTING.md) - Common issues and solutions
205
- - **Contributing**: [CONTRIBUTING.md](docs/CONTRIBUTING.md) - Development setup and guidelines
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
 
gac-2.7.3/README.md ADDED
@@ -0,0 +1,234 @@
1
+ <!-- markdownlint-disable MD013 -->
2
+ <!-- markdownlint-disable MD033 MD036 -->
3
+
4
+ <div align="center">
5
+
6
+ # 🚀 Git Auto Commit (gac)
7
+
8
+ [![PyPI version](https://img.shields.io/pypi/v/gac.svg)](https://pypi.org/project/gac/)
9
+ [![Python](https://img.shields.io/badge/python-3.10%20|%203.11%20|%203.12%20|%203.13%20|%203.14-blue.svg)](https://www.python.org/downloads/)
10
+ [![Build Status](https://github.com/cellwebb/gac/actions/workflows/ci.yml/badge.svg)](https://github.com/cellwebb/gac/actions)
11
+ [![codecov](https://codecov.io/gh/cellwebb/gac/branch/main/graph/badge.svg)](https://app.codecov.io/gh/cellwebb/gac)
12
+ [![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
13
+ [![mypy](https://img.shields.io/badge/mypy-checked-blue.svg)](https://mypy-lang.org/)
14
+ [![Contributions welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg)](docs/en/CONTRIBUTING.md)
15
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
16
+
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!**
20
+
21
+ **Automate your commits!** Replace `git commit -m "..."` with `gac` for contextual, well-formatted commit messages generated by large language models!
22
+
23
+ ---
24
+
25
+ ## What You Get
26
+
27
+ Intelligent, contextual messages that explain the **why** behind your changes:
28
+
29
+ ![GAC generating a contextual commit message](assets/gac-simple-usage.png)
30
+
31
+ ---
32
+
33
+ </div>
34
+
35
+ <!-- markdownlint-enable MD033 MD036 -->
36
+
37
+ ## Quick Start
38
+
39
+ ### Use gac without installing
40
+
41
+ ```bash
42
+ uvx gac init # Configure your provider, model, and language
43
+ uvx gac # Generate and commit with LLM
44
+ ```
45
+
46
+ That's it! Review the generated message and confirm with `y`.
47
+
48
+ ### Install and use gac
49
+
50
+ ```bash
51
+ uv tool install gac
52
+ gac init
53
+ gac
54
+ ```
55
+
56
+ ### Upgrade installed gac
57
+
58
+ ```bash
59
+ uv tool upgrade gac
60
+ ```
61
+
62
+ ---
63
+
64
+ ## Key Features
65
+
66
+ ### 🌐 **Supported Providers**
67
+
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)**
72
+
73
+ ### 🧠 **Smart LLM Analysis**
74
+
75
+ - **Understands intent**: Analyzes code structure, logic, and patterns to understand the "why" behind your changes, not just what changed
76
+ - **Semantic awareness**: Recognizes refactoring, bug fixes, features, and breaking changes to generate contextually appropriate messages
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`
79
+
80
+ ### 📝 **Multiple Message Formats**
81
+
82
+ - **One-liner** (-o flag): Single-line commit message following conventional commit format
83
+ - **Standard** (default): Summary with bullet points explaining implementation details
84
+ - **Verbose** (-v flag): Comprehensive explanations including motivation, technical approach, and impact analysis
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
+
93
+ ### 💻 **Developer Experience**
94
+
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`
96
+ - **One-command workflows**: Complete workflows with flags like `gac -ayp` (stage all, auto-confirm, push)
97
+ - **Git integration**: Respects pre-commit and lefthook hooks, running them before expensive LLM operations
98
+
99
+ ### 🛡️ **Built-in Security**
100
+
101
+ - **Automatic secret detection**: Scans for API keys, passwords, and tokens before committing
102
+ - **Interactive protection**: Prompts before committing potentially sensitive data with clear remediation options
103
+ - **Smart filtering**: Ignores example files, template files, and placeholder text to reduce false positives
104
+
105
+ ---
106
+
107
+ ## Usage Examples
108
+
109
+ ### Basic Workflow
110
+
111
+ ```bash
112
+ # Stage your changes
113
+ git add .
114
+
115
+ # Generate and commit with LLM
116
+ gac
117
+
118
+ # Review → y (commit) | n (cancel) | r (reroll) | e (edit) | or type feedback
119
+ ```
120
+
121
+ ### Common Commands
122
+
123
+ | Command | Description |
124
+ | --------------- | ----------------------------------------------------------------------- |
125
+ | `gac` | Generate commit message |
126
+ | `gac -y` | Auto-confirm (no review needed) |
127
+ | `gac -a` | Stage all before generating commit message |
128
+ | `gac -o` | One-line message for trivial changes |
129
+ | `gac -v` | Verbose format with Motivation, Technical Approach, and Impact Analysis |
130
+ | `gac -h "hint"` | Add context for LLM (e.g., `gac -h "bug fix"`) |
131
+ | `gac -s` | Include scope (e.g., feat(auth):) |
132
+ | `gac -p` | Commit and push |
133
+
134
+ ### Power User Examples
135
+
136
+ ```bash
137
+ # Complete workflow in one command
138
+ gac -ayp -h "release preparation"
139
+
140
+ # Detailed explanation with scope
141
+ gac -v -s
142
+
143
+ # Quick one-liner for small changes
144
+ gac -o
145
+
146
+ # Group changes into logically related commits
147
+ gac -ag
148
+
149
+ # Debug what the LLM sees
150
+ gac --show-prompt
151
+
152
+ # Skip security scan (use carefully)
153
+ gac --skip-secret-scan
154
+ ```
155
+
156
+ ### Interactive Feedback System
157
+
158
+ Not happy with the result? You have several options:
159
+
160
+ ```bash
161
+ # Simple reroll (no feedback)
162
+ r
163
+
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
175
+ ```
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
+
184
+ ---
185
+
186
+ ## Configuration
187
+
188
+ Run `gac init` to configure your provider interactively, or set environment variables:
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
+
192
+ ```bash
193
+ # Example configuration
194
+ GAC_MODEL=anthropic:your-model-name
195
+ OPENAI_API_KEY=your_key_here
196
+ ANTHROPIC_API_KEY=your_key_here
197
+ ```
198
+
199
+ See `.gac.env.example` for all available options.
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
+
213
+ ---
214
+
215
+ ## Getting Help
216
+
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
221
+
222
+ ---
223
+
224
+ <!-- markdownlint-disable MD033 MD036 -->
225
+
226
+ <div align="center">
227
+
228
+ Made with ❤️ for developers who want better commit messages
229
+
230
+ [⭐ Star us on GitHub](https://github.com/cellwebb/gac) • [🐛 Report issues](https://github.com/cellwebb/gac/issues) • [📖 Full docs](docs/en/USAGE.md)
231
+
232
+ </div>
233
+
234
+ <!-- markdownlint-enable MD033 MD036 -->
@@ -41,6 +41,7 @@ dependencies = [
41
41
  "halo",
42
42
  "questionary",
43
43
  "rich>=14.1.0",
44
+ "prompt_toolkit>=3.0.36",
44
45
 
45
46
  ]
46
47
 
@@ -1,3 +1,3 @@
1
1
  """Version information for gac package."""
2
2
 
3
- __version__ = "1.10.2"
3
+ __version__ = "2.7.3"
@@ -13,15 +13,22 @@ 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,
19
+ call_deepseek_api,
16
20
  call_fireworks_api,
17
21
  call_gemini_api,
18
22
  call_groq_api,
19
23
  call_lmstudio_api,
24
+ call_minimax_api,
25
+ call_mistral_api,
20
26
  call_ollama_api,
21
27
  call_openai_api,
22
28
  call_openrouter_api,
23
29
  call_streamlake_api,
24
30
  call_synthetic_api,
31
+ call_together_api,
25
32
  call_zai_api,
26
33
  call_zai_coding_api,
27
34
  )
@@ -36,11 +43,13 @@ def generate_commit_message(
36
43
  max_tokens: int = EnvDefaults.MAX_OUTPUT_TOKENS,
37
44
  max_retries: int = EnvDefaults.MAX_RETRIES,
38
45
  quiet: bool = False,
46
+ is_group: bool = False,
47
+ skip_success_message: bool = False,
39
48
  ) -> str:
40
49
  """Generate a commit message using direct API calls to AI providers.
41
50
 
42
51
  Args:
43
- model: The model to use in provider:model_name format (e.g., 'anthropic:claude-3-5-haiku-latest')
52
+ model: The model to use in provider:model_name format (e.g., 'anthropic:claude-haiku-4-5')
44
53
  prompt: Either a string prompt (for backward compatibility) or tuple of (system_prompt, user_prompt)
45
54
  temperature: Controls randomness (0.0-1.0), lower values are more deterministic
46
55
  max_tokens: Maximum tokens in the response
@@ -54,7 +63,7 @@ def generate_commit_message(
54
63
  AIError: If generation fails after max_retries attempts
55
64
 
56
65
  Example:
57
- >>> model = "anthropic:claude-3-5-haiku-latest"
66
+ >>> model = "anthropic:claude-haiku-4-5"
58
67
  >>> system_prompt, user_prompt = build_prompt("On branch main", "diff --git a/README.md b/README.md")
59
68
  >>> generate_commit_message(model, (system_prompt, user_prompt))
60
69
  'docs: Update README with installation instructions'
@@ -80,16 +89,23 @@ def generate_commit_message(
80
89
  provider_funcs = {
81
90
  "anthropic": call_anthropic_api,
82
91
  "cerebras": call_cerebras_api,
92
+ "claude-code": call_claude_code_api,
83
93
  "chutes": call_chutes_api,
94
+ "custom-anthropic": call_custom_anthropic_api,
95
+ "custom-openai": call_custom_openai_api,
96
+ "deepseek": call_deepseek_api,
84
97
  "fireworks": call_fireworks_api,
85
98
  "gemini": call_gemini_api,
86
99
  "groq": call_groq_api,
87
100
  "lm-studio": call_lmstudio_api,
101
+ "minimax": call_minimax_api,
102
+ "mistral": call_mistral_api,
88
103
  "ollama": call_ollama_api,
89
104
  "openai": call_openai_api,
90
105
  "openrouter": call_openrouter_api,
91
106
  "streamlake": call_streamlake_api,
92
107
  "synthetic": call_synthetic_api,
108
+ "together": call_together_api,
93
109
  "zai": call_zai_api,
94
110
  "zai-coding": call_zai_coding_api,
95
111
  }
@@ -104,6 +120,8 @@ def generate_commit_message(
104
120
  max_tokens=max_tokens,
105
121
  max_retries=max_retries,
106
122
  quiet=quiet,
123
+ is_group=is_group,
124
+ skip_success_message=skip_success_message,
107
125
  )
108
126
  except AIError:
109
127
  # Re-raise AIError exceptions as-is to preserve error classification
@@ -111,3 +129,25 @@ def generate_commit_message(
111
129
  except Exception as e:
112
130
  logger.error(f"Failed to generate commit message: {e}")
113
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
+ )