gitwit 0.1.0__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.
@@ -0,0 +1,75 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ build/
12
+ develop-eggs/
13
+ dist/
14
+ downloads/
15
+ eggs/
16
+ .eggs/
17
+ lib/
18
+ lib64/
19
+ parts/
20
+ sdist/
21
+ var/
22
+ wheels/
23
+ share/python-wheels/
24
+ *.egg-info/
25
+ .installed.cfg
26
+ *.egg
27
+ MANIFEST
28
+
29
+ # PyInstaller
30
+ *.manifest
31
+ *.spec
32
+
33
+ # Installer logs
34
+ pip-log.txt
35
+ pip-delete-this-directory.txt
36
+
37
+ # Unit test / coverage reports
38
+ htmlcov/
39
+ .tox/
40
+ .nox/
41
+ .coverage
42
+ .coverage.*
43
+ .cache
44
+ nosetests.xml
45
+ coverage.xml
46
+ *.cover
47
+ *.py,cover
48
+ .hypothesis/
49
+ .pytest_cache/
50
+
51
+ # Translations
52
+ *.mo
53
+ *.pot
54
+
55
+ # Environments
56
+ .env
57
+ .venv
58
+ env/
59
+ venv/
60
+ ENV/
61
+ env.bak/
62
+ venv.bak/
63
+
64
+ # IDE
65
+ .idea/
66
+ .vscode/
67
+ *.swp
68
+ *.swo
69
+ *~
70
+
71
+ # macOS
72
+ .DS_Store
73
+
74
+ # Project specific
75
+ .gitwit/
gitwit-0.1.0/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 GitWit Contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
gitwit-0.1.0/PKG-INFO ADDED
@@ -0,0 +1,201 @@
1
+ Metadata-Version: 2.4
2
+ Name: gitwit
3
+ Version: 0.1.0
4
+ Summary: AI-powered git commit messages, PR descriptions, and changelogs using free APIs
5
+ Project-URL: Homepage, https://github.com/MazadiaS/gitwit
6
+ Project-URL: Repository, https://github.com/MazadiaS/gitwit
7
+ Project-URL: Issues, https://github.com/MazadiaS/gitwit/issues
8
+ Author: GitWit Contributors
9
+ License-Expression: MIT
10
+ License-File: LICENSE
11
+ Keywords: ai,cli,commit,gemini,git,groq,llm,ollama
12
+ Classifier: Development Status :: 4 - Beta
13
+ Classifier: Environment :: Console
14
+ Classifier: Intended Audience :: Developers
15
+ Classifier: License :: OSI Approved :: MIT License
16
+ Classifier: Operating System :: OS Independent
17
+ Classifier: Programming Language :: Python :: 3
18
+ Classifier: Programming Language :: Python :: 3.10
19
+ Classifier: Programming Language :: Python :: 3.11
20
+ Classifier: Programming Language :: Python :: 3.12
21
+ Classifier: Topic :: Software Development :: Version Control :: Git
22
+ Requires-Python: >=3.10
23
+ Requires-Dist: click>=8.0.0
24
+ Requires-Dist: httpx>=0.25.0
25
+ Requires-Dist: tomli-w>=1.0.0
26
+ Requires-Dist: tomli>=2.0.0; python_version < '3.11'
27
+ Provides-Extra: dev
28
+ Requires-Dist: pytest-asyncio>=0.21.0; extra == 'dev'
29
+ Requires-Dist: pytest>=7.0.0; extra == 'dev'
30
+ Description-Content-Type: text/markdown
31
+
32
+ # GitWit
33
+
34
+ [![PyPI version](https://badge.fury.io/py/gitwit.svg)](https://badge.fury.io/py/gitwit)
35
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
36
+ [![Python 3.10+](https://img.shields.io/badge/python-3.10+-blue.svg)](https://www.python.org/downloads/)
37
+
38
+ **Stop wasting time writing commit messages.** GitWit generates meaningful, conventional commit messages using AI — completely free.
39
+
40
+ ```
41
+ $ gitwit commit
42
+
43
+ Analyzing 3 file(s): +147 -12
44
+ Generating commit message using groq (llama-3.3-70b-versatile)...
45
+
46
+ Generated commit message:
47
+
48
+ feat(auth): add OAuth2 login with Google provider
49
+
50
+ Options: [y]es, [e]dit, [r]egenerate, [n]o/cancel
51
+ Accept this message? [y]: y
52
+
53
+ Committed successfully!
54
+ [main 8f3a2b1] feat(auth): add OAuth2 login with Google provider
55
+ ```
56
+
57
+ ## Why GitWit?
58
+
59
+ | Feature | GitWit | aicommits | GitHub Copilot |
60
+ |---------|--------|-----------|----------------|
61
+ | **Price** | Free forever | Free (limited) | $10/month |
62
+ | **API Key** | Free (Groq/Gemini) | Requires OpenAI ($) | Subscription |
63
+ | **Local Option** | Yes (Ollama) | No | No |
64
+ | **PR Descriptions** | Yes | No | Yes |
65
+ | **Conventional Commits** | Yes | Yes | Sometimes |
66
+ | **Edit/Regenerate** | Yes | Limited | No |
67
+
68
+ ## Quick Start (3 commands)
69
+
70
+ ```bash
71
+ # 1. Install
72
+ pip install gitwit
73
+
74
+ # 2. Configure (one-time, 30 seconds)
75
+ gitwit config init
76
+
77
+ # 3. Use it
78
+ git add .
79
+ gitwit commit
80
+ ```
81
+
82
+ That's it. Your first AI-powered commit in under a minute.
83
+
84
+ ## Features
85
+
86
+ - **Commit Messages** — Generate conventional commits from staged changes
87
+ - **PR Descriptions** — Generate title + description from branch diffs
88
+ - **Multiple Providers** — Groq, Google Gemini, or local Ollama
89
+ - **Interactive** — Accept, edit, regenerate, or cancel
90
+ - **Fast** — Sub-second generation with Groq
91
+
92
+ ## Installation
93
+
94
+ ```bash
95
+ pip install gitwit
96
+ ```
97
+
98
+ Requires Python 3.10+
99
+
100
+ ## Configuration
101
+
102
+ ### Interactive Setup (Recommended)
103
+
104
+ ```bash
105
+ gitwit config init
106
+ ```
107
+
108
+ This walks you through choosing a provider and setting your API key.
109
+
110
+ ### Manual Setup
111
+
112
+ ```bash
113
+ # Set provider (groq, gemini, or ollama)
114
+ gitwit config set provider groq
115
+
116
+ # Set API key (not needed for Ollama)
117
+ gitwit config set api-key YOUR_API_KEY
118
+
119
+ # View config
120
+ gitwit config show
121
+ ```
122
+
123
+ ## Usage
124
+
125
+ ### Generate Commit Message
126
+
127
+ ```bash
128
+ # From staged changes
129
+ git add src/
130
+ gitwit commit
131
+
132
+ # Stage all + commit
133
+ gitwit commit --all
134
+
135
+ # Auto-accept (no confirmation)
136
+ gitwit commit --yes
137
+
138
+ # Dry run (preview only)
139
+ gitwit commit --dry-run
140
+ ```
141
+
142
+ ### Generate PR Description
143
+
144
+ ```bash
145
+ # Compare current branch to main
146
+ gitwit pr
147
+
148
+ # Specify base branch
149
+ gitwit pr --base develop
150
+
151
+ # Dry run
152
+ gitwit pr --dry-run
153
+ ```
154
+
155
+ ## Why Free?
156
+
157
+ GitWit uses AI providers with generous free tiers:
158
+
159
+ | Provider | Free Tier | Speed | Best For |
160
+ |----------|-----------|-------|----------|
161
+ | **Groq** | 30 req/min | Fastest | Daily use |
162
+ | **Gemini** | 1,500 req/day | Fast | High volume |
163
+ | **Ollama** | Unlimited | Varies | Privacy, offline |
164
+
165
+ **Groq** is recommended — it's the fastest inference provider and the free tier is more than enough for individual developers.
166
+
167
+ ### Get Your Free API Key
168
+
169
+ - **Groq**: [console.groq.com](https://console.groq.com) (instant, no credit card)
170
+ - **Gemini**: [aistudio.google.com](https://aistudio.google.com) (instant, no credit card)
171
+ - **Ollama**: [ollama.ai](https://ollama.ai) (runs locally, no API key needed)
172
+
173
+ ## How It Works
174
+
175
+ 1. GitWit reads your staged changes (`git diff --cached`)
176
+ 2. Sends the diff to your chosen AI provider
177
+ 3. AI generates a conventional commit message
178
+ 4. You review, edit, regenerate, or accept
179
+ 5. GitWit runs `git commit` with your approved message
180
+
181
+ Your code never leaves your machine when using Ollama.
182
+
183
+ ## Contributing
184
+
185
+ Contributions welcome! Please open an issue or PR.
186
+
187
+ ```bash
188
+ # Development setup
189
+ git clone https://github.com/MazadiaS/gitwit.git
190
+ cd gitwit
191
+ pip install -e ".[dev]"
192
+ pytest
193
+ ```
194
+
195
+ ## License
196
+
197
+ MIT — use it however you want.
198
+
199
+ ---
200
+
201
+ **Like GitWit?** Give it a ⭐ on [GitHub](https://github.com/MazadiaS/gitwit)!
gitwit-0.1.0/README.md ADDED
@@ -0,0 +1,170 @@
1
+ # GitWit
2
+
3
+ [![PyPI version](https://badge.fury.io/py/gitwit.svg)](https://badge.fury.io/py/gitwit)
4
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
5
+ [![Python 3.10+](https://img.shields.io/badge/python-3.10+-blue.svg)](https://www.python.org/downloads/)
6
+
7
+ **Stop wasting time writing commit messages.** GitWit generates meaningful, conventional commit messages using AI — completely free.
8
+
9
+ ```
10
+ $ gitwit commit
11
+
12
+ Analyzing 3 file(s): +147 -12
13
+ Generating commit message using groq (llama-3.3-70b-versatile)...
14
+
15
+ Generated commit message:
16
+
17
+ feat(auth): add OAuth2 login with Google provider
18
+
19
+ Options: [y]es, [e]dit, [r]egenerate, [n]o/cancel
20
+ Accept this message? [y]: y
21
+
22
+ Committed successfully!
23
+ [main 8f3a2b1] feat(auth): add OAuth2 login with Google provider
24
+ ```
25
+
26
+ ## Why GitWit?
27
+
28
+ | Feature | GitWit | aicommits | GitHub Copilot |
29
+ |---------|--------|-----------|----------------|
30
+ | **Price** | Free forever | Free (limited) | $10/month |
31
+ | **API Key** | Free (Groq/Gemini) | Requires OpenAI ($) | Subscription |
32
+ | **Local Option** | Yes (Ollama) | No | No |
33
+ | **PR Descriptions** | Yes | No | Yes |
34
+ | **Conventional Commits** | Yes | Yes | Sometimes |
35
+ | **Edit/Regenerate** | Yes | Limited | No |
36
+
37
+ ## Quick Start (3 commands)
38
+
39
+ ```bash
40
+ # 1. Install
41
+ pip install gitwit
42
+
43
+ # 2. Configure (one-time, 30 seconds)
44
+ gitwit config init
45
+
46
+ # 3. Use it
47
+ git add .
48
+ gitwit commit
49
+ ```
50
+
51
+ That's it. Your first AI-powered commit in under a minute.
52
+
53
+ ## Features
54
+
55
+ - **Commit Messages** — Generate conventional commits from staged changes
56
+ - **PR Descriptions** — Generate title + description from branch diffs
57
+ - **Multiple Providers** — Groq, Google Gemini, or local Ollama
58
+ - **Interactive** — Accept, edit, regenerate, or cancel
59
+ - **Fast** — Sub-second generation with Groq
60
+
61
+ ## Installation
62
+
63
+ ```bash
64
+ pip install gitwit
65
+ ```
66
+
67
+ Requires Python 3.10+
68
+
69
+ ## Configuration
70
+
71
+ ### Interactive Setup (Recommended)
72
+
73
+ ```bash
74
+ gitwit config init
75
+ ```
76
+
77
+ This walks you through choosing a provider and setting your API key.
78
+
79
+ ### Manual Setup
80
+
81
+ ```bash
82
+ # Set provider (groq, gemini, or ollama)
83
+ gitwit config set provider groq
84
+
85
+ # Set API key (not needed for Ollama)
86
+ gitwit config set api-key YOUR_API_KEY
87
+
88
+ # View config
89
+ gitwit config show
90
+ ```
91
+
92
+ ## Usage
93
+
94
+ ### Generate Commit Message
95
+
96
+ ```bash
97
+ # From staged changes
98
+ git add src/
99
+ gitwit commit
100
+
101
+ # Stage all + commit
102
+ gitwit commit --all
103
+
104
+ # Auto-accept (no confirmation)
105
+ gitwit commit --yes
106
+
107
+ # Dry run (preview only)
108
+ gitwit commit --dry-run
109
+ ```
110
+
111
+ ### Generate PR Description
112
+
113
+ ```bash
114
+ # Compare current branch to main
115
+ gitwit pr
116
+
117
+ # Specify base branch
118
+ gitwit pr --base develop
119
+
120
+ # Dry run
121
+ gitwit pr --dry-run
122
+ ```
123
+
124
+ ## Why Free?
125
+
126
+ GitWit uses AI providers with generous free tiers:
127
+
128
+ | Provider | Free Tier | Speed | Best For |
129
+ |----------|-----------|-------|----------|
130
+ | **Groq** | 30 req/min | Fastest | Daily use |
131
+ | **Gemini** | 1,500 req/day | Fast | High volume |
132
+ | **Ollama** | Unlimited | Varies | Privacy, offline |
133
+
134
+ **Groq** is recommended — it's the fastest inference provider and the free tier is more than enough for individual developers.
135
+
136
+ ### Get Your Free API Key
137
+
138
+ - **Groq**: [console.groq.com](https://console.groq.com) (instant, no credit card)
139
+ - **Gemini**: [aistudio.google.com](https://aistudio.google.com) (instant, no credit card)
140
+ - **Ollama**: [ollama.ai](https://ollama.ai) (runs locally, no API key needed)
141
+
142
+ ## How It Works
143
+
144
+ 1. GitWit reads your staged changes (`git diff --cached`)
145
+ 2. Sends the diff to your chosen AI provider
146
+ 3. AI generates a conventional commit message
147
+ 4. You review, edit, regenerate, or accept
148
+ 5. GitWit runs `git commit` with your approved message
149
+
150
+ Your code never leaves your machine when using Ollama.
151
+
152
+ ## Contributing
153
+
154
+ Contributions welcome! Please open an issue or PR.
155
+
156
+ ```bash
157
+ # Development setup
158
+ git clone https://github.com/MazadiaS/gitwit.git
159
+ cd gitwit
160
+ pip install -e ".[dev]"
161
+ pytest
162
+ ```
163
+
164
+ ## License
165
+
166
+ MIT — use it however you want.
167
+
168
+ ---
169
+
170
+ **Like GitWit?** Give it a ⭐ on [GitHub](https://github.com/MazadiaS/gitwit)!
gitwit-0.1.0/demo.txt ADDED
@@ -0,0 +1,15 @@
1
+ $ gitwit commit
2
+
3
+ Analyzing 3 file(s): +147 -12
4
+ Generating commit message using groq (llama-3.3-70b-versatile)...
5
+
6
+ Generated commit message:
7
+
8
+ feat(auth): add OAuth2 login with Google provider
9
+
10
+ Options: [y]es, [e]dit, [r]egenerate, [n]o/cancel
11
+ Accept this message? [y]: y
12
+
13
+ Committed successfully!
14
+ [main 8f3a2b1] feat(auth): add OAuth2 login with Google provider
15
+ 3 files changed, 147 insertions(+), 12 deletions(-)
@@ -0,0 +1,54 @@
1
+ [build-system]
2
+ requires = ["hatchling"]
3
+ build-backend = "hatchling.build"
4
+
5
+ [project]
6
+ name = "gitwit"
7
+ version = "0.1.0"
8
+ description = "AI-powered git commit messages, PR descriptions, and changelogs using free APIs"
9
+ readme = "README.md"
10
+ license = "MIT"
11
+ requires-python = ">=3.10"
12
+ authors = [
13
+ { name = "GitWit Contributors" }
14
+ ]
15
+ keywords = ["git", "ai", "commit", "llm", "groq", "gemini", "ollama", "cli"]
16
+ classifiers = [
17
+ "Development Status :: 4 - Beta",
18
+ "Environment :: Console",
19
+ "Intended Audience :: Developers",
20
+ "License :: OSI Approved :: MIT License",
21
+ "Operating System :: OS Independent",
22
+ "Programming Language :: Python :: 3",
23
+ "Programming Language :: Python :: 3.10",
24
+ "Programming Language :: Python :: 3.11",
25
+ "Programming Language :: Python :: 3.12",
26
+ "Topic :: Software Development :: Version Control :: Git",
27
+ ]
28
+ dependencies = [
29
+ "click>=8.0.0",
30
+ "httpx>=0.25.0",
31
+ "tomli>=2.0.0;python_version<'3.11'",
32
+ "tomli-w>=1.0.0",
33
+ ]
34
+
35
+ [project.optional-dependencies]
36
+ dev = [
37
+ "pytest>=7.0.0",
38
+ "pytest-asyncio>=0.21.0",
39
+ ]
40
+
41
+ [project.scripts]
42
+ gitwit = "gitwit.cli:main"
43
+
44
+ [project.urls]
45
+ Homepage = "https://github.com/MazadiaS/gitwit"
46
+ Repository = "https://github.com/MazadiaS/gitwit"
47
+ Issues = "https://github.com/MazadiaS/gitwit/issues"
48
+
49
+ [tool.hatch.build.targets.wheel]
50
+ packages = ["src/gitwit"]
51
+
52
+ [tool.pytest.ini_options]
53
+ asyncio_mode = "auto"
54
+ testpaths = ["tests"]
@@ -0,0 +1,4 @@
1
+ """GitWit - AI-powered git commit messages using free APIs."""
2
+
3
+ __version__ = "0.1.0"
4
+ __author__ = "GitWit Contributors"