gut-cli 0.1.18 → 0.1.20
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/.gut/branch.md +1 -13
- package/.gut/changelog.md +1 -13
- package/.gut/checkout.md +1 -9
- package/.gut/commit.md +1 -7
- package/.gut/explain-file.md +1 -9
- package/.gut/explain.md +1 -11
- package/.gut/find.md +2 -8
- package/.gut/gitignore.md +2 -24
- package/.gut/merge.md +1 -12
- package/.gut/pr.md +1 -13
- package/.gut/review.md +1 -7
- package/.gut/stash.md +1 -7
- package/.gut/summary.md +1 -19
- package/README.md +49 -17
- package/dist/index.js +298 -215
- package/dist/index.js.map +1 -1
- package/dist/lib/index.d.ts +7 -6
- package/dist/lib/index.js +162 -146
- package/dist/lib/index.js.map +1 -1
- package/package.json +1 -1
package/.gut/branch.md
CHANGED
|
@@ -1,18 +1,6 @@
|
|
|
1
1
|
You are an expert at creating git branch names.
|
|
2
2
|
|
|
3
|
-
Generate a clean, descriptive branch name
|
|
4
|
-
|
|
5
|
-
## Description
|
|
6
|
-
|
|
7
|
-
{{description}}
|
|
8
|
-
|
|
9
|
-
{{#type}}
|
|
10
|
-
Branch type: {{type}}
|
|
11
|
-
{{/type}}
|
|
12
|
-
|
|
13
|
-
{{#issue}}
|
|
14
|
-
Include issue number: {{issue}}
|
|
15
|
-
{{/issue}}
|
|
3
|
+
Generate a clean, descriptive branch name based on the description. If a branch type or issue number is available, incorporate them appropriately.
|
|
16
4
|
|
|
17
5
|
## Rules
|
|
18
6
|
|
package/.gut/changelog.md
CHANGED
|
@@ -1,18 +1,6 @@
|
|
|
1
1
|
You are an expert at writing release notes and changelogs.
|
|
2
2
|
|
|
3
|
-
Generate a changelog entry
|
|
4
|
-
|
|
5
|
-
Today's date is {{todayDate}}. Use this date for the release date.
|
|
6
|
-
|
|
7
|
-
## Commits
|
|
8
|
-
|
|
9
|
-
{{commits}}
|
|
10
|
-
|
|
11
|
-
## Diff summary
|
|
12
|
-
|
|
13
|
-
```
|
|
14
|
-
{{diff}}
|
|
15
|
-
```
|
|
3
|
+
Generate a changelog entry based on the commits and diff. Use the provided fromRef, toRef, and todayDate for the release date.
|
|
16
4
|
|
|
17
5
|
## Format
|
|
18
6
|
|
package/.gut/checkout.md
CHANGED
|
@@ -1,14 +1,6 @@
|
|
|
1
|
-
# Checkout Branch Name Generation
|
|
2
|
-
|
|
3
1
|
You are an expert at creating git branch names.
|
|
4
2
|
|
|
5
|
-
Analyze the
|
|
6
|
-
|
|
7
|
-
## Git diff
|
|
8
|
-
|
|
9
|
-
```
|
|
10
|
-
{{diff}}
|
|
11
|
-
```
|
|
3
|
+
Analyze the git diff and generate a clean, descriptive branch name that captures the essence of the changes.
|
|
12
4
|
|
|
13
5
|
## Branch Naming Convention
|
|
14
6
|
|
package/.gut/commit.md
CHANGED
|
@@ -1,12 +1,6 @@
|
|
|
1
1
|
You are an expert at writing git commit messages.
|
|
2
2
|
|
|
3
|
-
Analyze the
|
|
4
|
-
|
|
5
|
-
## Git diff
|
|
6
|
-
|
|
7
|
-
```
|
|
8
|
-
{{diff}}
|
|
9
|
-
```
|
|
3
|
+
Analyze the git diff and generate a concise, meaningful commit message.
|
|
10
4
|
|
|
11
5
|
## Rules
|
|
12
6
|
|
package/.gut/explain-file.md
CHANGED
|
@@ -1,14 +1,6 @@
|
|
|
1
1
|
You are an expert at explaining code in a clear and insightful way.
|
|
2
2
|
|
|
3
|
-
Analyze the
|
|
4
|
-
|
|
5
|
-
## File
|
|
6
|
-
|
|
7
|
-
Path: {{filePath}}
|
|
8
|
-
|
|
9
|
-
```
|
|
10
|
-
{{content}}
|
|
11
|
-
```
|
|
3
|
+
Analyze the file content and explain what it does, its purpose, and its role in a project.
|
|
12
4
|
|
|
13
5
|
## Focus on
|
|
14
6
|
|
package/.gut/explain.md
CHANGED
|
@@ -1,16 +1,6 @@
|
|
|
1
1
|
You are an expert at explaining code changes in a clear and insightful way.
|
|
2
2
|
|
|
3
|
-
Analyze the
|
|
4
|
-
|
|
5
|
-
## Context
|
|
6
|
-
|
|
7
|
-
{{context}}
|
|
8
|
-
|
|
9
|
-
## Diff
|
|
10
|
-
|
|
11
|
-
```
|
|
12
|
-
{{diff}}
|
|
13
|
-
```
|
|
3
|
+
Analyze the changes based on the target type (commit, PR, file changes, etc.) and diff.
|
|
14
4
|
|
|
15
5
|
## Focus on
|
|
16
6
|
|
package/.gut/find.md
CHANGED
|
@@ -1,12 +1,6 @@
|
|
|
1
1
|
You are an expert at understanding git history and finding relevant commits.
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
## Commits to search
|
|
6
|
-
|
|
7
|
-
```
|
|
8
|
-
{{commits}}
|
|
9
|
-
```
|
|
3
|
+
Search through the commits to find those matching the user's query.
|
|
10
4
|
|
|
11
5
|
## Instructions
|
|
12
6
|
|
|
@@ -15,7 +9,7 @@ Find the commits that best match the user's query. Consider:
|
|
|
15
9
|
- Related features, bug fixes, or changes
|
|
16
10
|
- Semantic similarity (e.g., "login" matches "authentication")
|
|
17
11
|
|
|
18
|
-
Return
|
|
12
|
+
Return commits ordered by relevance (most relevant first).
|
|
19
13
|
Only include commits that actually match the query - if none match well, return an empty array.
|
|
20
14
|
|
|
21
15
|
## Output
|
package/.gut/gitignore.md
CHANGED
|
@@ -1,26 +1,6 @@
|
|
|
1
1
|
You are an expert at creating .gitignore files.
|
|
2
2
|
|
|
3
|
-
Analyze the
|
|
4
|
-
|
|
5
|
-
## Project Structure
|
|
6
|
-
|
|
7
|
-
```
|
|
8
|
-
{{files}}
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
{{#configFiles}}
|
|
12
|
-
## Detected Config Files
|
|
13
|
-
|
|
14
|
-
{{configFiles}}
|
|
15
|
-
{{/configFiles}}
|
|
16
|
-
|
|
17
|
-
{{#existingGitignore}}
|
|
18
|
-
## Existing .gitignore
|
|
19
|
-
|
|
20
|
-
```
|
|
21
|
-
{{existingGitignore}}
|
|
22
|
-
```
|
|
23
|
-
{{/existingGitignore}}
|
|
3
|
+
Analyze the project structure and configuration files to generate an appropriate .gitignore file.
|
|
24
4
|
|
|
25
5
|
## Rules
|
|
26
6
|
|
|
@@ -33,9 +13,7 @@ Analyze the following project structure and configuration files to generate an a
|
|
|
33
13
|
- Include log files and temporary files
|
|
34
14
|
- Do NOT ignore files that should be tracked (source code, configs, etc.)
|
|
35
15
|
- Keep the file organized with comments for each section
|
|
36
|
-
|
|
37
|
-
- Preserve any project-specific patterns from the existing .gitignore
|
|
38
|
-
{{/existingGitignore}}
|
|
16
|
+
- If an existing .gitignore is provided, preserve project-specific patterns from it
|
|
39
17
|
|
|
40
18
|
## Output
|
|
41
19
|
|
package/.gut/merge.md
CHANGED
|
@@ -1,17 +1,6 @@
|
|
|
1
1
|
You are an expert at resolving git merge conflicts intelligently.
|
|
2
2
|
|
|
3
|
-
Analyze the
|
|
4
|
-
|
|
5
|
-
## Context
|
|
6
|
-
|
|
7
|
-
- File: {{filename}}
|
|
8
|
-
- Merging: {{theirsRef}} into {{oursRef}}
|
|
9
|
-
|
|
10
|
-
## Conflicted content
|
|
11
|
-
|
|
12
|
-
```
|
|
13
|
-
{{content}}
|
|
14
|
-
```
|
|
3
|
+
Analyze the conflicted file content and provide a resolution.
|
|
15
4
|
|
|
16
5
|
## Rules
|
|
17
6
|
|
package/.gut/pr.md
CHANGED
|
@@ -1,18 +1,6 @@
|
|
|
1
1
|
You are an expert at writing pull request descriptions.
|
|
2
2
|
|
|
3
|
-
Generate a clear and informative PR title and description based on the
|
|
4
|
-
|
|
5
|
-
## Context
|
|
6
|
-
|
|
7
|
-
- Branch: {{currentBranch}} -> {{baseBranch}}
|
|
8
|
-
- Commits:
|
|
9
|
-
{{commits}}
|
|
10
|
-
|
|
11
|
-
## Diff summary
|
|
12
|
-
|
|
13
|
-
```
|
|
14
|
-
{{diff}}
|
|
15
|
-
```
|
|
3
|
+
Generate a clear and informative PR title and description based on the branch information, commits, and diff.
|
|
16
4
|
|
|
17
5
|
## Rules for title
|
|
18
6
|
|
package/.gut/review.md
CHANGED
package/.gut/stash.md
CHANGED
package/.gut/summary.md
CHANGED
|
@@ -1,24 +1,6 @@
|
|
|
1
1
|
You are an expert at writing work summaries and reports.
|
|
2
2
|
|
|
3
|
-
Generate a clear, professional work summary
|
|
4
|
-
|
|
5
|
-
## Context
|
|
6
|
-
|
|
7
|
-
- Author: {{author}}
|
|
8
|
-
- Period: {{period}}
|
|
9
|
-
- Format: {{format}}
|
|
10
|
-
|
|
11
|
-
## Commits
|
|
12
|
-
|
|
13
|
-
{{commits}}
|
|
14
|
-
|
|
15
|
-
{{#diff}}
|
|
16
|
-
## Diff summary
|
|
17
|
-
|
|
18
|
-
```
|
|
19
|
-
{{diff}}
|
|
20
|
-
```
|
|
21
|
-
{{/diff}}
|
|
3
|
+
Generate a clear, professional work summary based on the git activity.
|
|
22
4
|
|
|
23
5
|
## Focus on
|
|
24
6
|
|
package/README.md
CHANGED
|
@@ -361,6 +361,15 @@ gut config set lang en --local
|
|
|
361
361
|
|
|
362
362
|
# Get current language
|
|
363
363
|
gut config get lang
|
|
364
|
+
|
|
365
|
+
# Open global config folder
|
|
366
|
+
gut config open
|
|
367
|
+
|
|
368
|
+
# Open global templates folder
|
|
369
|
+
gut config open --templates
|
|
370
|
+
|
|
371
|
+
# Open project's .gut/ folder
|
|
372
|
+
gut config open --local
|
|
364
373
|
```
|
|
365
374
|
|
|
366
375
|
**Available settings:**
|
|
@@ -372,12 +381,19 @@ gut config get lang
|
|
|
372
381
|
|
|
373
382
|
### `gut init`
|
|
374
383
|
|
|
375
|
-
Initialize
|
|
384
|
+
Initialize templates for customization (project-level or global).
|
|
376
385
|
|
|
377
386
|
```bash
|
|
378
387
|
# Copy all templates to .gut/ (translates if language is not English)
|
|
379
388
|
gut init
|
|
380
389
|
|
|
390
|
+
# Initialize global templates (~/.config/gut/templates/)
|
|
391
|
+
gut init --global
|
|
392
|
+
|
|
393
|
+
# Initialize and open folder
|
|
394
|
+
gut init --open
|
|
395
|
+
gut init --global --open
|
|
396
|
+
|
|
381
397
|
# Force overwrite existing templates
|
|
382
398
|
gut init --force
|
|
383
399
|
|
|
@@ -388,8 +404,15 @@ gut init --no-translate
|
|
|
388
404
|
gut init --provider openai
|
|
389
405
|
```
|
|
390
406
|
|
|
407
|
+
To open templates folder without initializing, use `gut config open --templates`.
|
|
408
|
+
|
|
391
409
|
Templates are automatically translated to your configured language (set via `gut lang`).
|
|
392
410
|
|
|
411
|
+
**Template precedence:**
|
|
412
|
+
1. Project templates: `.gut/` (highest priority)
|
|
413
|
+
2. Global templates: `~/.config/gut/templates/`
|
|
414
|
+
3. Built-in templates (lowest priority)
|
|
415
|
+
|
|
393
416
|
### `gut gitignore`
|
|
394
417
|
|
|
395
418
|
Generate a .gitignore file by analyzing your project structure.
|
|
@@ -466,26 +489,35 @@ API keys are stored securely using your operating system's native credential sto
|
|
|
466
489
|
|
|
467
490
|
Keys are never stored in plain text files or configuration files. When you run `gut auth login`, the key is encrypted and managed by your OS.
|
|
468
491
|
|
|
469
|
-
##
|
|
492
|
+
## Template Configuration
|
|
493
|
+
|
|
494
|
+
gut supports customizable templates at two levels:
|
|
495
|
+
|
|
496
|
+
**Project templates** (`.gut/`): Repository-specific customizations that apply only to the current project.
|
|
497
|
+
|
|
498
|
+
**Global templates** (`~/.config/gut/templates/`): User-wide defaults that apply across all projects.
|
|
499
|
+
|
|
500
|
+
**Precedence**: Project > Global > Built-in
|
|
470
501
|
|
|
471
|
-
|
|
502
|
+
Each template uses `{{variable}}` syntax for dynamic content.
|
|
472
503
|
|
|
473
504
|
| File | Purpose |
|
|
474
505
|
|------|---------|
|
|
475
|
-
|
|
|
476
|
-
|
|
|
477
|
-
|
|
|
478
|
-
|
|
|
479
|
-
|
|
|
480
|
-
|
|
|
481
|
-
|
|
|
482
|
-
|
|
|
483
|
-
|
|
|
484
|
-
|
|
|
485
|
-
|
|
|
486
|
-
|
|
|
487
|
-
|
|
|
488
|
-
|
|
506
|
+
| `commit.md` | Commit message prompt |
|
|
507
|
+
| `pr.md` | PR description prompt |
|
|
508
|
+
| `branch.md` | Branch naming rules |
|
|
509
|
+
| `checkout.md` | Checkout branch name prompt |
|
|
510
|
+
| `merge.md` | Merge conflict resolution rules |
|
|
511
|
+
| `review.md` | Code review criteria |
|
|
512
|
+
| `explain.md` | Explanation context |
|
|
513
|
+
| `explain-file.md` | File explanation context |
|
|
514
|
+
| `find.md` | Commit search context |
|
|
515
|
+
| `changelog.md` | Changelog format |
|
|
516
|
+
| `stash.md` | Stash name prompt |
|
|
517
|
+
| `summary.md` | Work summary format |
|
|
518
|
+
| `gitignore.md` | Gitignore generation prompt |
|
|
519
|
+
|
|
520
|
+
**Special case**: `.github/pull_request_template.md` is prioritized over `pr.md` for PR descriptions.
|
|
489
521
|
|
|
490
522
|
## Development
|
|
491
523
|
|