gac 1.9.4__tar.gz → 1.9.5__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.

Potentially problematic release.


This version of gac might be problematic. Click here for more details.

Files changed (37) hide show
  1. gac-1.9.5/PKG-INFO +226 -0
  2. gac-1.9.5/README.md +184 -0
  3. {gac-1.9.4 → gac-1.9.5}/pyproject.toml +3 -8
  4. {gac-1.9.4 → gac-1.9.5}/src/gac/__version__.py +1 -1
  5. {gac-1.9.4 → gac-1.9.5}/src/gac/main.py +6 -1
  6. gac-1.9.4/PKG-INFO +0 -246
  7. gac-1.9.4/README.md +0 -202
  8. {gac-1.9.4 → gac-1.9.5}/.gitignore +0 -0
  9. {gac-1.9.4 → gac-1.9.5}/LICENSE +0 -0
  10. {gac-1.9.4 → gac-1.9.5}/src/gac/__init__.py +0 -0
  11. {gac-1.9.4 → gac-1.9.5}/src/gac/ai.py +0 -0
  12. {gac-1.9.4 → gac-1.9.5}/src/gac/ai_utils.py +0 -0
  13. {gac-1.9.4 → gac-1.9.5}/src/gac/cli.py +0 -0
  14. {gac-1.9.4 → gac-1.9.5}/src/gac/config.py +0 -0
  15. {gac-1.9.4 → gac-1.9.5}/src/gac/config_cli.py +0 -0
  16. {gac-1.9.4 → gac-1.9.5}/src/gac/constants.py +0 -0
  17. {gac-1.9.4 → gac-1.9.5}/src/gac/diff_cli.py +0 -0
  18. {gac-1.9.4 → gac-1.9.5}/src/gac/errors.py +0 -0
  19. {gac-1.9.4 → gac-1.9.5}/src/gac/git.py +0 -0
  20. {gac-1.9.4 → gac-1.9.5}/src/gac/init_cli.py +0 -0
  21. {gac-1.9.4 → gac-1.9.5}/src/gac/preprocess.py +0 -0
  22. {gac-1.9.4 → gac-1.9.5}/src/gac/prompt.py +0 -0
  23. {gac-1.9.4 → gac-1.9.5}/src/gac/providers/__init__.py +0 -0
  24. {gac-1.9.4 → gac-1.9.5}/src/gac/providers/anthropic.py +0 -0
  25. {gac-1.9.4 → gac-1.9.5}/src/gac/providers/cerebras.py +0 -0
  26. {gac-1.9.4 → gac-1.9.5}/src/gac/providers/chutes.py +0 -0
  27. {gac-1.9.4 → gac-1.9.5}/src/gac/providers/gemini.py +0 -0
  28. {gac-1.9.4 → gac-1.9.5}/src/gac/providers/groq.py +0 -0
  29. {gac-1.9.4 → gac-1.9.5}/src/gac/providers/lmstudio.py +0 -0
  30. {gac-1.9.4 → gac-1.9.5}/src/gac/providers/ollama.py +0 -0
  31. {gac-1.9.4 → gac-1.9.5}/src/gac/providers/openai.py +0 -0
  32. {gac-1.9.4 → gac-1.9.5}/src/gac/providers/openrouter.py +0 -0
  33. {gac-1.9.4 → gac-1.9.5}/src/gac/providers/streamlake.py +0 -0
  34. {gac-1.9.4 → gac-1.9.5}/src/gac/providers/synthetic.py +0 -0
  35. {gac-1.9.4 → gac-1.9.5}/src/gac/providers/zai.py +0 -0
  36. {gac-1.9.4 → gac-1.9.5}/src/gac/security.py +0 -0
  37. {gac-1.9.4 → gac-1.9.5}/src/gac/utils.py +0 -0
