commit-maker 0.2.2__py3-none-any.whl → 0.3.0__py3-none-any.whl
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.
- commit_maker/colored.py +59 -0
- commit_maker/custom_int_prompt.py +6 -0
- commit_maker/cut_think_part.py +6 -0
- commit_maker/main.py +259 -388
- commit_maker/mistral.py +68 -0
- commit_maker/ollama.py +65 -0
- commit_maker/rich_custom_formatter.py +11 -0
- commit_maker-0.3.0.dist-info/METADATA +127 -0
- commit_maker-0.3.0.dist-info/RECORD +14 -0
- {commit_maker-0.2.2.dist-info → commit_maker-0.3.0.dist-info}/WHEEL +1 -1
- commit_maker-0.2.2.dist-info/METADATA +0 -154
- commit_maker-0.2.2.dist-info/RECORD +0 -8
- {commit_maker-0.2.2.dist-info → commit_maker-0.3.0.dist-info}/entry_points.txt +0 -0
- {commit_maker-0.2.2.dist-info → commit_maker-0.3.0.dist-info}/licenses/LICENSE +0 -0
- {commit_maker-0.2.2.dist-info → commit_maker-0.3.0.dist-info}/top_level.txt +0 -0
commit_maker/mistral.py
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# Класс для использования API Mistral AI
|
|
2
|
+
from typing import Optional
|
|
3
|
+
|
|
4
|
+
import requests
|
|
5
|
+
import rich.console
|
|
6
|
+
|
|
7
|
+
console = rich.console.Console()
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class MistralAI:
|
|
11
|
+
"""Класс для общения с MistralAI.
|
|
12
|
+
Написан с помощью requests."""
|
|
13
|
+
|
|
14
|
+
def __init__(
|
|
15
|
+
self,
|
|
16
|
+
api_key: str,
|
|
17
|
+
model: str = "mistral-small-latest",
|
|
18
|
+
):
|
|
19
|
+
"""Инициализация класса
|
|
20
|
+
|
|
21
|
+
Args:
|
|
22
|
+
api_key (str): Апи ключ MistralAI
|
|
23
|
+
"""
|
|
24
|
+
self.url = "https://api.mistral.ai/v1/chat/completions"
|
|
25
|
+
self.api_key = api_key
|
|
26
|
+
self.headers = {
|
|
27
|
+
"Content-Type": "application/json",
|
|
28
|
+
"Accept": "application/json",
|
|
29
|
+
"Authorization": f"Bearer {api_key}",
|
|
30
|
+
}
|
|
31
|
+
self.model = model
|
|
32
|
+
|
|
33
|
+
def message(
|
|
34
|
+
self,
|
|
35
|
+
messages: list[dict[str]],
|
|
36
|
+
timeout: Optional[int],
|
|
37
|
+
temperature: float,
|
|
38
|
+
) -> str:
|
|
39
|
+
"""Функция для общения с моделью
|
|
40
|
+
|
|
41
|
+
Args:
|
|
42
|
+
messages (list[dict[str]]): Список сообщений
|
|
43
|
+
timeout (int): Таймаут(время ожидания, в сек.)
|
|
44
|
+
role (str, optional): Роль сообщения. Defaults to "user".
|
|
45
|
+
temperature (float, optional): Температура общения. Defaults to 0.7. #noqa
|
|
46
|
+
|
|
47
|
+
Returns:
|
|
48
|
+
str: _description_
|
|
49
|
+
"""
|
|
50
|
+
data = {
|
|
51
|
+
"model": self.model,
|
|
52
|
+
"messages": messages,
|
|
53
|
+
"temperature": 0.7,
|
|
54
|
+
}
|
|
55
|
+
try:
|
|
56
|
+
response = requests.post(
|
|
57
|
+
url=self.url,
|
|
58
|
+
json=data,
|
|
59
|
+
headers=self.headers,
|
|
60
|
+
timeout=timeout,
|
|
61
|
+
)
|
|
62
|
+
response.raise_for_status()
|
|
63
|
+
return response.json()["choices"][0]["message"]["content"]
|
|
64
|
+
|
|
65
|
+
except requests.exceptions.RequestException:
|
|
66
|
+
console.print_exception()
|
|
67
|
+
except KeyError:
|
|
68
|
+
console.print_exception()
|
commit_maker/ollama.py
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# Класс для использования API Ollama
|
|
2
|
+
from typing import Optional
|
|
3
|
+
|
|
4
|
+
import requests
|
|
5
|
+
import rich.console
|
|
6
|
+
|
|
7
|
+
console = rich.console.Console()
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class Ollama:
|
|
11
|
+
"""Класс для общения с локальными моделями Ollama.
|
|
12
|
+
Написан с помощью requests."""
|
|
13
|
+
|
|
14
|
+
def __init__(
|
|
15
|
+
self,
|
|
16
|
+
model: str,
|
|
17
|
+
):
|
|
18
|
+
"""Инициализация класса"""
|
|
19
|
+
self.model = model
|
|
20
|
+
self.url = "http://localhost:11434/api/chat"
|
|
21
|
+
self.headers = {
|
|
22
|
+
"Content-Type": "application/json",
|
|
23
|
+
"Accept": "application/json",
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
def message(
|
|
27
|
+
self,
|
|
28
|
+
messages: list[dict[str]],
|
|
29
|
+
timeout: Optional[int],
|
|
30
|
+
temperature: float,
|
|
31
|
+
) -> str:
|
|
32
|
+
"""Функция сообщения
|
|
33
|
+
|
|
34
|
+
Args:
|
|
35
|
+
messages (list[dict[str]]): Список сообщений
|
|
36
|
+
timeout (int): Таймаут ожидания сообщения
|
|
37
|
+
model (str): Модель, с которой будем общаться
|
|
38
|
+
temperature (float, optional): Температура общения. Defaults to 0.7
|
|
39
|
+
|
|
40
|
+
Returns:
|
|
41
|
+
str: Json-ответ/Err
|
|
42
|
+
"""
|
|
43
|
+
data = {
|
|
44
|
+
"model": self.model,
|
|
45
|
+
"messages": messages,
|
|
46
|
+
"options": {
|
|
47
|
+
"temperature": temperature,
|
|
48
|
+
},
|
|
49
|
+
"stream": False,
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
try:
|
|
53
|
+
response = requests.post(
|
|
54
|
+
url=self.url,
|
|
55
|
+
json=data,
|
|
56
|
+
headers=self.headers,
|
|
57
|
+
timeout=timeout,
|
|
58
|
+
)
|
|
59
|
+
response.raise_for_status() # выбросит ошибку при плохом статусе
|
|
60
|
+
return response.json()["message"]["content"]
|
|
61
|
+
|
|
62
|
+
except requests.exceptions.RequestException:
|
|
63
|
+
console.print_exception()
|
|
64
|
+
except KeyError:
|
|
65
|
+
console.print_exception()
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# Кастомный форматтер для --help
|
|
2
|
+
import rich_argparse
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
class CustomFormatter(rich_argparse.RichHelpFormatter):
|
|
6
|
+
styles = {
|
|
7
|
+
"argparse.args": "cyan bold",
|
|
8
|
+
"argparse.groups": "green bold",
|
|
9
|
+
"argparse.metavar": "dark_cyan",
|
|
10
|
+
"argparse.prog": "dark_green bold",
|
|
11
|
+
}
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: commit-maker
|
|
3
|
+
Version: 0.3.0
|
|
4
|
+
Summary: CLI utility that generates commit messages using AI
|
|
5
|
+
Author-email: Alex Bulgakov <sashayerty@ya.ru>
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/sashayerty/commit_maker
|
|
8
|
+
Project-URL: Repository, https://github.com/sashayerty/commit_maker
|
|
9
|
+
Requires-Python: >=3.8
|
|
10
|
+
Description-Content-Type: text/markdown
|
|
11
|
+
License-File: LICENSE
|
|
12
|
+
Requires-Dist: requests>=2.32.3
|
|
13
|
+
Requires-Dist: rich-argparse>=1.7.0
|
|
14
|
+
Dynamic: license-file
|
|
15
|
+
|
|
16
|
+
# Commit Maker [](https://www.python.org/) [](https://docs.astral.sh/uv/) [](https://ollama.com/)
|
|
17
|
+

|
|
18
|
+
|
|
19
|
+
## All commits in the repository are generated by this program
|
|
20
|
+
This CLI utility automatically creates meaningful git commit messages using local models via ollama/Mistral AI API based on the output of `git status` and `git diff` commands. It is implemented as a single file for easy conversion into an executable.
|
|
21
|
+
|
|
22
|
+
1. [Features](#features)
|
|
23
|
+
2. [Requirements](#requirements)
|
|
24
|
+
- [Mistral](#getting-a-mistral-ai-api-key)
|
|
25
|
+
- [Ollama](#installing-ollama)
|
|
26
|
+
3. [Installation](#installation)
|
|
27
|
+
4. [Setting up environment variables](#setting-up-environment-variables)
|
|
28
|
+
- [Windows](#windows)
|
|
29
|
+
- [Linux/MacOS](#linuxmacos)
|
|
30
|
+
5. [Usage](#usage)
|
|
31
|
+
6. [Notes](#notes)
|
|
32
|
+
7. [License](#license)
|
|
33
|
+
|
|
34
|
+
## Features
|
|
35
|
+
- Automatically generates meaningful commit messages in Russian
|
|
36
|
+
- Interactive confirmation before creating a commit
|
|
37
|
+
- Works with both existing and new Git repositories
|
|
38
|
+
- Uses local models/Mistral AI API to generate commit messages based on repository changes
|
|
39
|
+
|
|
40
|
+
## Requirements
|
|
41
|
+
- Git installed on your system
|
|
42
|
+
- Mistral API key (for using Mistral AI API)
|
|
43
|
+
- Ollama installed on your system (for using local models)
|
|
44
|
+
|
|
45
|
+
### Getting a Mistral AI API Key
|
|
46
|
+
To get a key, go to the Mistral console website [Mistral](https://console.mistral.ai/api-keys) and create an API key. You need a [Mistral](https://auth.mistral.ai/ui/login) account to do this.
|
|
47
|
+
|
|
48
|
+
### Installing Ollama
|
|
49
|
+
To install ollama, go to the [Ollama](https://ollama.com/download) website and choose the method suitable for your system.
|
|
50
|
+
|
|
51
|
+
## Installation
|
|
52
|
+
|
|
53
|
+
### From Source
|
|
54
|
+
When installing from source, use the `-e` flag to always have the latest version of the utility after `git pull` **without reinstallation**!
|
|
55
|
+
```bash
|
|
56
|
+
git clone https://github.com/Sashayerty/commit_maker
|
|
57
|
+
cd ./commit_maker
|
|
58
|
+
# Windows
|
|
59
|
+
pip install -r requirements.txt
|
|
60
|
+
# Linux/MacOS
|
|
61
|
+
pip3 install -r requirements.txt
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## Setting Up Environment Variables
|
|
65
|
+
After installing the utility, you must add the `MISTRAL_API_KEY` environment variable.
|
|
66
|
+
|
|
67
|
+
### Windows
|
|
68
|
+
1. Open Command Prompt as Administrator
|
|
69
|
+
2. Set the Mistral API key:
|
|
70
|
+
```cmd
|
|
71
|
+
setx MISTRAL_API_KEY "your_api_key_here"
|
|
72
|
+
```
|
|
73
|
+
3. Restart your terminal/IDE to apply the changes
|
|
74
|
+
|
|
75
|
+
### Linux/macOS
|
|
76
|
+
1. Open the terminal
|
|
77
|
+
2. Add to your shell configuration file (`~/.bashrc`, `~/.zshrc`, or `~/.bash_profile`):
|
|
78
|
+
```bash
|
|
79
|
+
export MISTRAL_API_KEY="your_api_key_here"
|
|
80
|
+
```
|
|
81
|
+
3. Reload the configuration:
|
|
82
|
+
```bash
|
|
83
|
+
source ~/.bashrc # or whichever file you edited
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
## Usage
|
|
87
|
+
```bash
|
|
88
|
+
commit_maker [OPTION] [VALUE]
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
### Usage Examples
|
|
92
|
+
**-h**, **--help** - display help
|
|
93
|
+
**-l**, **--local-models** - use local models
|
|
94
|
+
**-m**, **--max-symbols** - limit the length of the commit message
|
|
95
|
+
**-M**, **--model** - specify which local model to use (with **-l**)
|
|
96
|
+
**-d**, **--dry-run** - display the message based on staged changes without creating a commit
|
|
97
|
+
**-t**, **--temperature** - model temperature when creating the message
|
|
98
|
+
**-e**, **--exclude** - files to ignore when creating the commit message
|
|
99
|
+
**-w**, **--wish** - wishes/edits for the message
|
|
100
|
+
**-L**, **--language** - change language of commits
|
|
101
|
+
**-V**, **--version** - show version
|
|
102
|
+
|
|
103
|
+
1. Use local models, limit commit message length to 300 characters, use qwen2.5:12b
|
|
104
|
+
```bash
|
|
105
|
+
commit_maker -l -m 300 -M qwen2.5:12b
|
|
106
|
+
```
|
|
107
|
+
2. Use Mistral, temperature 1.3, dry run
|
|
108
|
+
```bash
|
|
109
|
+
commit_maker -t 1.3 -d
|
|
110
|
+
```
|
|
111
|
+
3. Local models, interactive model selection
|
|
112
|
+
```bash
|
|
113
|
+
commit_maker -l
|
|
114
|
+
```
|
|
115
|
+
4. Local models, message length 100 characters, ignore `uv.lock`, wish "Mention the README.md change"
|
|
116
|
+
```bash
|
|
117
|
+
commit_maker -l -m 100 -e "./uv.lock" -w "Mention the README.md change"
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
## Notes
|
|
121
|
+
- To view all possible script execution options, add the `--help` flag
|
|
122
|
+
- The script will show the generated commit message before creating it
|
|
123
|
+
- You can regenerate the message by pressing `r` when prompted for confirmation
|
|
124
|
+
- By default, messages are generated in Russian (can be changed in the script)
|
|
125
|
+
|
|
126
|
+
## License
|
|
127
|
+
Commit Maker is licensed under [MIT](LICENSE)
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
commit_maker/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
+
commit_maker/colored.py,sha256=yxlMviPaEgBXl3ukEGVdIzRSGtW9CwRLchPkA_FVu6U,1664
|
|
3
|
+
commit_maker/custom_int_prompt.py,sha256=DDqAOaVYYMrudz2goo4N43kVGrox0xtpaBiO4Dvhi-c,183
|
|
4
|
+
commit_maker/cut_think_part.py,sha256=DSp5IRT5tg6wu3rZXhm7R_4muZ3KEdl8eyP3T0Kgrok,143
|
|
5
|
+
commit_maker/main.py,sha256=NSV5gFDf3i4ScY5Z2TYRIkNFw1x7viS1JCaAd1xui78,16874
|
|
6
|
+
commit_maker/mistral.py,sha256=XZrSXFm0ga173KPz91HRSqJ8aiid1XljlE9LonrCJrY,2030
|
|
7
|
+
commit_maker/ollama.py,sha256=J-_5BR9zMDaDWj_VYnlo-wUmKf-kII86wPWQIVj2kJc,1953
|
|
8
|
+
commit_maker/rich_custom_formatter.py,sha256=QFg51c1nTfCUS1bgcaWySjPHMJy2u2IbexNDL_0FgUI,318
|
|
9
|
+
commit_maker-0.3.0.dist-info/licenses/LICENSE,sha256=l88G-hzmKpm5x5R2QG4r_MMJv7PKfr9ubE-VLQ3XMBM,1070
|
|
10
|
+
commit_maker-0.3.0.dist-info/METADATA,sha256=xuwtlIYt6sjttLhvQCCkeW0-OVklsDUUwmbarALittM,4828
|
|
11
|
+
commit_maker-0.3.0.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
|
|
12
|
+
commit_maker-0.3.0.dist-info/entry_points.txt,sha256=Mw8sNx-b56y6XLyq7fw9GWuoiuVcq40M1dNKYphh7us,56
|
|
13
|
+
commit_maker-0.3.0.dist-info/top_level.txt,sha256=yQcvhH10NmLr9i84KxdAMPG7zVQXWTyT6Ev6E3v6UdU,13
|
|
14
|
+
commit_maker-0.3.0.dist-info/RECORD,,
|
|
@@ -1,154 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: commit-maker
|
|
3
|
-
Version: 0.2.2
|
|
4
|
-
Summary: CLI-утилита для генерации git-коммитов с помощью ИИ
|
|
5
|
-
Author-email: Alex Bulgakov <sashayerty@ya.ru>
|
|
6
|
-
License: MIT
|
|
7
|
-
Project-URL: Homepage, https://github.com/sashayerty/commit_maker
|
|
8
|
-
Requires-Python: >=3.8
|
|
9
|
-
Description-Content-Type: text/markdown
|
|
10
|
-
License-File: LICENSE
|
|
11
|
-
Requires-Dist: requests>=2.32.3
|
|
12
|
-
Requires-Dist: rich-argparse>=1.7.0
|
|
13
|
-
Dynamic: license-file
|
|
14
|
-
|
|
15
|
-
# Commit Maker [](https://www.python.org/) [](https://docs.astral.sh/uv/) [](https://ollama.com/) [](https://pypi.org/project/commit-maker/)
|
|
16
|
-
|
|
17
|
-

|
|
18
|
-
|
|
19
|
-
## Все коммиты в репозитории - результат работы программы
|
|
20
|
-
|
|
21
|
-
Эта CLI-утилита автоматически создает осмысленные сообщения для git-коммитов, используя локальные модели через ollama/Mistral AI API на основе вывода команд `git status` и `git diff`. Реализована в виде одного файла для удобства перевода в исполняемый файл.
|
|
22
|
-
|
|
23
|
-
1. [Возможности](#возможности)
|
|
24
|
-
2. [Требования](#требования)
|
|
25
|
-
- [Mistral](#получение-api-ключа-mistral-ai)
|
|
26
|
-
- [Ollama](#установка-ollama)
|
|
27
|
-
3. [Установка](#установка)
|
|
28
|
-
4. [Настройка переменных окружения](#настройка-переменных-окружения)
|
|
29
|
-
- [Windows](#windows)
|
|
30
|
-
- [Linux/MacOS](#linuxmacos)
|
|
31
|
-
5. [Использование](#использование)
|
|
32
|
-
6. [Примечания](#примечания)
|
|
33
|
-
7. [Лицензия](#лицензия)
|
|
34
|
-
|
|
35
|
-
## Возможности
|
|
36
|
-
|
|
37
|
-
- Автоматически генерирует содержательные сообщения коммитов на русском языке
|
|
38
|
-
- Интерактивное подтверждение перед созданием коммита
|
|
39
|
-
- Работает как с существующими Git-репозиториями, так и с новыми
|
|
40
|
-
- Использование локальных моделей/Mistral AI API для формирования сообщений коммитов на основе изменений в репозитории.
|
|
41
|
-
|
|
42
|
-
## Требования
|
|
43
|
-
|
|
44
|
-
- Установленный Git в системе
|
|
45
|
-
- API-ключ Mistral (для использования Mistral AI API)
|
|
46
|
-
- Установленная ollama в системе (для использования локальных моделей)
|
|
47
|
-
|
|
48
|
-
### Получение API ключа Mistral AI
|
|
49
|
-
|
|
50
|
-
Для получения ключа необходимо перейти сайт консоли [Mistral](https://console.mistral.ai/api-keys) и создать API ключ. Для получения необходим аккаунт [Mistral](https://auth.mistral.ai/ui/login).
|
|
51
|
-
|
|
52
|
-
### Установка ollama
|
|
53
|
-
|
|
54
|
-
Для установки ollama переходим на сайт [Ollama](https://ollama.com/download) и выбираем способ, подходящий для Вашей системы.
|
|
55
|
-
|
|
56
|
-
## Установка
|
|
57
|
-
|
|
58
|
-
### Pip
|
|
59
|
-
|
|
60
|
-
Установка последнего релиза с pypi.
|
|
61
|
-
```bash
|
|
62
|
-
# Windows
|
|
63
|
-
pip install commit_maker
|
|
64
|
-
# Linux/MacOS
|
|
65
|
-
pip3 install commit_maker
|
|
66
|
-
```
|
|
67
|
-
|
|
68
|
-
### Из исходников
|
|
69
|
-
|
|
70
|
-
При установке из исходников используется флаг `-e`, что позволяет после `git pull` иметь сразу же свежую версию утилиты **без переустановки**!
|
|
71
|
-
```bash
|
|
72
|
-
git clone https://github.com/Sashayerty/commit_maker
|
|
73
|
-
cd ./commit_maker
|
|
74
|
-
# Windows
|
|
75
|
-
pip install -r requirements.txt
|
|
76
|
-
# Linux/MacOS
|
|
77
|
-
pip3 install -r requirements.txt
|
|
78
|
-
```
|
|
79
|
-
|
|
80
|
-
## Настройка переменных окружения
|
|
81
|
-
|
|
82
|
-
После установки утилиты нужно обязательно добавить переменную окружения `MISTRAL_API_KEY`
|
|
83
|
-
|
|
84
|
-
### Windows
|
|
85
|
-
|
|
86
|
-
1. Откройте Командную строку от имени Администратора
|
|
87
|
-
2. Установите API-ключ Mistral:
|
|
88
|
-
|
|
89
|
-
```cmd
|
|
90
|
-
setx MISTRAL_API_KEY "ваш_api_ключ_здесь"
|
|
91
|
-
```
|
|
92
|
-
|
|
93
|
-
3. Перезапустите терминал/IDE для применения изменений
|
|
94
|
-
|
|
95
|
-
### Linux/macOS
|
|
96
|
-
|
|
97
|
-
1. Откройте терминал
|
|
98
|
-
2. Добавьте в файл конфигурации вашей оболочки (`~/.bashrc`, `~/.zshrc` или `~/.bash_profile`):
|
|
99
|
-
|
|
100
|
-
```bash
|
|
101
|
-
export MISTRAL_API_KEY="ваш_api_ключ_здесь"
|
|
102
|
-
```
|
|
103
|
-
|
|
104
|
-
3. Перезагрузите конфигурацию:
|
|
105
|
-
|
|
106
|
-
```bash
|
|
107
|
-
source ~/.bashrc # или другой файл, который вы редактировали
|
|
108
|
-
```
|
|
109
|
-
|
|
110
|
-
## Использование
|
|
111
|
-
|
|
112
|
-
```bash
|
|
113
|
-
commit_maker [OPTION] [VALUE]
|
|
114
|
-
```
|
|
115
|
-
|
|
116
|
-
### Пример использования
|
|
117
|
-
|
|
118
|
-
**`-h`**, **`--help`** - вывод помощи
|
|
119
|
-
**`-l`**, **`--local-models`** - использование локальных моделей
|
|
120
|
-
**`-m`**, **`--max-symbols`** - ограничение длины сообщения коммита
|
|
121
|
-
**`-M`**, **`--model`** - какую локальную модель использовать (при **`-l`**)
|
|
122
|
-
**`-d`**, **`--dry-run`** - вывод сообщения на основе зайстейдженных изменений, без создания коммита
|
|
123
|
-
**`-t`**, **`--temperature`** - температура модели при создании месседжа
|
|
124
|
-
**`-e`**, **`--exclude`** - файлы, которые нужно игнорировать при создании сообщения коммита
|
|
125
|
-
**`--version`** - показывает версию
|
|
126
|
-
|
|
127
|
-
1. Используем локальные модели, ограничение длины сообщения коммита 300 символов, используем qwen2.5:12b
|
|
128
|
-
|
|
129
|
-
```bash
|
|
130
|
-
commit_maker -l -m 300 -M qwen2.5:12b
|
|
131
|
-
```
|
|
132
|
-
|
|
133
|
-
2. Используем Mistral, температура 1.3, dry run
|
|
134
|
-
|
|
135
|
-
```bash
|
|
136
|
-
commit_maker -t 1.3 -d
|
|
137
|
-
```
|
|
138
|
-
|
|
139
|
-
3. Локальные модели, интерактивный выбор модели
|
|
140
|
-
|
|
141
|
-
```bash
|
|
142
|
-
commit_maker -l
|
|
143
|
-
```
|
|
144
|
-
|
|
145
|
-
## Примечания
|
|
146
|
-
|
|
147
|
-
- Для просмотра всех возможных опций выполнения скрипта добавьте флаг `--help`
|
|
148
|
-
- Скрипт покажет сгенерированное сообщение коммита перед его созданием
|
|
149
|
-
- Вы можете повторно сгенерировать сообщение, нажав `r` при запросе подтверждения
|
|
150
|
-
- По умолчанию сообщения генерируются на русском языке (можно изменить в скрипте)
|
|
151
|
-
|
|
152
|
-
## Лицензия
|
|
153
|
-
|
|
154
|
-
Commit Maker лицензирован [MIT](LICENSE)
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
commit_maker/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
-
commit_maker/main.py,sha256=wJJrStnKSMrrGod9vs_yEpN-LYlnHeARCk5NnNc3hSo,21636
|
|
3
|
-
commit_maker-0.2.2.dist-info/licenses/LICENSE,sha256=l88G-hzmKpm5x5R2QG4r_MMJv7PKfr9ubE-VLQ3XMBM,1070
|
|
4
|
-
commit_maker-0.2.2.dist-info/METADATA,sha256=vZMwKZYKhaUcpzg0piWYAzd9GPAZ03DfaFwGiFP1yI4,7238
|
|
5
|
-
commit_maker-0.2.2.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
|
|
6
|
-
commit_maker-0.2.2.dist-info/entry_points.txt,sha256=Mw8sNx-b56y6XLyq7fw9GWuoiuVcq40M1dNKYphh7us,56
|
|
7
|
-
commit_maker-0.2.2.dist-info/top_level.txt,sha256=yQcvhH10NmLr9i84KxdAMPG7zVQXWTyT6Ev6E3v6UdU,13
|
|
8
|
-
commit_maker-0.2.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|