cli-comet 1.2.0__tar.gz → 1.2.2__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.
- cli_comet-1.2.2/PKG-INFO +102 -0
- cli_comet-1.2.2/README.md +83 -0
- cli_comet-1.2.2/cli_comet.egg-info/PKG-INFO +102 -0
- {cli_comet-1.2.0 → cli_comet-1.2.2}/comet/cli.py +28 -8
- {cli_comet-1.2.0 → cli_comet-1.2.2}/comet/system.md +14 -4
- {cli_comet-1.2.0 → cli_comet-1.2.2}/pyproject.toml +2 -2
- {cli_comet-1.2.0 → cli_comet-1.2.2}/setup.cfg +2 -2
- cli_comet-1.2.0/PKG-INFO +0 -81
- cli_comet-1.2.0/README.md +0 -62
- cli_comet-1.2.0/cli_comet.egg-info/PKG-INFO +0 -81
- {cli_comet-1.2.0 → cli_comet-1.2.2}/LICENSE +0 -0
- {cli_comet-1.2.0 → cli_comet-1.2.2}/MANIFEST.in +0 -0
- {cli_comet-1.2.0 → cli_comet-1.2.2}/cli_comet.egg-info/SOURCES.txt +0 -0
- {cli_comet-1.2.0 → cli_comet-1.2.2}/cli_comet.egg-info/dependency_links.txt +0 -0
- {cli_comet-1.2.0 → cli_comet-1.2.2}/cli_comet.egg-info/entry_points.txt +0 -0
- {cli_comet-1.2.0 → cli_comet-1.2.2}/cli_comet.egg-info/requires.txt +0 -0
- {cli_comet-1.2.0 → cli_comet-1.2.2}/cli_comet.egg-info/top_level.txt +0 -0
- {cli_comet-1.2.0 → cli_comet-1.2.2}/comet/__init__.py +0 -0
cli_comet-1.2.2/PKG-INFO
ADDED
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: cli-comet
|
|
3
|
+
Version: 1.2.2
|
|
4
|
+
Summary: A terminal UI that automatically generates git commit messages using local language models via Ollama.
|
|
5
|
+
Home-page: https://github.com/razoring/CometCLI
|
|
6
|
+
Author: razoring
|
|
7
|
+
Classifier: Programming Language :: Python :: 3
|
|
8
|
+
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
|
|
9
|
+
Classifier: Operating System :: OS Independent
|
|
10
|
+
Classifier: Environment :: Console
|
|
11
|
+
Requires-Python: >=3.10
|
|
12
|
+
Description-Content-Type: text/markdown
|
|
13
|
+
License-File: LICENSE
|
|
14
|
+
Requires-Dist: ollama
|
|
15
|
+
Requires-Dist: textual
|
|
16
|
+
Requires-Dist: colorama
|
|
17
|
+
Requires-Dist: openai
|
|
18
|
+
Dynamic: license-file
|
|
19
|
+
|
|
20
|
+
# Comet CLI
|
|
21
|
+
|
|
22
|
+
Comet helps you save tokens! Comet is a terminal user interface application that automatically generates descriptive git commit messages using local language models via Ollama or LMStudio. It analyzes your staged git diffs and provides a clean interface to review, edit, regenerate, and commit your changes instantly.
|
|
23
|
+
|
|
24
|
+
## Features
|
|
25
|
+
|
|
26
|
+
- **Instant Boot**: The UI renders instantly with zero latency, utilizing background threading for network auto-detection and initialization.
|
|
27
|
+
- **Provider Auto-Detection**: Automatically detects whether you are running Ollama or LMStudio locally without requiring configuration, while allowing overrides via the `--provider` flag.
|
|
28
|
+
- **Persistent Settings**: Comet remembers your last successfully used provider and model in a `settings.json` file inside the installation directory, skipping auto-detection on future boot-ups.
|
|
29
|
+
- **Local Model Generation**: Connects to your local AI servers to generate commit messages entirely privately.
|
|
30
|
+
- **Model Swapping**: Press `tab` to cycle through available local models directly from the interface.
|
|
31
|
+
- **Context Aware**: Automatically pulls in the last 5 commits to understand the tone and style of your project.
|
|
32
|
+
- **Terminal User Interface**: Built with Textual. It provides a dedicated text area to edit the generated message.
|
|
33
|
+
- **Dynamic Newlines**: Use the down arrow key on the last line to seamlessly add new lines to your commit message, and the up arrow key to remove them.
|
|
34
|
+
- **Quick Undo**: Press `ctrl+z` to instantly undo the last local commit if you need to make changes.
|
|
35
|
+
- **Direct Syncing**: Commit your changes and immediately push them to your remote repository with a second press of the commit button.
|
|
36
|
+
- **Customizable Prompts**: The instructions provided to the language model are stored in `comet/system.md` and can be edited to fit your specific workflow.
|
|
37
|
+
|
|
38
|
+
## Requirements
|
|
39
|
+
|
|
40
|
+
- Python 3.10 or higher
|
|
41
|
+
- Git installed and accessible in your system path
|
|
42
|
+
- Ollama or LMStudio installed and running locally
|
|
43
|
+
|
|
44
|
+
## Installation
|
|
45
|
+
|
|
46
|
+
The recommended way to install Comet is globally using `pipx`:
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
pipx install cli-comet
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
### Installation from Source
|
|
53
|
+
|
|
54
|
+
Clone the repository and install the required dependencies:
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
git clone https://github.com/razoring/CometCLI.git
|
|
58
|
+
cd CometCLI
|
|
59
|
+
python -m venv .venv
|
|
60
|
+
|
|
61
|
+
# On Windows
|
|
62
|
+
.venv\Scripts\activate
|
|
63
|
+
|
|
64
|
+
# On Unix/macOS
|
|
65
|
+
source .venv/bin/activate
|
|
66
|
+
|
|
67
|
+
pip install -e .
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## Usage
|
|
71
|
+
|
|
72
|
+
Ensure you have staged your changes using `git add` and that Ollama or LMStudio is running in the background.
|
|
73
|
+
|
|
74
|
+
Run the Comet application:
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
comet
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
You can optionally force a specific provider:
|
|
81
|
+
```bash
|
|
82
|
+
comet --provider ollama
|
|
83
|
+
comet --provider lmstudio
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
### Keyboard Shortcuts
|
|
87
|
+
|
|
88
|
+
- `enter`: Commit the current text. If pressed again, it will push the commit to the remote repository.
|
|
89
|
+
- `tab`: Swap the active language model.
|
|
90
|
+
- `ctrl+r`: Regenerate the commit message with the current model.
|
|
91
|
+
- `ctrl+z`: Undo the most recent local commit.
|
|
92
|
+
- `ctrl+t`: Terminate the application.
|
|
93
|
+
- `down arrow`: Add a new line when at the bottom of the text area.
|
|
94
|
+
- `up arrow`: Remove the previous empty line.
|
|
95
|
+
|
|
96
|
+
## Architecture
|
|
97
|
+
|
|
98
|
+
Comet uses the `subprocess` module to run git commands and capture diffs. It reads the local `comet/system.md` file for system instructions and sends the diff to the selected provider's API. The interface is built using Textual, providing responsive keyboard bindings and a resilient terminal layout. All blocking network logic runs in an asynchronous `@work` thread to ensure 0ms UI start latency.
|
|
99
|
+
|
|
100
|
+
## License
|
|
101
|
+
|
|
102
|
+
This project is licensed under the GNU General Public License v3.0 (GPL-3.0). See the `LICENSE` file for details.
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
# Comet CLI
|
|
2
|
+
|
|
3
|
+
Comet helps you save tokens! Comet is a terminal user interface application that automatically generates descriptive git commit messages using local language models via Ollama or LMStudio. It analyzes your staged git diffs and provides a clean interface to review, edit, regenerate, and commit your changes instantly.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- **Instant Boot**: The UI renders instantly with zero latency, utilizing background threading for network auto-detection and initialization.
|
|
8
|
+
- **Provider Auto-Detection**: Automatically detects whether you are running Ollama or LMStudio locally without requiring configuration, while allowing overrides via the `--provider` flag.
|
|
9
|
+
- **Persistent Settings**: Comet remembers your last successfully used provider and model in a `settings.json` file inside the installation directory, skipping auto-detection on future boot-ups.
|
|
10
|
+
- **Local Model Generation**: Connects to your local AI servers to generate commit messages entirely privately.
|
|
11
|
+
- **Model Swapping**: Press `tab` to cycle through available local models directly from the interface.
|
|
12
|
+
- **Context Aware**: Automatically pulls in the last 5 commits to understand the tone and style of your project.
|
|
13
|
+
- **Terminal User Interface**: Built with Textual. It provides a dedicated text area to edit the generated message.
|
|
14
|
+
- **Dynamic Newlines**: Use the down arrow key on the last line to seamlessly add new lines to your commit message, and the up arrow key to remove them.
|
|
15
|
+
- **Quick Undo**: Press `ctrl+z` to instantly undo the last local commit if you need to make changes.
|
|
16
|
+
- **Direct Syncing**: Commit your changes and immediately push them to your remote repository with a second press of the commit button.
|
|
17
|
+
- **Customizable Prompts**: The instructions provided to the language model are stored in `comet/system.md` and can be edited to fit your specific workflow.
|
|
18
|
+
|
|
19
|
+
## Requirements
|
|
20
|
+
|
|
21
|
+
- Python 3.10 or higher
|
|
22
|
+
- Git installed and accessible in your system path
|
|
23
|
+
- Ollama or LMStudio installed and running locally
|
|
24
|
+
|
|
25
|
+
## Installation
|
|
26
|
+
|
|
27
|
+
The recommended way to install Comet is globally using `pipx`:
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
pipx install cli-comet
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
### Installation from Source
|
|
34
|
+
|
|
35
|
+
Clone the repository and install the required dependencies:
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
git clone https://github.com/razoring/CometCLI.git
|
|
39
|
+
cd CometCLI
|
|
40
|
+
python -m venv .venv
|
|
41
|
+
|
|
42
|
+
# On Windows
|
|
43
|
+
.venv\Scripts\activate
|
|
44
|
+
|
|
45
|
+
# On Unix/macOS
|
|
46
|
+
source .venv/bin/activate
|
|
47
|
+
|
|
48
|
+
pip install -e .
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## Usage
|
|
52
|
+
|
|
53
|
+
Ensure you have staged your changes using `git add` and that Ollama or LMStudio is running in the background.
|
|
54
|
+
|
|
55
|
+
Run the Comet application:
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
comet
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
You can optionally force a specific provider:
|
|
62
|
+
```bash
|
|
63
|
+
comet --provider ollama
|
|
64
|
+
comet --provider lmstudio
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
### Keyboard Shortcuts
|
|
68
|
+
|
|
69
|
+
- `enter`: Commit the current text. If pressed again, it will push the commit to the remote repository.
|
|
70
|
+
- `tab`: Swap the active language model.
|
|
71
|
+
- `ctrl+r`: Regenerate the commit message with the current model.
|
|
72
|
+
- `ctrl+z`: Undo the most recent local commit.
|
|
73
|
+
- `ctrl+t`: Terminate the application.
|
|
74
|
+
- `down arrow`: Add a new line when at the bottom of the text area.
|
|
75
|
+
- `up arrow`: Remove the previous empty line.
|
|
76
|
+
|
|
77
|
+
## Architecture
|
|
78
|
+
|
|
79
|
+
Comet uses the `subprocess` module to run git commands and capture diffs. It reads the local `comet/system.md` file for system instructions and sends the diff to the selected provider's API. The interface is built using Textual, providing responsive keyboard bindings and a resilient terminal layout. All blocking network logic runs in an asynchronous `@work` thread to ensure 0ms UI start latency.
|
|
80
|
+
|
|
81
|
+
## License
|
|
82
|
+
|
|
83
|
+
This project is licensed under the GNU General Public License v3.0 (GPL-3.0). See the `LICENSE` file for details.
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: cli-comet
|
|
3
|
+
Version: 1.2.2
|
|
4
|
+
Summary: A terminal UI that automatically generates git commit messages using local language models via Ollama.
|
|
5
|
+
Home-page: https://github.com/razoring/CometCLI
|
|
6
|
+
Author: razoring
|
|
7
|
+
Classifier: Programming Language :: Python :: 3
|
|
8
|
+
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
|
|
9
|
+
Classifier: Operating System :: OS Independent
|
|
10
|
+
Classifier: Environment :: Console
|
|
11
|
+
Requires-Python: >=3.10
|
|
12
|
+
Description-Content-Type: text/markdown
|
|
13
|
+
License-File: LICENSE
|
|
14
|
+
Requires-Dist: ollama
|
|
15
|
+
Requires-Dist: textual
|
|
16
|
+
Requires-Dist: colorama
|
|
17
|
+
Requires-Dist: openai
|
|
18
|
+
Dynamic: license-file
|
|
19
|
+
|
|
20
|
+
# Comet CLI
|
|
21
|
+
|
|
22
|
+
Comet helps you save tokens! Comet is a terminal user interface application that automatically generates descriptive git commit messages using local language models via Ollama or LMStudio. It analyzes your staged git diffs and provides a clean interface to review, edit, regenerate, and commit your changes instantly.
|
|
23
|
+
|
|
24
|
+
## Features
|
|
25
|
+
|
|
26
|
+
- **Instant Boot**: The UI renders instantly with zero latency, utilizing background threading for network auto-detection and initialization.
|
|
27
|
+
- **Provider Auto-Detection**: Automatically detects whether you are running Ollama or LMStudio locally without requiring configuration, while allowing overrides via the `--provider` flag.
|
|
28
|
+
- **Persistent Settings**: Comet remembers your last successfully used provider and model in a `settings.json` file inside the installation directory, skipping auto-detection on future boot-ups.
|
|
29
|
+
- **Local Model Generation**: Connects to your local AI servers to generate commit messages entirely privately.
|
|
30
|
+
- **Model Swapping**: Press `tab` to cycle through available local models directly from the interface.
|
|
31
|
+
- **Context Aware**: Automatically pulls in the last 5 commits to understand the tone and style of your project.
|
|
32
|
+
- **Terminal User Interface**: Built with Textual. It provides a dedicated text area to edit the generated message.
|
|
33
|
+
- **Dynamic Newlines**: Use the down arrow key on the last line to seamlessly add new lines to your commit message, and the up arrow key to remove them.
|
|
34
|
+
- **Quick Undo**: Press `ctrl+z` to instantly undo the last local commit if you need to make changes.
|
|
35
|
+
- **Direct Syncing**: Commit your changes and immediately push them to your remote repository with a second press of the commit button.
|
|
36
|
+
- **Customizable Prompts**: The instructions provided to the language model are stored in `comet/system.md` and can be edited to fit your specific workflow.
|
|
37
|
+
|
|
38
|
+
## Requirements
|
|
39
|
+
|
|
40
|
+
- Python 3.10 or higher
|
|
41
|
+
- Git installed and accessible in your system path
|
|
42
|
+
- Ollama or LMStudio installed and running locally
|
|
43
|
+
|
|
44
|
+
## Installation
|
|
45
|
+
|
|
46
|
+
The recommended way to install Comet is globally using `pipx`:
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
pipx install cli-comet
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
### Installation from Source
|
|
53
|
+
|
|
54
|
+
Clone the repository and install the required dependencies:
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
git clone https://github.com/razoring/CometCLI.git
|
|
58
|
+
cd CometCLI
|
|
59
|
+
python -m venv .venv
|
|
60
|
+
|
|
61
|
+
# On Windows
|
|
62
|
+
.venv\Scripts\activate
|
|
63
|
+
|
|
64
|
+
# On Unix/macOS
|
|
65
|
+
source .venv/bin/activate
|
|
66
|
+
|
|
67
|
+
pip install -e .
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## Usage
|
|
71
|
+
|
|
72
|
+
Ensure you have staged your changes using `git add` and that Ollama or LMStudio is running in the background.
|
|
73
|
+
|
|
74
|
+
Run the Comet application:
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
comet
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
You can optionally force a specific provider:
|
|
81
|
+
```bash
|
|
82
|
+
comet --provider ollama
|
|
83
|
+
comet --provider lmstudio
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
### Keyboard Shortcuts
|
|
87
|
+
|
|
88
|
+
- `enter`: Commit the current text. If pressed again, it will push the commit to the remote repository.
|
|
89
|
+
- `tab`: Swap the active language model.
|
|
90
|
+
- `ctrl+r`: Regenerate the commit message with the current model.
|
|
91
|
+
- `ctrl+z`: Undo the most recent local commit.
|
|
92
|
+
- `ctrl+t`: Terminate the application.
|
|
93
|
+
- `down arrow`: Add a new line when at the bottom of the text area.
|
|
94
|
+
- `up arrow`: Remove the previous empty line.
|
|
95
|
+
|
|
96
|
+
## Architecture
|
|
97
|
+
|
|
98
|
+
Comet uses the `subprocess` module to run git commands and capture diffs. It reads the local `comet/system.md` file for system instructions and sends the diff to the selected provider's API. The interface is built using Textual, providing responsive keyboard bindings and a resilient terminal layout. All blocking network logic runs in an asynchronous `@work` thread to ensure 0ms UI start latency.
|
|
99
|
+
|
|
100
|
+
## License
|
|
101
|
+
|
|
102
|
+
This project is licensed under the GNU General Public License v3.0 (GPL-3.0). See the `LICENSE` file for details.
|
|
@@ -65,8 +65,10 @@ from textual import work, events
|
|
|
65
65
|
import subprocess, colorama
|
|
66
66
|
|
|
67
67
|
class CustomTextArea(TextArea):
|
|
68
|
-
|
|
69
|
-
|
|
68
|
+
BINDINGS = [
|
|
69
|
+
Binding("ctrl+r", "regenerate_action", "Regenerate", priority=True),
|
|
70
|
+
Binding("escape", "exit_action", "Terminate", priority=True)
|
|
71
|
+
]
|
|
70
72
|
|
|
71
73
|
def on_key(self, event: events.Key) -> None:
|
|
72
74
|
if event.key == "enter":
|
|
@@ -158,6 +160,14 @@ class CometTUI(App):
|
|
|
158
160
|
border: none;
|
|
159
161
|
}
|
|
160
162
|
|
|
163
|
+
#undoBtn {
|
|
164
|
+
width: 1fr;
|
|
165
|
+
margin-left: 1;
|
|
166
|
+
height: 3;
|
|
167
|
+
background: $secondary;
|
|
168
|
+
border: none;
|
|
169
|
+
}
|
|
170
|
+
|
|
161
171
|
#cancelBtn {
|
|
162
172
|
margin-left: 1;
|
|
163
173
|
height: 3;
|
|
@@ -182,7 +192,7 @@ class CometTUI(App):
|
|
|
182
192
|
|
|
183
193
|
BINDINGS = [
|
|
184
194
|
Binding("ctrl+r", "regenerate_action", "Regenerate", priority=True),
|
|
185
|
-
Binding("
|
|
195
|
+
Binding("escape", "exit_action", "Quit", priority=True),
|
|
186
196
|
Binding("ctrl+z", "undo_commit", "Undo Commit", priority=True),
|
|
187
197
|
Binding("tab", "swap_model", "Swap Model", priority=True)
|
|
188
198
|
]
|
|
@@ -205,9 +215,12 @@ class CometTUI(App):
|
|
|
205
215
|
yield CustomTextArea(self.commit, id="input", show_line_numbers=False)
|
|
206
216
|
yield Button(" ₊✦ Regenerate ", id="regenBtn")
|
|
207
217
|
with Horizontal(id="action_row"):
|
|
208
|
-
yield Button(" ✔ Commit", id="commitBtn")
|
|
209
|
-
|
|
210
|
-
|
|
218
|
+
yield Button(" ✔ Commit ", id="commitBtn")
|
|
219
|
+
undo = Button(" ↺ Undo ", id="undoBtn")
|
|
220
|
+
undo.display = False
|
|
221
|
+
yield undo
|
|
222
|
+
yield Button(" 🗙 Quit ", id="cancelBtn")
|
|
223
|
+
yield Label("[white][b]ctrl+r[/b][/white] [gray]regenerate[/gray] [white][b]enter[/b][/white] [gray]continue[/gray] [white][b]tab[/b][/white] [gray]swap model[/gray] [white][b]ctrl+z[/b][/white] [gray]undo[/gray] [white][b]↓/↑[/b][/white] [gray]move lines[/gray] [white][b]esc[/b][/white] [gray]quit[/gray]", id="shortcuts")
|
|
211
224
|
|
|
212
225
|
def action_swap_model(self) -> None:
|
|
213
226
|
if not self.allModels: return
|
|
@@ -226,7 +239,7 @@ class CometTUI(App):
|
|
|
226
239
|
regenBtn.press()
|
|
227
240
|
|
|
228
241
|
def action_exit_action(self) -> None:
|
|
229
|
-
self.
|
|
242
|
+
self.exit(f"{colorama.Fore.RED}User cancelled the operation. {colorama.Style.RESET_ALL}")
|
|
230
243
|
|
|
231
244
|
def action_commit_action(self) -> None:
|
|
232
245
|
commitBtn = self.query_one("#commitBtn", Button)
|
|
@@ -237,7 +250,9 @@ class CometTUI(App):
|
|
|
237
250
|
commitBtn = self.query_one("#commitBtn", Button)
|
|
238
251
|
if str(commitBtn.label).strip() == "Sync ➤":
|
|
239
252
|
subprocess.run(["git", "reset", "HEAD~1"], capture_output=True)
|
|
240
|
-
commitBtn.label = " ✔ Commit"
|
|
253
|
+
commitBtn.label = " ✔ Commit "
|
|
254
|
+
self.query_one("#undoBtn").display = False
|
|
255
|
+
self.query_one("#cancelBtn").display = True
|
|
241
256
|
|
|
242
257
|
def on_mount(self) -> None:
|
|
243
258
|
self.query_one("#input_row").border_title = f"{self.model}"
|
|
@@ -303,9 +318,14 @@ class CometTUI(App):
|
|
|
303
318
|
|
|
304
319
|
subprocess.run(["git", "commit", "-a", "-m", finalMessage], capture_output=True)
|
|
305
320
|
event.button.label = "Sync ➤"
|
|
321
|
+
self.query_one("#undoBtn").display = True
|
|
322
|
+
self.query_one("#cancelBtn").display = False
|
|
306
323
|
|
|
307
324
|
elif event.button.id == "cancelBtn":
|
|
308
325
|
self.exit(f"{colorama.Fore.RED}User cancelled the operation. {colorama.Style.RESET_ALL}")
|
|
326
|
+
|
|
327
|
+
elif event.button.id == "undoBtn":
|
|
328
|
+
self.action_undo_commit()
|
|
309
329
|
|
|
310
330
|
elif event.button.id == "regenBtn":
|
|
311
331
|
event.button.disabled = True
|
|
@@ -33,8 +33,18 @@ Read the diff carefully and choose exactly ONE of the following standard convent
|
|
|
33
33
|
Analyze the diff to understand the *high-level intent* and *functional purpose* of the changes. Do not just blindly list what lines were added or removed. Instead, explain *what the code actually accomplishes* in the context of the larger project.
|
|
34
34
|
Use the imperative, present tense mood. Be concise but highly descriptive. If the diff shows the introduction of a new library or UI framework, mention its purpose. Keep it abstract and functional rather than a literal line-by-line translation.
|
|
35
35
|
|
|
36
|
-
###
|
|
37
|
-
You
|
|
38
|
-
|
|
36
|
+
### CRITICAL OUTPUT FORMAT RULES
|
|
37
|
+
You MUST adhere to the following rules or your output will break the system:
|
|
38
|
+
1. OUTPUT EXACTLY ONE LINE. Do NOT output a list of multiple options or types.
|
|
39
|
+
2. DO NOT use any markdown formatting whatsoever (no bold `**`, no italics, no code blocks ` ``` `).
|
|
40
|
+
3. DO NOT start the line with a bullet point, dash (`-`), or asterisk (`*`).
|
|
41
|
+
4. DO NOT add any introductory or concluding text (e.g. no "Here is the commit message:").
|
|
39
42
|
|
|
40
|
-
|
|
43
|
+
The ONLY output you provide should be the raw, plain-text string matching this exact pattern:
|
|
44
|
+
type: description
|
|
45
|
+
|
|
46
|
+
Example of CORRECT output:
|
|
47
|
+
feat: implement asynchronous network checking for zero latency boot
|
|
48
|
+
|
|
49
|
+
Example of INCORRECT output:
|
|
50
|
+
- **feat:** implement asynchronous network checking
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "cli-comet"
|
|
7
|
-
version = "1.2.
|
|
7
|
+
version = "1.2.2"
|
|
8
8
|
description = "A terminal UI that automatically generates git commit messages using local language models via Ollama."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.10"
|
|
@@ -13,7 +13,7 @@ authors = [
|
|
|
13
13
|
]
|
|
14
14
|
classifiers = [
|
|
15
15
|
"Programming Language :: Python :: 3",
|
|
16
|
-
"License :: OSI Approved ::
|
|
16
|
+
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
|
|
17
17
|
"Operating System :: OS Independent",
|
|
18
18
|
"Environment :: Console",
|
|
19
19
|
]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[metadata]
|
|
2
2
|
name = cli-comet
|
|
3
|
-
version = 1.2.
|
|
3
|
+
version = 1.2.2
|
|
4
4
|
description = A terminal UI that automatically generates git commit messages using local language models via Ollama.
|
|
5
5
|
long_description = file: README.md
|
|
6
6
|
long_description_content_type = text/markdown
|
|
@@ -9,7 +9,7 @@ license = GPL-3.0 license
|
|
|
9
9
|
url = https://github.com/razoring/CometCLI
|
|
10
10
|
classifiers =
|
|
11
11
|
Programming Language :: Python :: 3
|
|
12
|
-
License :: OSI Approved ::
|
|
12
|
+
License :: OSI Approved :: GNU General Public License v3 (GPLv3)
|
|
13
13
|
Operating System :: OS Independent
|
|
14
14
|
Environment :: Console
|
|
15
15
|
|
cli_comet-1.2.0/PKG-INFO
DELETED
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: cli-comet
|
|
3
|
-
Version: 1.2.0
|
|
4
|
-
Summary: A terminal UI that automatically generates git commit messages using local language models via Ollama.
|
|
5
|
-
Home-page: https://github.com/razoring/CometCLI
|
|
6
|
-
Author: razoring
|
|
7
|
-
Classifier: Programming Language :: Python :: 3
|
|
8
|
-
Classifier: License :: OSI Approved :: MIT License
|
|
9
|
-
Classifier: Operating System :: OS Independent
|
|
10
|
-
Classifier: Environment :: Console
|
|
11
|
-
Requires-Python: >=3.10
|
|
12
|
-
Description-Content-Type: text/markdown
|
|
13
|
-
License-File: LICENSE
|
|
14
|
-
Requires-Dist: ollama
|
|
15
|
-
Requires-Dist: textual
|
|
16
|
-
Requires-Dist: colorama
|
|
17
|
-
Requires-Dist: openai
|
|
18
|
-
Dynamic: license-file
|
|
19
|
-
|
|
20
|
-
# Comet
|
|
21
|
-
|
|
22
|
-
Comet is a terminal user interface application that automatically generates descriptive git commit messages using local language models via Ollama. It analyzes your staged git diffs and provides a clean interface to review, edit, regenerate, and commit your changes.
|
|
23
|
-
|
|
24
|
-
## Features
|
|
25
|
-
|
|
26
|
-
- Local Model Generation: Connects to your local Ollama instance to generate commit messages privately.
|
|
27
|
-
- Model Swapping: Press `tab` to cycle through available local models directly from the interface. Comet defaults to your currently loaded model to save time.
|
|
28
|
-
- Context Aware: Automatically pulls in the last 5 commits to understand the tone and style of your project.
|
|
29
|
-
- Terminal User Interface: Built with Textual. It provides a dedicated text area to edit the generated message.
|
|
30
|
-
- Dynamic Newlines: Use the down arrow key on the last line to seamlessly add new lines to your commit message, and the up arrow key to remove them.
|
|
31
|
-
- Quick Undo: Press `ctrl+z` to instantly undo the last local commit if you need to make changes.
|
|
32
|
-
- Direct Syncing: Commit your changes and immediately push them to your remote repository with a second press of the commit button.
|
|
33
|
-
- Customizable Prompts: The instructions provided to the language model are stored in `comet/system.md` and can be edited to fit your specific workflow.
|
|
34
|
-
|
|
35
|
-
## Requirements
|
|
36
|
-
|
|
37
|
-
- Python 3.10 or higher
|
|
38
|
-
- Git installed and accessible in your system path
|
|
39
|
-
- Ollama installed and running locally
|
|
40
|
-
|
|
41
|
-
## Installation
|
|
42
|
-
|
|
43
|
-
Clone the repository and install the required dependencies:
|
|
44
|
-
|
|
45
|
-
```bash
|
|
46
|
-
git clone <repository_url>
|
|
47
|
-
cd Comet
|
|
48
|
-
python -m venv .venv
|
|
49
|
-
|
|
50
|
-
# On Windows
|
|
51
|
-
.venv\Scripts\activate
|
|
52
|
-
|
|
53
|
-
# On Unix/macOS
|
|
54
|
-
source .venv/bin/activate
|
|
55
|
-
|
|
56
|
-
pip install -r requirements.txt
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
## Usage
|
|
60
|
-
|
|
61
|
-
Ensure you have staged your changes using `git add` and that Ollama is running in the background.
|
|
62
|
-
|
|
63
|
-
Run the Comet application:
|
|
64
|
-
|
|
65
|
-
```bash
|
|
66
|
-
comet
|
|
67
|
-
```
|
|
68
|
-
|
|
69
|
-
### Keyboard Shortcuts
|
|
70
|
-
|
|
71
|
-
- `enter`: Commit the current text. If pressed again, it will push the commit to the remote repository.
|
|
72
|
-
- `tab`: Swap the active language model.
|
|
73
|
-
- `ctrl+r`: Regenerate the commit message with the current model.
|
|
74
|
-
- `ctrl+z`: Undo the most recent local commit.
|
|
75
|
-
- `ctrl+t`: Terminate the application.
|
|
76
|
-
- `down arrow`: Add a new line when at the bottom of the text area.
|
|
77
|
-
- `up arrow`: Remove the previous empty line.
|
|
78
|
-
|
|
79
|
-
## Architecture
|
|
80
|
-
|
|
81
|
-
Comet uses the `subprocess` module to run git commands and capture diffs. It reads the local `comet/system.md` file for system instructions and sends the diff to the Ollama Python client. The interface is built using Textual, providing responsive keyboard bindings and a resilient terminal layout.
|
cli_comet-1.2.0/README.md
DELETED
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
# Comet
|
|
2
|
-
|
|
3
|
-
Comet is a terminal user interface application that automatically generates descriptive git commit messages using local language models via Ollama. It analyzes your staged git diffs and provides a clean interface to review, edit, regenerate, and commit your changes.
|
|
4
|
-
|
|
5
|
-
## Features
|
|
6
|
-
|
|
7
|
-
- Local Model Generation: Connects to your local Ollama instance to generate commit messages privately.
|
|
8
|
-
- Model Swapping: Press `tab` to cycle through available local models directly from the interface. Comet defaults to your currently loaded model to save time.
|
|
9
|
-
- Context Aware: Automatically pulls in the last 5 commits to understand the tone and style of your project.
|
|
10
|
-
- Terminal User Interface: Built with Textual. It provides a dedicated text area to edit the generated message.
|
|
11
|
-
- Dynamic Newlines: Use the down arrow key on the last line to seamlessly add new lines to your commit message, and the up arrow key to remove them.
|
|
12
|
-
- Quick Undo: Press `ctrl+z` to instantly undo the last local commit if you need to make changes.
|
|
13
|
-
- Direct Syncing: Commit your changes and immediately push them to your remote repository with a second press of the commit button.
|
|
14
|
-
- Customizable Prompts: The instructions provided to the language model are stored in `comet/system.md` and can be edited to fit your specific workflow.
|
|
15
|
-
|
|
16
|
-
## Requirements
|
|
17
|
-
|
|
18
|
-
- Python 3.10 or higher
|
|
19
|
-
- Git installed and accessible in your system path
|
|
20
|
-
- Ollama installed and running locally
|
|
21
|
-
|
|
22
|
-
## Installation
|
|
23
|
-
|
|
24
|
-
Clone the repository and install the required dependencies:
|
|
25
|
-
|
|
26
|
-
```bash
|
|
27
|
-
git clone <repository_url>
|
|
28
|
-
cd Comet
|
|
29
|
-
python -m venv .venv
|
|
30
|
-
|
|
31
|
-
# On Windows
|
|
32
|
-
.venv\Scripts\activate
|
|
33
|
-
|
|
34
|
-
# On Unix/macOS
|
|
35
|
-
source .venv/bin/activate
|
|
36
|
-
|
|
37
|
-
pip install -r requirements.txt
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
## Usage
|
|
41
|
-
|
|
42
|
-
Ensure you have staged your changes using `git add` and that Ollama is running in the background.
|
|
43
|
-
|
|
44
|
-
Run the Comet application:
|
|
45
|
-
|
|
46
|
-
```bash
|
|
47
|
-
comet
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
### Keyboard Shortcuts
|
|
51
|
-
|
|
52
|
-
- `enter`: Commit the current text. If pressed again, it will push the commit to the remote repository.
|
|
53
|
-
- `tab`: Swap the active language model.
|
|
54
|
-
- `ctrl+r`: Regenerate the commit message with the current model.
|
|
55
|
-
- `ctrl+z`: Undo the most recent local commit.
|
|
56
|
-
- `ctrl+t`: Terminate the application.
|
|
57
|
-
- `down arrow`: Add a new line when at the bottom of the text area.
|
|
58
|
-
- `up arrow`: Remove the previous empty line.
|
|
59
|
-
|
|
60
|
-
## Architecture
|
|
61
|
-
|
|
62
|
-
Comet uses the `subprocess` module to run git commands and capture diffs. It reads the local `comet/system.md` file for system instructions and sends the diff to the Ollama Python client. The interface is built using Textual, providing responsive keyboard bindings and a resilient terminal layout.
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: cli-comet
|
|
3
|
-
Version: 1.2.0
|
|
4
|
-
Summary: A terminal UI that automatically generates git commit messages using local language models via Ollama.
|
|
5
|
-
Home-page: https://github.com/razoring/CometCLI
|
|
6
|
-
Author: razoring
|
|
7
|
-
Classifier: Programming Language :: Python :: 3
|
|
8
|
-
Classifier: License :: OSI Approved :: MIT License
|
|
9
|
-
Classifier: Operating System :: OS Independent
|
|
10
|
-
Classifier: Environment :: Console
|
|
11
|
-
Requires-Python: >=3.10
|
|
12
|
-
Description-Content-Type: text/markdown
|
|
13
|
-
License-File: LICENSE
|
|
14
|
-
Requires-Dist: ollama
|
|
15
|
-
Requires-Dist: textual
|
|
16
|
-
Requires-Dist: colorama
|
|
17
|
-
Requires-Dist: openai
|
|
18
|
-
Dynamic: license-file
|
|
19
|
-
|
|
20
|
-
# Comet
|
|
21
|
-
|
|
22
|
-
Comet is a terminal user interface application that automatically generates descriptive git commit messages using local language models via Ollama. It analyzes your staged git diffs and provides a clean interface to review, edit, regenerate, and commit your changes.
|
|
23
|
-
|
|
24
|
-
## Features
|
|
25
|
-
|
|
26
|
-
- Local Model Generation: Connects to your local Ollama instance to generate commit messages privately.
|
|
27
|
-
- Model Swapping: Press `tab` to cycle through available local models directly from the interface. Comet defaults to your currently loaded model to save time.
|
|
28
|
-
- Context Aware: Automatically pulls in the last 5 commits to understand the tone and style of your project.
|
|
29
|
-
- Terminal User Interface: Built with Textual. It provides a dedicated text area to edit the generated message.
|
|
30
|
-
- Dynamic Newlines: Use the down arrow key on the last line to seamlessly add new lines to your commit message, and the up arrow key to remove them.
|
|
31
|
-
- Quick Undo: Press `ctrl+z` to instantly undo the last local commit if you need to make changes.
|
|
32
|
-
- Direct Syncing: Commit your changes and immediately push them to your remote repository with a second press of the commit button.
|
|
33
|
-
- Customizable Prompts: The instructions provided to the language model are stored in `comet/system.md` and can be edited to fit your specific workflow.
|
|
34
|
-
|
|
35
|
-
## Requirements
|
|
36
|
-
|
|
37
|
-
- Python 3.10 or higher
|
|
38
|
-
- Git installed and accessible in your system path
|
|
39
|
-
- Ollama installed and running locally
|
|
40
|
-
|
|
41
|
-
## Installation
|
|
42
|
-
|
|
43
|
-
Clone the repository and install the required dependencies:
|
|
44
|
-
|
|
45
|
-
```bash
|
|
46
|
-
git clone <repository_url>
|
|
47
|
-
cd Comet
|
|
48
|
-
python -m venv .venv
|
|
49
|
-
|
|
50
|
-
# On Windows
|
|
51
|
-
.venv\Scripts\activate
|
|
52
|
-
|
|
53
|
-
# On Unix/macOS
|
|
54
|
-
source .venv/bin/activate
|
|
55
|
-
|
|
56
|
-
pip install -r requirements.txt
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
## Usage
|
|
60
|
-
|
|
61
|
-
Ensure you have staged your changes using `git add` and that Ollama is running in the background.
|
|
62
|
-
|
|
63
|
-
Run the Comet application:
|
|
64
|
-
|
|
65
|
-
```bash
|
|
66
|
-
comet
|
|
67
|
-
```
|
|
68
|
-
|
|
69
|
-
### Keyboard Shortcuts
|
|
70
|
-
|
|
71
|
-
- `enter`: Commit the current text. If pressed again, it will push the commit to the remote repository.
|
|
72
|
-
- `tab`: Swap the active language model.
|
|
73
|
-
- `ctrl+r`: Regenerate the commit message with the current model.
|
|
74
|
-
- `ctrl+z`: Undo the most recent local commit.
|
|
75
|
-
- `ctrl+t`: Terminate the application.
|
|
76
|
-
- `down arrow`: Add a new line when at the bottom of the text area.
|
|
77
|
-
- `up arrow`: Remove the previous empty line.
|
|
78
|
-
|
|
79
|
-
## Architecture
|
|
80
|
-
|
|
81
|
-
Comet uses the `subprocess` module to run git commands and capture diffs. It reads the local `comet/system.md` file for system instructions and sends the diff to the Ollama Python client. The interface is built using Textual, providing responsive keyboard bindings and a resilient terminal layout.
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|