commitwise 0.1.4__tar.gz → 0.1.6__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 (27) hide show
  1. commitwise-0.1.6/LICENSE +21 -0
  2. {commitwise-0.1.4 → commitwise-0.1.6}/PKG-INFO +147 -145
  3. {commitwise-0.1.4 → commitwise-0.1.6}/README.md +130 -130
  4. commitwise-0.1.6/commitwise/__init__.py +1 -0
  5. {commitwise-0.1.4 → commitwise-0.1.6}/commitwise/ai/base.py +60 -60
  6. commitwise-0.1.6/commitwise/ai/local_engine.py +69 -0
  7. commitwise-0.1.6/commitwise/ai/openai_engine.py +66 -0
  8. commitwise-0.1.6/commitwise/ai_source.py +56 -0
  9. {commitwise-0.1.4 → commitwise-0.1.6}/commitwise/cli.py +96 -59
  10. {commitwise-0.1.4 → commitwise-0.1.6}/commitwise/cli_utils.py +87 -87
  11. {commitwise-0.1.4 → commitwise-0.1.6}/commitwise/config.py +9 -9
  12. commitwise-0.1.6/commitwise/errors.py +106 -0
  13. {commitwise-0.1.4 → commitwise-0.1.6}/commitwise/file_source.py +25 -25
  14. {commitwise-0.1.4 → commitwise-0.1.6}/commitwise/git_utils.py +80 -80
  15. {commitwise-0.1.4 → commitwise-0.1.6}/commitwise.egg-info/PKG-INFO +147 -145
  16. {commitwise-0.1.4 → commitwise-0.1.6}/commitwise.egg-info/SOURCES.txt +2 -0
  17. {commitwise-0.1.4 → commitwise-0.1.6}/pyproject.toml +27 -24
  18. {commitwise-0.1.4 → commitwise-0.1.6}/setup.cfg +4 -4
  19. commitwise-0.1.4/commitwise/__init__.py +0 -1
  20. commitwise-0.1.4/commitwise/ai/local_engine.py +0 -39
  21. commitwise-0.1.4/commitwise/ai/openai_engine.py +0 -35
  22. commitwise-0.1.4/commitwise/ai_source.py +0 -48
  23. {commitwise-0.1.4 → commitwise-0.1.6}/commitwise/ai/__init__.py +0 -0
  24. {commitwise-0.1.4 → commitwise-0.1.6}/commitwise.egg-info/dependency_links.txt +0 -0
  25. {commitwise-0.1.4 → commitwise-0.1.6}/commitwise.egg-info/entry_points.txt +0 -0
  26. {commitwise-0.1.4 → commitwise-0.1.6}/commitwise.egg-info/requires.txt +0 -0
  27. {commitwise-0.1.4 → commitwise-0.1.6}/commitwise.egg-info/top_level.txt +0 -0
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Abolfazl Hassan Zade
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.
@@ -1,145 +1,147 @@
1
- Metadata-Version: 2.4
2
- Name: commitwise
3
- Version: 0.1.4
4
- Summary: Generate clean git commit messages from files or AI
5
- Author-email: Abolfazl Hassan Zade <abolfazl.hassanzade.81@gmail.com>
6
- License: MIT
7
- Project-URL: homepage, https://github.com/hasssan-hasssan/commitwise
8
- Project-URL: repository, https://github.com/hasssan-hasssan/commitwise
9
- Project-URL: issues, https://github.com/hasssan-hasssan/commitwise/issues
10
- Keywords: git,commit,cli,ai
11
- Requires-Python: >=3.9
12
- Description-Content-Type: text/markdown
13
- Requires-Dist: requests>=2.31.0
14
-
15
- CommitWise
16
- ===========
17
- CommitWise is a smart and simple tool for generating clean Git commit messages.
18
- It can create commit messages from a text file or using AI models.
19
-
20
- **With CommitWise, your commits are always:**
21
- - **Clean and readable**
22
- - **Following Git best practices**
23
- - **Well-structured and informative**
24
- <br>
25
-
26
- Features
27
- --------
28
- - Generate commits from text files, preserving exact formatting, spacing, and paragraphs
29
-
30
- - Generate commits using AI (local with Ollama or OpenAI API)
31
-
32
- - Simple and easy-to-use CLI with only a few flags
33
-
34
- - Works seamlessly in any Git project
35
- <br>
36
-
37
- Requirements
38
- ------------
39
- - Python >= **`3.9`**
40
-
41
- - For local AI : **`Ollama`** installed and the desired model downloaded
42
-
43
- - For online AI : **`OpenAI API Key`** (if using OpenAI)
44
- <br>
45
-
46
- Installation
47
- ------------
48
- ```
49
- $> pip install commitwise
50
- ```
51
- <br>
52
-
53
- AI Configuration
54
- ----------------
55
- CommitWise supports two AI modes:
56
- - Local AI using Ollama (recommended)
57
-
58
- - OpenAI API
59
-
60
- **You only need to configure ONE of them**.
61
-
62
- <br>
63
-
64
- >Local AI (Ollama)
65
- >----------------
66
- >
67
- >1. Install Ollama:
68
- > https://ollama.com
69
- >
70
- >2. Download a model :
71
- > ```
72
- > $> ollama pull llama3
73
- > ```
74
- >
75
- >3. Make sure Ollama is running:
76
- > ```
77
- > $> ollama serve
78
- > ```
79
- >
80
- >CommitWise will automatically detect Ollama at :
81
- > `http://localhost:11434`
82
- >
83
- >**No additional configuration is required.**
84
-
85
- <br>
86
-
87
- >OpenAI Configuration
88
- >--------------------
89
- >
90
- >- If you prefer using OpenAI instead of local AI, set your `API-KEY` as an environment variable.
91
- >
92
- > - Windows :
93
- > ```
94
- > $> setx OPENAI_API_KEY "your_api_key_here"
95
- > ```
96
- >
97
- > - Linux / macOS :
98
- > ```
99
- > $> export OPENAI_API_KEY="your_api_key_here"
100
- > ```
101
- >
102
- >**CommitWise will automatically use OpenAI when the API key is available.**
103
-
104
- <br>
105
-
106
- Usage
107
- -----
108
- Generate commit from AI (local or OpenAI):
109
- ```
110
- $> commitwise --ai
111
- ```
112
-
113
- Generate commit from a text file:
114
- ```
115
- $> commitwise --file ./my_commit.txt
116
- ```
117
-
118
- Show help:
119
- ```
120
- $> commitwise --help
121
- ```
122
-
123
- <br>
124
-
125
- Professional Note
126
- -----------------
127
- CommitWise ensures that AI-generated commit messages are clean and Git-ready,
128
- without extra explanations, markdown, or educational text.
129
- This is guaranteed through strict prompting and output cleaning.
130
-
131
- <br>
132
-
133
- Links
134
- -----
135
-
136
- [GitHub](https://github.com/hasssan-hasssan/commitwise "GitHub repository") |
137
- [PyPi](https://pypi.org/project/commitwise)
138
-
139
- <br>
140
-
141
- Support
142
- -------
143
- If CommitWise is helpful, please give it a star on [GitHub](https://github.com/hasssan-hasssan/commitwise "GitHub repository") so others can find it!
144
-
145
- <br>
1
+ Metadata-Version: 2.4
2
+ Name: commitwise
3
+ Version: 0.1.6
4
+ Summary: Generate clean git commit messages from files or AI
5
+ Author-email: Abolfazl Hassan Zade <abolfazl.hassanzade.81@gmail.com>
6
+ License: MIT
7
+ Project-URL: homepage, https://github.com/hasssan-hasssan/commitwise
8
+ Project-URL: repository, https://github.com/hasssan-hasssan/commitwise
9
+ Project-URL: issues, https://github.com/hasssan-hasssan/commitwise/issues
10
+ Keywords: git,commit,cli,ai
11
+ Requires-Python: >=3.9
12
+ Description-Content-Type: text/markdown
13
+ License-File: LICENSE
14
+ Requires-Dist: requests>=2.31.0
15
+ Dynamic: license-file
16
+
17
+ CommitWise
18
+ ===========
19
+ CommitWise is a smart and simple tool for generating clean Git commit messages.
20
+ It can create commit messages from a text file or using AI models.
21
+
22
+ **With CommitWise, your commits are always:**
23
+ - **Clean and readable**
24
+ - **Following Git best practices**
25
+ - **Well-structured and informative**
26
+ <br>
27
+
28
+ Features
29
+ --------
30
+ - Generate commits from text files, preserving exact formatting, spacing, and paragraphs
31
+
32
+ - Generate commits using AI (local with Ollama or OpenAI API)
33
+
34
+ - Simple and easy-to-use CLI with only a few flags
35
+
36
+ - Works seamlessly in any Git project
37
+ <br>
38
+
39
+ Requirements
40
+ ------------
41
+ - Python >= **`3.9`**
42
+
43
+ - For local AI : **`Ollama`** installed and the desired model downloaded
44
+
45
+ - For online AI : **`OpenAI API Key`** (if using OpenAI)
46
+ <br>
47
+
48
+ Installation
49
+ ------------
50
+ ```
51
+ $> pip install commitwise
52
+ ```
53
+ <br>
54
+
55
+ AI Configuration
56
+ ----------------
57
+ CommitWise supports two AI modes:
58
+ - Local AI using Ollama (recommended)
59
+
60
+ - OpenAI API
61
+
62
+ **You only need to configure ONE of them**.
63
+
64
+ <br>
65
+
66
+ >Local AI (Ollama)
67
+ >----------------
68
+ >
69
+ >1. Install Ollama:
70
+ > https://ollama.com
71
+ >
72
+ >2. Download a model :
73
+ > ```
74
+ > $> ollama pull llama3
75
+ > ```
76
+ >
77
+ >3. Make sure Ollama is running:
78
+ > ```
79
+ > $> ollama serve
80
+ > ```
81
+ >
82
+ >CommitWise will automatically detect Ollama at :
83
+ > `http://localhost:11434`
84
+ >
85
+ >**No additional configuration is required.**
86
+
87
+ <br>
88
+
89
+ >OpenAI Configuration
90
+ >--------------------
91
+ >
92
+ >- If you prefer using OpenAI instead of local AI, set your `API-KEY` as an environment variable.
93
+ >
94
+ > - Windows :
95
+ > ```
96
+ > $> setx OPENAI_API_KEY "your_api_key_here"
97
+ > ```
98
+ >
99
+ > - Linux / macOS :
100
+ > ```
101
+ > $> export OPENAI_API_KEY="your_api_key_here"
102
+ > ```
103
+ >
104
+ >**CommitWise will automatically use OpenAI when the API key is available.**
105
+
106
+ <br>
107
+
108
+ Usage
109
+ -----
110
+ Generate commit from AI (local or OpenAI):
111
+ ```
112
+ $> commitwise --ai
113
+ ```
114
+
115
+ Generate commit from a text file:
116
+ ```
117
+ $> commitwise --file ./my_commit.txt
118
+ ```
119
+
120
+ Show help:
121
+ ```
122
+ $> commitwise --help
123
+ ```
124
+
125
+ <br>
126
+
127
+ Professional Note
128
+ -----------------
129
+ CommitWise ensures that AI-generated commit messages are clean and Git-ready,
130
+ without extra explanations, markdown, or educational text.
131
+ This is guaranteed through strict prompting and output cleaning.
132
+
133
+ <br>
134
+
135
+ Links
136
+ -----
137
+
138
+ [GitHub](https://github.com/hasssan-hasssan/commitwise "GitHub repository") |
139
+ [PyPi](https://pypi.org/project/commitwise)
140
+
141
+ <br>
142
+
143
+ Support
144
+ -------
145
+ If CommitWise is helpful, please give it a star on [GitHub](https://github.com/hasssan-hasssan/commitwise "GitHub repository") so others can find it!
146
+
147
+ <br>
@@ -1,131 +1,131 @@
1
- CommitWise
2
- ===========
3
- CommitWise is a smart and simple tool for generating clean Git commit messages.
4
- It can create commit messages from a text file or using AI models.
5
-
6
- **With CommitWise, your commits are always:**
7
- - **Clean and readable**
8
- - **Following Git best practices**
9
- - **Well-structured and informative**
10
- <br>
11
-
12
- Features
13
- --------
14
- - Generate commits from text files, preserving exact formatting, spacing, and paragraphs
15
-
16
- - Generate commits using AI (local with Ollama or OpenAI API)
17
-
18
- - Simple and easy-to-use CLI with only a few flags
19
-
20
- - Works seamlessly in any Git project
21
- <br>
22
-
23
- Requirements
24
- ------------
25
- - Python >= **`3.9`**
26
-
27
- - For local AI : **`Ollama`** installed and the desired model downloaded
28
-
29
- - For online AI : **`OpenAI API Key`** (if using OpenAI)
30
- <br>
31
-
32
- Installation
33
- ------------
34
- ```
35
- $> pip install commitwise
36
- ```
37
- <br>
38
-
39
- AI Configuration
40
- ----------------
41
- CommitWise supports two AI modes:
42
- - Local AI using Ollama (recommended)
43
-
44
- - OpenAI API
45
-
46
- **You only need to configure ONE of them**.
47
-
48
- <br>
49
-
50
- >Local AI (Ollama)
51
- >----------------
52
- >
53
- >1. Install Ollama:
54
- > https://ollama.com
55
- >
56
- >2. Download a model :
57
- > ```
58
- > $> ollama pull llama3
59
- > ```
60
- >
61
- >3. Make sure Ollama is running:
62
- > ```
63
- > $> ollama serve
64
- > ```
65
- >
66
- >CommitWise will automatically detect Ollama at :
67
- > `http://localhost:11434`
68
- >
69
- >**No additional configuration is required.**
70
-
71
- <br>
72
-
73
- >OpenAI Configuration
74
- >--------------------
75
- >
76
- >- If you prefer using OpenAI instead of local AI, set your `API-KEY` as an environment variable.
77
- >
78
- > - Windows :
79
- > ```
80
- > $> setx OPENAI_API_KEY "your_api_key_here"
81
- > ```
82
- >
83
- > - Linux / macOS :
84
- > ```
85
- > $> export OPENAI_API_KEY="your_api_key_here"
86
- > ```
87
- >
88
- >**CommitWise will automatically use OpenAI when the API key is available.**
89
-
90
- <br>
91
-
92
- Usage
93
- -----
94
- Generate commit from AI (local or OpenAI):
95
- ```
96
- $> commitwise --ai
97
- ```
98
-
99
- Generate commit from a text file:
100
- ```
101
- $> commitwise --file ./my_commit.txt
102
- ```
103
-
104
- Show help:
105
- ```
106
- $> commitwise --help
107
- ```
108
-
109
- <br>
110
-
111
- Professional Note
112
- -----------------
113
- CommitWise ensures that AI-generated commit messages are clean and Git-ready,
114
- without extra explanations, markdown, or educational text.
115
- This is guaranteed through strict prompting and output cleaning.
116
-
117
- <br>
118
-
119
- Links
120
- -----
121
-
122
- [GitHub](https://github.com/hasssan-hasssan/commitwise "GitHub repository") |
123
- [PyPi](https://pypi.org/project/commitwise)
124
-
125
- <br>
126
-
127
- Support
128
- -------
129
- If CommitWise is helpful, please give it a star on [GitHub](https://github.com/hasssan-hasssan/commitwise "GitHub repository") so others can find it!
130
-
1
+ CommitWise
2
+ ===========
3
+ CommitWise is a smart and simple tool for generating clean Git commit messages.
4
+ It can create commit messages from a text file or using AI models.
5
+
6
+ **With CommitWise, your commits are always:**
7
+ - **Clean and readable**
8
+ - **Following Git best practices**
9
+ - **Well-structured and informative**
10
+ <br>
11
+
12
+ Features
13
+ --------
14
+ - Generate commits from text files, preserving exact formatting, spacing, and paragraphs
15
+
16
+ - Generate commits using AI (local with Ollama or OpenAI API)
17
+
18
+ - Simple and easy-to-use CLI with only a few flags
19
+
20
+ - Works seamlessly in any Git project
21
+ <br>
22
+
23
+ Requirements
24
+ ------------
25
+ - Python >= **`3.9`**
26
+
27
+ - For local AI : **`Ollama`** installed and the desired model downloaded
28
+
29
+ - For online AI : **`OpenAI API Key`** (if using OpenAI)
30
+ <br>
31
+
32
+ Installation
33
+ ------------
34
+ ```
35
+ $> pip install commitwise
36
+ ```
37
+ <br>
38
+
39
+ AI Configuration
40
+ ----------------
41
+ CommitWise supports two AI modes:
42
+ - Local AI using Ollama (recommended)
43
+
44
+ - OpenAI API
45
+
46
+ **You only need to configure ONE of them**.
47
+
48
+ <br>
49
+
50
+ >Local AI (Ollama)
51
+ >----------------
52
+ >
53
+ >1. Install Ollama:
54
+ > https://ollama.com
55
+ >
56
+ >2. Download a model :
57
+ > ```
58
+ > $> ollama pull llama3
59
+ > ```
60
+ >
61
+ >3. Make sure Ollama is running:
62
+ > ```
63
+ > $> ollama serve
64
+ > ```
65
+ >
66
+ >CommitWise will automatically detect Ollama at :
67
+ > `http://localhost:11434`
68
+ >
69
+ >**No additional configuration is required.**
70
+
71
+ <br>
72
+
73
+ >OpenAI Configuration
74
+ >--------------------
75
+ >
76
+ >- If you prefer using OpenAI instead of local AI, set your `API-KEY` as an environment variable.
77
+ >
78
+ > - Windows :
79
+ > ```
80
+ > $> setx OPENAI_API_KEY "your_api_key_here"
81
+ > ```
82
+ >
83
+ > - Linux / macOS :
84
+ > ```
85
+ > $> export OPENAI_API_KEY="your_api_key_here"
86
+ > ```
87
+ >
88
+ >**CommitWise will automatically use OpenAI when the API key is available.**
89
+
90
+ <br>
91
+
92
+ Usage
93
+ -----
94
+ Generate commit from AI (local or OpenAI):
95
+ ```
96
+ $> commitwise --ai
97
+ ```
98
+
99
+ Generate commit from a text file:
100
+ ```
101
+ $> commitwise --file ./my_commit.txt
102
+ ```
103
+
104
+ Show help:
105
+ ```
106
+ $> commitwise --help
107
+ ```
108
+
109
+ <br>
110
+
111
+ Professional Note
112
+ -----------------
113
+ CommitWise ensures that AI-generated commit messages are clean and Git-ready,
114
+ without extra explanations, markdown, or educational text.
115
+ This is guaranteed through strict prompting and output cleaning.
116
+
117
+ <br>
118
+
119
+ Links
120
+ -----
121
+
122
+ [GitHub](https://github.com/hasssan-hasssan/commitwise "GitHub repository") |
123
+ [PyPi](https://pypi.org/project/commitwise)
124
+
125
+ <br>
126
+
127
+ Support
128
+ -------
129
+ If CommitWise is helpful, please give it a star on [GitHub](https://github.com/hasssan-hasssan/commitwise "GitHub repository") so others can find it!
130
+
131
131
  <br>
@@ -0,0 +1 @@
1
+ __version__='0.1.6'