mkpr-cli 1.0.0 → 1.0.2
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.
- package/README.md +87 -20
- package/package.json +2 -2
- package/src/index.js +1169 -1160
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<picture>
|
|
5
5
|
<source media="(prefers-color-scheme: dark)" srcset="./black-favicon.svg">
|
|
6
6
|
<source media="(prefers-color-scheme: light)" srcset="./white-favicon.svg">
|
|
7
|
-
<img src="./black-favicon.svg" alt="
|
|
7
|
+
<img src="./black-favicon.svg" alt="mkpr logo" width="150">
|
|
8
8
|
</picture>
|
|
9
9
|
</p>
|
|
10
10
|
|
|
@@ -21,16 +21,27 @@ CLI to automatically generate Pull Request descriptions using **Ollama** with lo
|
|
|
21
21
|
|
|
22
22
|
## Installation
|
|
23
23
|
|
|
24
|
-
### From
|
|
24
|
+
### From npm (recommended)
|
|
25
25
|
|
|
26
26
|
```bash
|
|
27
|
+
npm install -g mkpr-cli
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
### From source
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
# Clone the repository
|
|
34
|
+
git clone https://github.com/yourusername/mkpr-cli.git
|
|
35
|
+
cd mkpr-cli
|
|
36
|
+
|
|
37
|
+
# Install globally
|
|
27
38
|
npm install -g .
|
|
28
39
|
```
|
|
29
40
|
|
|
30
|
-
###
|
|
41
|
+
### Run without installing
|
|
31
42
|
|
|
32
43
|
```bash
|
|
33
|
-
|
|
44
|
+
npx mkpr-cli
|
|
34
45
|
```
|
|
35
46
|
|
|
36
47
|
## Requirements
|
|
@@ -71,7 +82,10 @@ mkpr -b develop -o ./prs --dry-run
|
|
|
71
82
|
# View current configuration
|
|
72
83
|
mkpr --show-config
|
|
73
84
|
|
|
74
|
-
# Change Ollama model
|
|
85
|
+
# Change Ollama model (interactive selector)
|
|
86
|
+
mkpr --set-model
|
|
87
|
+
|
|
88
|
+
# Change Ollama model (direct)
|
|
75
89
|
mkpr --set-model llama3.1
|
|
76
90
|
|
|
77
91
|
# Change Ollama port
|
|
@@ -90,6 +104,22 @@ mkpr --list-models
|
|
|
90
104
|
mkpr --help
|
|
91
105
|
```
|
|
92
106
|
|
|
107
|
+
### File exclusion management
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
# List excluded files
|
|
111
|
+
mkpr --list-excludes
|
|
112
|
+
|
|
113
|
+
# Add file to exclusion list
|
|
114
|
+
mkpr --add-exclude "*.generated.js"
|
|
115
|
+
|
|
116
|
+
# Remove file from exclusion list
|
|
117
|
+
mkpr --remove-exclude "package-lock.json"
|
|
118
|
+
|
|
119
|
+
# Reset exclusion list to defaults
|
|
120
|
+
mkpr --reset-excludes
|
|
121
|
+
```
|
|
122
|
+
|
|
93
123
|
## Workflow
|
|
94
124
|
|
|
95
125
|
1. Create your feature branch: `git checkout -b feature/new-functionality`
|
|
@@ -104,6 +134,7 @@ mkpr --help
|
|
|
104
134
|
- ✅ **Accept** and save the file
|
|
105
135
|
- 🔄 **Regenerate** another description
|
|
106
136
|
- ✏️ **Edit** the title manually
|
|
137
|
+
- 🤖 **Change model** and regenerate
|
|
107
138
|
- ❌ **Cancel** the operation
|
|
108
139
|
|
|
109
140
|
## Output example
|
|
@@ -111,21 +142,36 @@ mkpr --help
|
|
|
111
142
|
The generated file `feature_new-functionality_pr.md` will contain:
|
|
112
143
|
|
|
113
144
|
```markdown
|
|
145
|
+
# Add user authentication system
|
|
146
|
+
|
|
147
|
+
**Type:** ✨ `feature`
|
|
148
|
+
|
|
149
|
+
**Branch:** `feature/add-user-auth` → `origin/main`
|
|
150
|
+
|
|
114
151
|
## Description
|
|
115
|
-
This PR implements the new functionality of...
|
|
116
152
|
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
- Updated documentation
|
|
153
|
+
This PR implements a complete user authentication system with JWT tokens...
|
|
154
|
+
|
|
155
|
+
## Changes
|
|
121
156
|
|
|
122
|
-
|
|
123
|
-
|
|
157
|
+
- Add AuthService with JWT token generation
|
|
158
|
+
- Implement login and registration endpoints
|
|
159
|
+
- Create token validation middleware
|
|
160
|
+
- Update route configuration
|
|
161
|
+
|
|
162
|
+
## Stats
|
|
163
|
+
|
|
164
|
+
- **Commits:** 5
|
|
165
|
+
- **Files changed:** 12
|
|
166
|
+
- **Files added:** 4
|
|
167
|
+
- **Files modified:** 8
|
|
124
168
|
|
|
125
169
|
## Checklist
|
|
170
|
+
|
|
126
171
|
- [ ] Code follows project standards
|
|
127
172
|
- [ ] Tests have been added (if applicable)
|
|
128
173
|
- [ ] Documentation has been updated (if applicable)
|
|
174
|
+
- [ ] Changes have been tested locally
|
|
129
175
|
```
|
|
130
176
|
|
|
131
177
|
## Usage example
|
|
@@ -148,18 +194,12 @@ $ mkpr
|
|
|
148
194
|
[M] package.json
|
|
149
195
|
... and 8 more files
|
|
150
196
|
|
|
151
|
-
|
|
197
|
+
⠋ Generating description with llama3.2...
|
|
152
198
|
✔ Description generated
|
|
153
199
|
|
|
154
200
|
📝 Proposed PR description:
|
|
155
201
|
────────────────────────────────────────────────────────────
|
|
156
|
-
|
|
157
|
-
This PR implements the user authentication system...
|
|
158
|
-
|
|
159
|
-
## Changes made
|
|
160
|
-
- New authentication service with JWT
|
|
161
|
-
- Login and registration endpoints
|
|
162
|
-
- Token validation middleware
|
|
202
|
+
# Add user authentication system
|
|
163
203
|
...
|
|
164
204
|
────────────────────────────────────────────────────────────
|
|
165
205
|
|
|
@@ -167,6 +207,9 @@ This PR implements the user authentication system...
|
|
|
167
207
|
❯ ✅ Accept and save file
|
|
168
208
|
🔄 Generate another description
|
|
169
209
|
✏️ Edit title manually
|
|
210
|
+
──────────────
|
|
211
|
+
🤖 Change model
|
|
212
|
+
──────────────
|
|
170
213
|
❌ Cancel
|
|
171
214
|
|
|
172
215
|
✔ File saved: ./feature_add-user-auth_pr.md
|
|
@@ -183,12 +226,36 @@ This PR implements the user authentication system...
|
|
|
183
226
|
| Base branch | `main` |
|
|
184
227
|
| Output directory | `.` (current directory) |
|
|
185
228
|
|
|
229
|
+
## Default excluded files
|
|
230
|
+
|
|
231
|
+
The following files are excluded from analysis by default:
|
|
232
|
+
|
|
233
|
+
- `package-lock.json`, `yarn.lock`, `pnpm-lock.yaml`
|
|
234
|
+
- `composer.lock`, `Gemfile.lock`, `poetry.lock`
|
|
235
|
+
- `Cargo.lock`, `pubspec.lock`, `packages.lock.json`
|
|
236
|
+
- Minified files (`*.min.js`, `*.min.css`)
|
|
237
|
+
- Build directories (`dist/*`, `build/*`, `.next/*`)
|
|
238
|
+
- Source maps (`*.map`)
|
|
239
|
+
|
|
186
240
|
## Tips
|
|
187
241
|
|
|
188
242
|
- The file is saved with the branch name, replacing special characters
|
|
189
243
|
- Use `--dry-run` to preview without creating files
|
|
190
244
|
- If you work with `develop` as base branch, use `mkpr --set-base develop` once
|
|
191
245
|
- You can regenerate the description as many times as you want before accepting
|
|
246
|
+
- Use `--set-model` without arguments to interactively select a model
|
|
247
|
+
|
|
248
|
+
## Updating
|
|
249
|
+
|
|
250
|
+
```bash
|
|
251
|
+
npm update -g mkpr-cli
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
## Uninstalling
|
|
255
|
+
|
|
256
|
+
```bash
|
|
257
|
+
npm uninstall -g mkpr-cli
|
|
258
|
+
```
|
|
192
259
|
|
|
193
260
|
## License
|
|
194
261
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mkpr-cli",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "CLI para generar descripciones de PR usando Ollama AI",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"ollama",
|
|
19
19
|
"cli"
|
|
20
20
|
],
|
|
21
|
-
"author": "
|
|
21
|
+
"author": "David200197",
|
|
22
22
|
"license": "MIT",
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"chalk": "^4.1.2",
|