gac-1.9.5/PKG-INFO ADDED
@@ -0,0 +1,226 @@
1
+ Metadata-Version: 2.4
2
+ Name: gac
3
+ Version: 1.9.5
4
+ Summary: LLM-powered Git commit message generator with multi-provider support
5
+ Project-URL: Homepage, https://github.com/cellwebb/gac
6
+ Project-URL: Documentation, https://github.com/cellwebb/gac#readme
7
+ Project-URL: Repository, https://github.com/cellwebb/gac.git
8
+ Project-URL: Issues, https://github.com/cellwebb/gac/issues
9
+ Project-URL: Changelog, https://github.com/cellwebb/gac/blob/main/CHANGELOG.md
10
+ Project-URL: Source, https://github.com/cellwebb/gac
11
+ Author-email: cellwebb <cellwebb@users.noreply.github.com>
12
+ License-Expression: MIT
13
+ License-File: LICENSE
14
+ Classifier: Development Status :: 4 - Beta
15
+ Classifier: Programming Language :: Python
16
+ Classifier: Programming Language :: Python :: 3.10
17
+ Classifier: Programming Language :: Python :: 3.11
18
+ Classifier: Programming Language :: Python :: 3.12
19
+ Classifier: Programming Language :: Python :: 3.13
20
+ Classifier: Programming Language :: Python :: 3.14
21
+ Classifier: Programming Language :: Python :: Implementation :: CPython
22
+ Classifier: Programming Language :: Python :: Implementation :: PyPy
23
+ Requires-Python: >=3.10
24
+ Requires-Dist: click>=8.3.0
25
+ Requires-Dist: halo
26
+ Requires-Dist: httpcore>=1.0.9
27
+ Requires-Dist: httpx>=0.28.0
28
+ Requires-Dist: pydantic>=2.12.0
29
+ Requires-Dist: python-dotenv>=1.1.1
30
+ Requires-Dist: questionary
31
+ Requires-Dist: rich>=14.1.0
32
+ Requires-Dist: tiktoken>=0.12.0
33
+ Provides-Extra: dev
34
+ Requires-Dist: build; extra == 'dev'
35
+ Requires-Dist: codecov; extra == 'dev'
36
+ Requires-Dist: pre-commit; extra == 'dev'
37
+ Requires-Dist: pytest; extra == 'dev'
38
+ Requires-Dist: pytest-cov; extra == 'dev'
39
+ Requires-Dist: ruff; extra == 'dev'
40
+ Requires-Dist: twine; extra == 'dev'
41
+ Description-Content-Type: text/markdown
42
+
43
+ <!-- markdownlint-disable MD013 -->
44
+
45
+ # 🚀 Git Auto Commit (gac)
46
+
47
+ [![PyPI version](https://img.shields.io/pypi/v/gac.svg)](https://pypi.org/project/gac/)
48
+ [![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/)
49
+ [![Build Status](https://github.com/cellwebb/gac/actions/workflows/ci.yml/badge.svg)](https://github.com/cellwebb/gac/actions)
50
+ [![codecov](https://codecov.io/gh/cellwebb/gac/branch/main/graph/badge.svg)](https://app.codecov.io/gh/cellwebb/gac)
51
+ [![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)
52
+ [![mypy](https://img.shields.io/badge/mypy-checked-blue.svg)](https://mypy-lang.org/)
53
+ [![Contributions welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg)](docs/CONTRIBUTING.md)
54
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
55
+
56
+ **LLM-powered commit messages that understand your code.**
57
+
58
+ **Tired of writing commit messages?** Replace `git commit -m "..."` with `gac` for contextual, well-formatted commit messages generated by large language models.
59
+
60
+ ---
61
+
62
+ ## What You Get
63
+
64
+ Instead of generic messages like `"update stuff"`, `"fix bug"`, or `"add feature"`, you get intelligent, contextual messages that explain the **why** behind your changes:
65
+
66
+ ![GAC generating a contextual commit message](assets/gac-simple-usage.png)
67
+
68
+ ---
69
+
70
+ ## Quick Start
71
+
72
+ ### Install & Use
73
+
74
+ ```bash
75
+ # 1. Install globally
76
+ uv tool install gac
77
+
78
+ # 2. Configure your LLM provider
79
+ gac init
80
+
81
+ # 3. Use on your staged changes
82
+ git add .
83
+ gac
84
+ ```
85
+
86
+ That's it! Review the generated message and confirm with `y`.
87
+
88
+ ### Use without installing
89
+
90
+ ```bash
91
+ uvx gac init
92
+ uvx gac
93
+ ```
94
+
95
+ ---
96
+
97
+ ## Key Features
98
+
99
+ ### **Supported Providers**
100
+
101
+ - **Anthropic** • **Cerebras** • **Chutes.ai** • **Gemini** • **Groq**
102
+ - **LM Studio** • **Ollama** • **OpenAI** • **OpenRouter**
103
+ - **Streamlake** • **Synthetic.new** • **Z.AI** • **Z.AI Coding**
104
+
105
+ ### **Smart LLM Analysis**
106
+
107
+ - **Understands intent**: Analyzes code structure, logic, and patterns to understand the "why" behind your changes, not just what changed
108
+ - **Semantic awareness**: Recognizes refactoring, bug fixes, features, and breaking changes to generate contextually appropriate messages
109
+ - **Intelligent filtering**: Prioritizes meaningful changes while ignoring generated files, dependencies, and artifacts
110
+
111
+ ### **Multiple Message Formats**
112
+
113
+ - **One-liner** (-o flag): Single-line commit message following conventional commit format
114
+ - **Standard** (default): Summary with bullet points explaining implementation details
115
+ - **Verbose** (-v flag): Comprehensive explanations including motivation, technical approach, and impact analysis
116
+
117
+ ### **Developer Experience**
118
+
119
+ - **Interactive feedback**: Regenerate messages with specific requests like `r "make it shorter"` or `r "focus on the bug fix"`
120
+ - **One-command workflows**: Complete workflows with flags like `gac -ayp` (stage all, auto-confirm, push)
121
+ - **Git integration**: Respects pre-commit and lefthook hooks, running them before expensive LLM operations
122
+
123
+ ### **Built-in Security**
124
+
125
+ - **Automatic secret detection**: Scans for API keys, passwords, and tokens before committing
126
+ - **Interactive protection**: Prompts before committing potentially sensitive data with clear remediation options
127
+ - **Smart filtering**: Ignores example files, template files, and placeholder text to reduce false positives
128
+
129
+ ---
130
+
131
+ ## Usage Examples
132
+
133
+ ### Basic Workflow
134
+
135
+ ```bash
136
+ # Stage your changes
137
+ git add .
138
+
139
+ # Generate and commit with LLM
140
+ gac
141
+
142
+ # Review → y (commit) | n (cancel) | r (reroll)
143
+ ```
144
+
145
+ ### Common Commands
146
+
147
+ | Command | Description |
148
+ | --------------- | ---------------------------------------------- |
149
+ | `gac` | Generate commit message |
150
+ | `gac -y` | Auto-confirm (no review needed) |
151
+ | `gac -a` | Stage all + commit |
152
+ | `gac -o` | One-line message only |
153
+ | `gac -v` | Detailed verbose format |
154
+ | `gac -h "hint"` | Add context for LLM (e.g., `gac -h "bug fix"`) |
155
+ | `gac -s` | Include scope (e.g., feat(auth):) |
156
+ | `gac -p` | Commit and push |
157
+
158
+ ### Power User Examples
159
+
160
+ ```bash
161
+ # Complete workflow in one command
162
+ gac -ayp -h "release preparation"
163
+
164
+ # Detailed explanation with scope
165
+ gac -v -s
166
+
167
+ # Quick one-liner for small changes
168
+ gac -o
169
+
170
+ # Debug what the LLM sees
171
+ gac --show-prompt
172
+
173
+ # Skip security scan (use carefully)
174
+ gac --skip-secret-scan
175
+ ```
176
+
177
+ ### Interactive Reroll System
178
+
179
+ Not happy with the result? Use the reroll feature for intelligent regeneration:
180
+
181
+ ```bash
182
+ # Simple regeneration (uses previous context)
183
+ r
184
+
185
+ # With specific feedback
186
+ r make it shorter and focus on the performance improvement
187
+ r use conventional commit format with scope
188
+ r explain the security implications
189
+ ```
190
+
191
+ ---
192
+
193
+ ## Configuration
194
+
195
+ Run `gac init` to configure your provider interactively, or set environment variables:
196
+
197
+ ```bash
198
+ # Example configuration
199
+ GAC_MODEL=anthropic:your-model-name
200
+ OPENAI_API_KEY=your_key_here
201
+ ANTHROPIC_API_KEY=your_key_here
202
+ ```
203
+
204
+ See `.gac.env.example` for all available options.
205
+
206
+ ---
207
+
208
+ ## Getting Help
209
+
210
+ - **Full documentation**: [USAGE.md](USAGE.md) - Complete CLI reference
211
+ - **Troubleshooting**: [TROUBLESHOOTING.md](docs/TROUBLESHOOTING.md) - Common issues and solutions
212
+ - **Contributing**: [CONTRIBUTING.md](docs/CONTRIBUTING.md) - Development setup and guidelines
213
+
214
+ ---
215
+
216
+ <!-- markdownlint-disable MD033 MD036 -->
217
+
218
+ <div align="center">
219
+
220
+ Made with ❤️ for developers who want better commit messages
221
+
222
+ [⭐ Star us on GitHub](https://github.com/cellwebb/gac) • [🐛 Report issues](https://github.com/cellwebb/gac/issues) • [📖 Full docs](USAGE.md)
223
+
224
+ </div>
225
+
226
+ <!-- markdownlint-enable MD033 MD036 -->
gac-1.9.5/README.md ADDED
@@ -0,0 +1,184 @@
1
+ <!-- markdownlint-disable MD013 -->
2
+
3
+ # 🚀 Git Auto Commit (gac)
4
+
5
+ [![PyPI version](https://img.shields.io/pypi/v/gac.svg)](https://pypi.org/project/gac/)
6
+ [![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/)
7
+ [![Build Status](https://github.com/cellwebb/gac/actions/workflows/ci.yml/badge.svg)](https://github.com/cellwebb/gac/actions)
8
+ [![codecov](https://codecov.io/gh/cellwebb/gac/branch/main/graph/badge.svg)](https://app.codecov.io/gh/cellwebb/gac)
9
+ [![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)
10
+ [![mypy](https://img.shields.io/badge/mypy-checked-blue.svg)](https://mypy-lang.org/)
11
+ [![Contributions welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg)](docs/CONTRIBUTING.md)
12
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
13
+
14
+ **LLM-powered commit messages that understand your code.**
15
+
16
+ **Tired of writing commit messages?** Replace `git commit -m "..."` with `gac` for contextual, well-formatted commit messages generated by large language models.
17
+
18
+ ---
19
+
20
+ ## What You Get
21
+
22
+ Instead of generic messages like `"update stuff"`, `"fix bug"`, or `"add feature"`, you get intelligent, contextual messages that explain the **why** behind your changes:
23
+
24
+ ![GAC generating a contextual commit message](assets/gac-simple-usage.png)
25
+
26
+ ---
27
+
28
+ ## Quick Start
29
+
30
+ ### Install & Use
31
+
32
+ ```bash
33
+ # 1. Install globally
34
+ uv tool install gac
35
+
36
+ # 2. Configure your LLM provider
37
+ gac init
38
+
39
+ # 3. Use on your staged changes
40
+ git add .
41
+ gac
42
+ ```
43
+
44
+ That's it! Review the generated message and confirm with `y`.
45
+
46
+ ### Use without installing
47
+
48
+ ```bash
49
+ uvx gac init
50
+ uvx gac
51
+ ```
52
+
53
+ ---
54
+
55
+ ## Key Features
56
+
57
+ ### **Supported Providers**
58
+
59
+ - **Anthropic** • **Cerebras** • **Chutes.ai** • **Gemini** • **Groq**
60
+ - **LM Studio** • **Ollama** • **OpenAI** • **OpenRouter**
61
+ - **Streamlake** • **Synthetic.new** • **Z.AI** • **Z.AI Coding**
62
+
63
+ ### **Smart LLM Analysis**
64
+
65
+ - **Understands intent**: Analyzes code structure, logic, and patterns to understand the "why" behind your changes, not just what changed
66
+ - **Semantic awareness**: Recognizes refactoring, bug fixes, features, and breaking changes to generate contextually appropriate messages
67
+ - **Intelligent filtering**: Prioritizes meaningful changes while ignoring generated files, dependencies, and artifacts
68
+
69
+ ### **Multiple Message Formats**
70
+
71
+ - **One-liner** (-o flag): Single-line commit message following conventional commit format
72
+ - **Standard** (default): Summary with bullet points explaining implementation details
73
+ - **Verbose** (-v flag): Comprehensive explanations including motivation, technical approach, and impact analysis
74
+
75
+ ### **Developer Experience**
76
+
77
+ - **Interactive feedback**: Regenerate messages with specific requests like `r "make it shorter"` or `r "focus on the bug fix"`
78
+ - **One-command workflows**: Complete workflows with flags like `gac -ayp` (stage all, auto-confirm, push)
79
+ - **Git integration**: Respects pre-commit and lefthook hooks, running them before expensive LLM operations
80
+
81
+ ### **Built-in Security**
82
+
83
+ - **Automatic secret detection**: Scans for API keys, passwords, and tokens before committing
84
+ - **Interactive protection**: Prompts before committing potentially sensitive data with clear remediation options
85
+ - **Smart filtering**: Ignores example files, template files, and placeholder text to reduce false positives
86
+
87
+ ---
88
+
89
+ ## Usage Examples
90
+
91
+ ### Basic Workflow
92
+
93
+ ```bash
94
+ # Stage your changes
95
+ git add .
96
+
97
+ # Generate and commit with LLM
98
+ gac
99
+
100
+ # Review → y (commit) | n (cancel) | r (reroll)
101
+ ```
102
+
103
+ ### Common Commands
104
+
105
+ | Command | Description |
106
+ | --------------- | ---------------------------------------------- |
107
+ | `gac` | Generate commit message |
108
+ | `gac -y` | Auto-confirm (no review needed) |
109
+ | `gac -a` | Stage all + commit |
110
+ | `gac -o` | One-line message only |
111
+ | `gac -v` | Detailed verbose format |
112
+ | `gac -h "hint"` | Add context for LLM (e.g., `gac -h "bug fix"`) |
113
+ | `gac -s` | Include scope (e.g., feat(auth):) |
114
+ | `gac -p` | Commit and push |
115
+
116
+ ### Power User Examples
117
+
118
+ ```bash
119
+ # Complete workflow in one command
120
+ gac -ayp -h "release preparation"
121
+
122
+ # Detailed explanation with scope
123
+ gac -v -s
124
+
125
+ # Quick one-liner for small changes
126
+ gac -o
127
+
128
+ # Debug what the LLM sees
129
+ gac --show-prompt
130
+
131
+ # Skip security scan (use carefully)
132
+ gac --skip-secret-scan
133
+ ```
134
+
135
+ ### Interactive Reroll System
136
+
137
+ Not happy with the result? Use the reroll feature for intelligent regeneration:
138
+
139
+ ```bash
140
+ # Simple regeneration (uses previous context)
141
+ r
142
+
143
+ # With specific feedback
144
+ r make it shorter and focus on the performance improvement
145
+ r use conventional commit format with scope
146
+ r explain the security implications
147
+ ```
148
+
149
+ ---
150
+
151
+ ## Configuration
152
+
153
+ Run `gac init` to configure your provider interactively, or set environment variables:
154
+
155
+ ```bash
156
+ # Example configuration
157
+ GAC_MODEL=anthropic:your-model-name
158
+ OPENAI_API_KEY=your_key_here
159
+ ANTHROPIC_API_KEY=your_key_here
160
+ ```
161
+
162
+ See `.gac.env.example` for all available options.
163
+
164
+ ---
165
+
166
+ ## Getting Help
167
+
168
+ - **Full documentation**: [USAGE.md](USAGE.md) - Complete CLI reference
169
+ - **Troubleshooting**: [TROUBLESHOOTING.md](docs/TROUBLESHOOTING.md) - Common issues and solutions
170
+ - **Contributing**: [CONTRIBUTING.md](docs/CONTRIBUTING.md) - Development setup and guidelines
171
+
172
+ ---
173
+
174
+ <!-- markdownlint-disable MD033 MD036 -->
175
+
176
+ <div align="center">
177
+
178
+ Made with ❤️ for developers who want better commit messages
179
+
180
+ [⭐ Star us on GitHub](https://github.com/cellwebb/gac) • [🐛 Report issues](https://github.com/cellwebb/gac/issues) • [📖 Full docs](USAGE.md)
181
+
182
+ </div>
183
+
184
+ <!-- markdownlint-enable MD033 MD036 -->
@@ -5,7 +5,7 @@ build-backend = "hatchling.build"
5
5
  [project]
6
6
  name = "gac"
7
7
  dynamic = ["version"]
8
- description = "AI-powered Git commit message generator with multi-provider support"
8
+ description = "LLM-powered Git commit message generator with multi-provider support"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10"
11
11
  license = "MIT"
@@ -25,13 +25,10 @@ classifiers = [
25
25
  "Programming Language :: Python :: Implementation :: PyPy",
26
26
  ]
27
27
  dependencies = [
28
- # HTTP client for AI provider APIs
28
+ # HTTP client for LLM provider APIs
29
29
  "httpx>=0.28.0",
30
30
  "httpcore>=1.0.9", # Required for Python 3.14 compatibility
31
31
 
32
- # Anthropic SDK (token counting)
33
- "anthropic>=0.68.0",
34
-
35
32
  # Token counting (OpenAI models)
36
33
  "tiktoken>=0.12.0",
37
34
 
@@ -45,8 +42,6 @@ dependencies = [
45
42
  "questionary",
46
43
  "rich>=14.1.0",
47
44
 
48
- # Summarization and document processing
49
- "sumy",
50
45
  ]
51
46
 
52
47
  [project.scripts]
@@ -136,7 +131,7 @@ include = [
136
131
 
137
132
  [tool.hatch.envs.default]
138
133
  dependencies = [
139
- # AI components
134
+ # LLM components
140
135
  "anthropic",
141
136
  "openai",
142
137
  "groq",
@@ -1,3 +1,3 @@
1
1
  """Version information for gac package."""
2
2
 
3
- __version__ = "1.9.4"
3
+ __version__ = "1.9.5"
@@ -294,12 +294,17 @@ def main(
294
294
  # No hint given, just reroll with same prompts
295
295
  reroll_system_prompt, reroll_user_prompt = system_prompt, user_prompt
296
296
 
297
+ # Update prompts and recalculate token count for the next generation
298
+ system_prompt = reroll_system_prompt
299
+ user_prompt = reroll_user_prompt
300
+ prompt_tokens = count_tokens(system_prompt, model) + count_tokens(user_prompt, model)
301
+
297
302
  console.print() # Add blank line for readability
298
303
 
299
304
  # Generate new message
300
305
  commit_message = generate_commit_message(
301
306
  model=model,
302
- prompt=(reroll_system_prompt, reroll_user_prompt),
307
+ prompt=(system_prompt, user_prompt),
303
308
  temperature=temperature,
304
309
  max_tokens=max_output_tokens,
305
310
  max_retries=max_retries,
gac-1.9.4/PKG-INFO DELETED
@@ -1,246 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: gac
3
- Version: 1.9.4
4
- Summary: AI-powered Git commit message generator with multi-provider support
5
- Project-URL: Homepage, https://github.com/cellwebb/gac
6
- Project-URL: Documentation, https://github.com/cellwebb/gac#readme
7
- Project-URL: Repository, https://github.com/cellwebb/gac.git
8
- Project-URL: Issues, https://github.com/cellwebb/gac/issues
9
- Project-URL: Changelog, https://github.com/cellwebb/gac/blob/main/CHANGELOG.md
10
- Project-URL: Source, https://github.com/cellwebb/gac
11
- Author-email: cellwebb <cellwebb@users.noreply.github.com>
12
- License-Expression: MIT
13
- License-File: LICENSE
14
- Classifier: Development Status :: 4 - Beta
15
- Classifier: Programming Language :: Python
16
- Classifier: Programming Language :: Python :: 3.10
17
- Classifier: Programming Language :: Python :: 3.11
18
- Classifier: Programming Language :: Python :: 3.12
19
- Classifier: Programming Language :: Python :: 3.13
20
- Classifier: Programming Language :: Python :: 3.14
21
- Classifier: Programming Language :: Python :: Implementation :: CPython
22
- Classifier: Programming Language :: Python :: Implementation :: PyPy
23
- Requires-Python: >=3.10
24
- Requires-Dist: anthropic>=0.68.0
25
- Requires-Dist: click>=8.3.0
26
- Requires-Dist: halo
27
- Requires-Dist: httpcore>=1.0.9
28
- Requires-Dist: httpx>=0.28.0
29
- Requires-Dist: pydantic>=2.12.0
30
- Requires-Dist: python-dotenv>=1.1.1
31
- Requires-Dist: questionary
32
- Requires-Dist: rich>=14.1.0
33
- Requires-Dist: sumy
34
- Requires-Dist: tiktoken>=0.12.0
35
- Provides-Extra: dev
36
- Requires-Dist: build; extra == 'dev'
37
- Requires-Dist: codecov; extra == 'dev'
38
- Requires-Dist: pre-commit; extra == 'dev'
39
- Requires-Dist: pytest; extra == 'dev'
40
- Requires-Dist: pytest-cov; extra == 'dev'
41
- Requires-Dist: ruff; extra == 'dev'
42
- Requires-Dist: twine; extra == 'dev'
43
- Description-Content-Type: text/markdown
44
-
45
- <!-- markdownlint-disable MD013 -->
46
-
47
- # Git Auto Commit (gac)
48
-
49
- [![PyPI version](https://img.shields.io/pypi/v/gac.svg)](https://pypi.org/project/gac/)
50
- [![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/)
51
- [![Build Status](https://github.com/cellwebb/gac/actions/workflows/ci.yml/badge.svg)](https://github.com/cellwebb/gac/actions)
52
- [![codecov](https://codecov.io/gh/cellwebb/gac/branch/main/graph/badge.svg)](https://app.codecov.io/gh/cellwebb/gac)
53
- [![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)
54
- [![mypy](https://img.shields.io/badge/mypy-checked-blue.svg)](https://mypy-lang.org/)
55
- [![Contributions welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg)](docs/CONTRIBUTING.md)
56
- [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
57
-
58
- ## Features
59
-
60
- - **LLM-Powered Commit Messages:** Automatically generates clear, concise, and context-aware commit messages using large language models.
61
- - **Deep Contextual Analysis:** Understands your code by analyzing staged changes, repository structure, and recent commit history to provide highly relevant suggestions.
62
- - **Multi-Provider & Model Support:** Flexibly works with leading AI providers (Anthropic, Cerebras, Chutes.ai, Gemini, Groq, OpenAI, OpenRouter, Streamlake/Vanchin, Synthetic.new, & Z.AI) and local providers (LM Studio & Ollama), easily configured through an interactive setup or environment variables.
63
- - **Seamless Git Workflow:** Integrates smoothly into your existing Git routine as a simple drop-in replacement for `git commit`.
64
- - **Extensive Customization:** Tailor commit messages to your needs with a rich set of flags, including one-liners (`-o`), detailed verbose messages (`-v`), AI hints (`-h`), scope inference (`-s`), and specific model selection (`-m`).
65
- - **Streamlined Workflow Commands:** Boost your productivity with convenient options to stage all changes (`-a`), auto-confirm commits (`-y`), and push to your remote repository (`-p`) in a single step.
66
- - **Interactive Reroll with Feedback:** Not satisfied with the generated commit message? Use `r` for a simple regeneration, or `r <feedback>` to provide specific improvement suggestions (e.g., `r make it shorter`, `r focus on the bug fix`).
67
- - **Token Usage Tracking:** Display token consumption statistics (prompt, completion, and total tokens).
68
- - **Security Scanner:** Built-in detection of secrets and API keys in staged changes to prevent accidental commits of sensitive information.
69
-
70
- ## How It Works
71
-
72
- gac analyzes your staged changes to generate high-quality commit messages with the help of large language models. The tool uses a sophisticated prompt architecture that separates system instructions from user data, enabling better AI understanding and more consistent results.
73
-
74
- ## How to Use
75
-
76
- ```sh
77
- git add .
78
- gac
79
- ```
80
-
81
- ![Simple gac Usage](assets/gac-simple-usage.png)
82
-
83
- ## Installation and Configuration
84
-
85
- ### 1. Installation
86
-
87
- #### Quick Try with uvx (no installation)
88
-
89
- You can try gac without installing it using uvx:
90
-
91
- ```sh
92
- # Try gac without installation
93
- uvx gac --help
94
-
95
- # Set up configuration (creates ~/.gac.env)
96
- uvx gac init
97
-
98
- # Use gac on staged changes
99
- git add .
100
- uvx gac
101
- ```
102
-
103
- #### Permanent Installation
104
-
105
- Install system-wide using pipx from the GitHub repository:
106
-
107
- ```sh
108
- # Install pipx if you don't have it
109
- python3 -m pip install --user pipx
110
- python3 -m pipx ensurepath
111
-
112
- # Install gac
113
- pipx install gac
114
- ```
115
-
116
- Verify installation:
117
-
118
- ```sh
119
- gac --version
120
- ```
121
-
122
- ### 2. Configuration
123
-
124
- The recommended way to configure `gac` is using the interactive setup:
125
-
126
- ```sh
127
- gac init
128
- ```
129
-
130
- This command will guide you through selecting an AI provider, model, and securely entering your API keys. It will create or update a user-level configuration file at `$HOME/.gac.env`.
131
-
132
- Example `$HOME/.gac.env` output:
133
-
134
- ```env
135
- GAC_MODEL=anthropic:claude-3-5-haiku-latest
136
- ANTHROPIC_API_KEY=your_anthropic_key_here
137
- ```
138
-
139
- Alternatively, you can configure `gac` using environment variables or by manually creating/editing the configuration file.
140
-
141
- #### Managing Configuration with `gac config`
142
-
143
- You can manage settings in your `$HOME/.gac.env` file using `gac config` commands:
144
-
145
- - Streamlake uses inference endpoint IDs instead of model names. When prompted, paste the exact endpoint ID from the Streamlake console.
146
- - For local providers like Ollama and LM Studio, gac will ask for the base API URL. API keys are optional for these providers unless your instance requires authentication.
147
-
148
- - Show config: `gac config show`
149
- - Set a value: `gac config set GAC_MODEL groq:meta-llama/llama-4-scout-17b-16e-instruct`
150
- - Get a value: `gac config get GAC_MODEL`
151
- - Unset a value: `gac config unset GAC_MODEL`
152
-
153
- ### 3. Verify Setup
154
-
155
- Test that `gac` is working properly with your configuration:
156
-
157
- ```sh
158
- # Make a change to a file
159
- echo "# Test change" >> README.md
160
- git add README.md
161
- gac -o # Generate a one-line commit message
162
- ```
163
-
164
- You should see an AI-generated commit message.
165
-
166
- ### 4. Upgrade
167
-
168
- To upgrade `gac` to the latest version, run:
169
-
170
- ```sh
171
- pipx upgrade gac
172
- ```
173
-
174
- ## Basic Usage
175
-
176
- Once installed and configured, using `gac` is straightforward:
177
-
178
- 1. Stage your changes:
179
-
180
- ```sh
181
- git add .
182
- ```
183
-
184
- 2. Run `gac`:
185
-
186
- ```sh
187
- gac
188
- ```
189
-
190
- This will generate a commit message for review. Confirm with `y` to accept the message.
191
-
192
- ### Common Commands
193
-
194
- - Generate a commit message: `gac`
195
- - Auto-accept the commit message: `gac -y`
196
- - Stage all changes and generate a commit message: `gac -a`
197
- - Generate a one-line commit message: `gac -o`
198
- - Add a hint for the AI: `gac -h "Fixed the authentication bug"`
199
- - Push the commit (requires accepting the commit message): `gac -p`
200
- - Advanced usage: Add all, auto-confirm, push a one-liner with a hint: `gac -aypo -h "update for release"`
201
- - Skip security scan: `gac --skip-secret-scan` (use with caution)
202
-
203
- ### Security Features
204
-
205
- GAC includes a built-in security scanner to prevent accidental commits of sensitive information:
206
-
207
- - **Automatic Scanning**: By default, scans all staged changes for potential secrets and API keys
208
- - **Interactive Protection**: When secrets are detected, you can:
209
- - Abort the commit (recommended)
210
- - Continue anyway (not recommended)
211
- - Remove affected files and continue
212
- - **Wide Coverage**: Detects AWS keys, GitHub tokens, OpenAI API keys, database URLs, private keys, and more
213
- - **Smart Filtering**: Ignores example keys, placeholders, and test values to reduce false positives
214
-
215
- To disable the security scan (not recommended unless you know what you're doing):
216
-
217
- ```sh
218
- # Skip scan for one command
219
- gac --skip-secret-scan
220
-
221
- # Or disable via environment variable
222
- export GAC_SKIP_SECRET_SCAN=true
223
- gac
224
- ```
225
-
226
- For a full list of CLI flags, advanced options, and example workflows, see [USAGE.md](USAGE.md).
227
-
228
- ## Best Practices
229
-
230
- - gac loads configuration from two locations (in order of precedence):
231
- 1. User-level `$HOME/.gac.env` (applies to all projects for the user)
232
- 2. Project-level `.env` (in the project root, overrides user config if present) Environment variables always take final precedence over both files.
233
- - Keep API keys out of version control
234
- - For troubleshooting, see [docs/TROUBLESHOOTING.md](docs/TROUBLESHOOTING.md)
235
-
236
- ## Contributing
237
-
238
- We welcome contributions! Please see [docs/CONTRIBUTING.md](docs/CONTRIBUTING.md) for guidelines.
239
-
240
- ## License
241
-
242
- This project is licensed under the MIT License. See [LICENSE](LICENSE) for details.
243
-
244
- ## Community & Support
245
-
246
- For questions, suggestions, or support, please open an issue or discussion on GitHub.
gac-1.9.4/README.md DELETED
@@ -1,202 +0,0 @@
1
- <!-- markdownlint-disable MD013 -->
2
-
3
- # Git Auto Commit (gac)
4
-
5
- [![PyPI version](https://img.shields.io/pypi/v/gac.svg)](https://pypi.org/project/gac/)
6
- [![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/)
7
- [![Build Status](https://github.com/cellwebb/gac/actions/workflows/ci.yml/badge.svg)](https://github.com/cellwebb/gac/actions)
8
- [![codecov](https://codecov.io/gh/cellwebb/gac/branch/main/graph/badge.svg)](https://app.codecov.io/gh/cellwebb/gac)
9
- [![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)
10
- [![mypy](https://img.shields.io/badge/mypy-checked-blue.svg)](https://mypy-lang.org/)
11
- [![Contributions welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg)](docs/CONTRIBUTING.md)
12
- [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
13
-
14
- ## Features
15
-
16
- - **LLM-Powered Commit Messages:** Automatically generates clear, concise, and context-aware commit messages using large language models.
17
- - **Deep Contextual Analysis:** Understands your code by analyzing staged changes, repository structure, and recent commit history to provide highly relevant suggestions.
18
- - **Multi-Provider & Model Support:** Flexibly works with leading AI providers (Anthropic, Cerebras, Chutes.ai, Gemini, Groq, OpenAI, OpenRouter, Streamlake/Vanchin, Synthetic.new, & Z.AI) and local providers (LM Studio & Ollama), easily configured through an interactive setup or environment variables.
19
- - **Seamless Git Workflow:** Integrates smoothly into your existing Git routine as a simple drop-in replacement for `git commit`.
20
- - **Extensive Customization:** Tailor commit messages to your needs with a rich set of flags, including one-liners (`-o`), detailed verbose messages (`-v`), AI hints (`-h`), scope inference (`-s`), and specific model selection (`-m`).
21
- - **Streamlined Workflow Commands:** Boost your productivity with convenient options to stage all changes (`-a`), auto-confirm commits (`-y`), and push to your remote repository (`-p`) in a single step.
22
- - **Interactive Reroll with Feedback:** Not satisfied with the generated commit message? Use `r` for a simple regeneration, or `r <feedback>` to provide specific improvement suggestions (e.g., `r make it shorter`, `r focus on the bug fix`).
23
- - **Token Usage Tracking:** Display token consumption statistics (prompt, completion, and total tokens).
24
- - **Security Scanner:** Built-in detection of secrets and API keys in staged changes to prevent accidental commits of sensitive information.
25
-
26
- ## How It Works
27
-
28
- gac analyzes your staged changes to generate high-quality commit messages with the help of large language models. The tool uses a sophisticated prompt architecture that separates system instructions from user data, enabling better AI understanding and more consistent results.
29
-
30
- ## How to Use
31
-
32
- ```sh
33
- git add .
34
- gac
35
- ```
36
-
37
- ![Simple gac Usage](assets/gac-simple-usage.png)
38
-
39
- ## Installation and Configuration
40
-
41
- ### 1. Installation
42
-
43
- #### Quick Try with uvx (no installation)
44
-
45
- You can try gac without installing it using uvx:
46
-
47
- ```sh
48
- # Try gac without installation
49
- uvx gac --help
50
-
51
- # Set up configuration (creates ~/.gac.env)
52
- uvx gac init
53
-
54
- # Use gac on staged changes
55
- git add .
56
- uvx gac
57
- ```
58
-
59
- #### Permanent Installation
60
-
61
- Install system-wide using pipx from the GitHub repository:
62
-
63
- ```sh
64
- # Install pipx if you don't have it
65
- python3 -m pip install --user pipx
66
- python3 -m pipx ensurepath
67
-
68
- # Install gac
69
- pipx install gac
70
- ```
71
-
72
- Verify installation:
73
-
74
- ```sh
75
- gac --version
76
- ```
77
-
78
- ### 2. Configuration
79
-
80
- The recommended way to configure `gac` is using the interactive setup:
81
-
82
- ```sh
83
- gac init
84
- ```
85
-
86
- This command will guide you through selecting an AI provider, model, and securely entering your API keys. It will create or update a user-level configuration file at `$HOME/.gac.env`.
87
-
88
- Example `$HOME/.gac.env` output:
89
-
90
- ```env
91
- GAC_MODEL=anthropic:claude-3-5-haiku-latest
92
- ANTHROPIC_API_KEY=your_anthropic_key_here
93
- ```
94
-
95
- Alternatively, you can configure `gac` using environment variables or by manually creating/editing the configuration file.
96
-
97
- #### Managing Configuration with `gac config`
98
-
99
- You can manage settings in your `$HOME/.gac.env` file using `gac config` commands:
100
-
101
- - Streamlake uses inference endpoint IDs instead of model names. When prompted, paste the exact endpoint ID from the Streamlake console.
102
- - For local providers like Ollama and LM Studio, gac will ask for the base API URL. API keys are optional for these providers unless your instance requires authentication.
103
-
104
- - Show config: `gac config show`
105
- - Set a value: `gac config set GAC_MODEL groq:meta-llama/llama-4-scout-17b-16e-instruct`
106
- - Get a value: `gac config get GAC_MODEL`
107
- - Unset a value: `gac config unset GAC_MODEL`
108
-
109
- ### 3. Verify Setup
110
-
111
- Test that `gac` is working properly with your configuration:
112
-
113
- ```sh
114
- # Make a change to a file
115
- echo "# Test change" >> README.md
116
- git add README.md
117
- gac -o # Generate a one-line commit message
118
- ```
119
-
120
- You should see an AI-generated commit message.
121
-
122
- ### 4. Upgrade
123
-
124
- To upgrade `gac` to the latest version, run:
125
-
126
- ```sh
127
- pipx upgrade gac
128
- ```
129
-
130
- ## Basic Usage
131
-
132
- Once installed and configured, using `gac` is straightforward:
133
-
134
- 1. Stage your changes:
135
-
136
- ```sh
137
- git add .
138
- ```
139
-
140
- 2. Run `gac`:
141
-
142
- ```sh
143
- gac
144
- ```
145
-
146
- This will generate a commit message for review. Confirm with `y` to accept the message.
147
-
148
- ### Common Commands
149
-
150
- - Generate a commit message: `gac`
151
- - Auto-accept the commit message: `gac -y`
152
- - Stage all changes and generate a commit message: `gac -a`
153
- - Generate a one-line commit message: `gac -o`
154
- - Add a hint for the AI: `gac -h "Fixed the authentication bug"`
155
- - Push the commit (requires accepting the commit message): `gac -p`
156
- - Advanced usage: Add all, auto-confirm, push a one-liner with a hint: `gac -aypo -h "update for release"`
157
- - Skip security scan: `gac --skip-secret-scan` (use with caution)
158
-
159
- ### Security Features
160
-
161
- GAC includes a built-in security scanner to prevent accidental commits of sensitive information:
162
-
163
- - **Automatic Scanning**: By default, scans all staged changes for potential secrets and API keys
164
- - **Interactive Protection**: When secrets are detected, you can:
165
- - Abort the commit (recommended)
166
- - Continue anyway (not recommended)
167
- - Remove affected files and continue
168
- - **Wide Coverage**: Detects AWS keys, GitHub tokens, OpenAI API keys, database URLs, private keys, and more
169
- - **Smart Filtering**: Ignores example keys, placeholders, and test values to reduce false positives
170
-
171
- To disable the security scan (not recommended unless you know what you're doing):
172
-
173
- ```sh
174
- # Skip scan for one command
175
- gac --skip-secret-scan
176
-
177
- # Or disable via environment variable
178
- export GAC_SKIP_SECRET_SCAN=true
179
- gac
180
- ```
181
-
182
- For a full list of CLI flags, advanced options, and example workflows, see [USAGE.md](USAGE.md).
183
-
184
- ## Best Practices
185
-
186
- - gac loads configuration from two locations (in order of precedence):
187
- 1. User-level `$HOME/.gac.env` (applies to all projects for the user)
188
- 2. Project-level `.env` (in the project root, overrides user config if present) Environment variables always take final precedence over both files.
189
- - Keep API keys out of version control
190
- - For troubleshooting, see [docs/TROUBLESHOOTING.md](docs/TROUBLESHOOTING.md)
191
-
192
- ## Contributing
193
-
194
- We welcome contributions! Please see [docs/CONTRIBUTING.md](docs/CONTRIBUTING.md) for guidelines.
195
-
196
- ## License
197
-
198
- This project is licensed under the MIT License. See [LICENSE](LICENSE) for details.
199
-
200
- ## Community & Support
201
-
202
- For questions, suggestions, or support, please open an issue or discussion on GitHub.
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
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes