gut-cli 0.1.3

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 ADDED
@@ -0,0 +1,217 @@
1
+ # gut-cli
2
+
3
+ **Git Utility Tool** - AI-powered git commands for smarter workflows.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install -g gut-cli
9
+ ```
10
+
11
+ ## Commands
12
+
13
+ All AI commands support short aliases (without `ai-` prefix):
14
+
15
+ | Command | Alias | Description |
16
+ |---------|-------|-------------|
17
+ | `gut ai-commit` | `gut commit` | Generate commit messages |
18
+ | `gut ai-pr` | `gut pr` | Generate PR descriptions |
19
+ | `gut ai-review` | `gut review` | Code review |
20
+ | `gut ai-diff` | `gut diff` | Explain changes |
21
+ | `gut ai-merge` | `gut merge` | Resolve merge conflicts |
22
+ | `gut changelog` | - | Generate changelogs |
23
+
24
+ ### `gut commit`
25
+
26
+ Generate commit messages using AI.
27
+
28
+ ```bash
29
+ # Generate commit message (auto-stages if nothing staged)
30
+ gut commit
31
+
32
+ # Auto-commit with generated message
33
+ gut commit --commit
34
+
35
+ # Force stage all changes
36
+ gut commit --all
37
+
38
+ # Use specific provider
39
+ gut commit --provider openai
40
+ ```
41
+
42
+ **Commit Convention Support**: If a convention file exists in your repo, gut will follow it:
43
+ - `.gut/commit-convention.md`
44
+ - `.github/commit-convention.md`
45
+ - `.commit-convention.md`
46
+ - `.gitmessage`
47
+
48
+ ### `gut pr`
49
+
50
+ Generate pull request title and description using AI.
51
+
52
+ ```bash
53
+ # Generate PR description
54
+ gut pr
55
+
56
+ # Specify base branch
57
+ gut pr --base develop
58
+
59
+ # Create PR directly (requires gh CLI)
60
+ gut pr --create
61
+
62
+ # Copy to clipboard
63
+ gut pr --copy
64
+ ```
65
+
66
+ **PR Template Support**: Automatically uses `.github/pull_request_template.md` if present.
67
+
68
+ ### `gut review`
69
+
70
+ Get AI code review of your changes or GitHub PRs.
71
+
72
+ ```bash
73
+ # Review all uncommitted changes
74
+ gut review
75
+
76
+ # Review staged changes only
77
+ gut review --staged
78
+
79
+ # Review specific commit
80
+ gut review --commit abc123
81
+
82
+ # Review a GitHub PR by number
83
+ gut review 123
84
+
85
+ # Output as JSON
86
+ gut review --json
87
+ ```
88
+
89
+ ### `gut diff`
90
+
91
+ Get an AI-powered explanation of your changes.
92
+
93
+ ```bash
94
+ # Explain all uncommitted changes
95
+ gut diff
96
+
97
+ # Explain staged changes only
98
+ gut diff --staged
99
+
100
+ # Explain specific commit
101
+ gut diff --commit abc123
102
+
103
+ # Output as JSON
104
+ gut diff --json
105
+ ```
106
+
107
+ ### `gut merge`
108
+
109
+ Merge branches with AI-powered conflict resolution.
110
+
111
+ ```bash
112
+ # Merge a branch with AI conflict resolution
113
+ gut merge feature/login
114
+
115
+ # Use specific provider
116
+ gut merge feature/login --provider openai
117
+
118
+ # Don't auto-commit after resolving
119
+ gut merge feature/login --no-commit
120
+ ```
121
+
122
+ ### `gut changelog`
123
+
124
+ Generate a changelog from commits.
125
+
126
+ ```bash
127
+ # Generate changelog for last 10 commits
128
+ gut changelog
129
+
130
+ # Generate changelog between refs
131
+ gut changelog v1.0.0 v1.1.0
132
+
133
+ # Generate changelog since a tag
134
+ gut changelog --tag v1.0.0
135
+
136
+ # Output as JSON
137
+ gut changelog --json
138
+ ```
139
+
140
+ **Changelog Template Support**: If `CHANGELOG.md` exists, gut will match its style.
141
+
142
+ ### `gut cleanup`
143
+
144
+ Delete merged branches safely.
145
+
146
+ ```bash
147
+ # Show merged branches that can be deleted
148
+ gut cleanup --dry-run
149
+
150
+ # Delete all merged local branches (with confirmation)
151
+ gut cleanup
152
+
153
+ # Also delete remote branches
154
+ gut cleanup --remote
155
+
156
+ # Skip confirmation prompt
157
+ gut cleanup --force
158
+ ```
159
+
160
+ ### `gut auth`
161
+
162
+ Manage API keys for AI providers.
163
+
164
+ ```bash
165
+ # Save API key to system keychain
166
+ gut auth login --provider gemini
167
+
168
+ # Check which providers are configured
169
+ gut auth status
170
+
171
+ # Remove API key
172
+ gut auth logout --provider gemini
173
+ ```
174
+
175
+ **Supported providers**: `gemini` (default), `openai`, `anthropic`
176
+
177
+ API keys can also be set via environment variables:
178
+ - `GUT_GEMINI_API_KEY` or `GEMINI_API_KEY`
179
+ - `GUT_OPENAI_API_KEY` or `OPENAI_API_KEY`
180
+ - `GUT_ANTHROPIC_API_KEY` or `ANTHROPIC_API_KEY`
181
+
182
+ ## Project Configuration
183
+
184
+ gut looks for these configuration files in your repository:
185
+
186
+ | File | Purpose |
187
+ |------|---------|
188
+ | `.gut/commit-convention.md` | Custom commit message rules |
189
+ | `.gut/pr-template.md` | PR description template |
190
+ | `.gut/changelog-template.md` | Changelog style template |
191
+ | `.gut/merge-strategy.md` | Merge conflict resolution rules |
192
+ | `.github/pull_request_template.md` | PR template (fallback) |
193
+ | `CHANGELOG.md` | Changelog style (fallback) |
194
+
195
+ ## Development
196
+
197
+ ```bash
198
+ # Install dependencies
199
+ npm install
200
+
201
+ # Build
202
+ npm run build
203
+
204
+ # Watch mode
205
+ npm run dev
206
+
207
+ # Link for local testing
208
+ npm link
209
+ ```
210
+
211
+ ## Related
212
+
213
+ Prefer a GUI? Check out [Gitton](https://jsers.dev/service/gitton) - a modern Git client for desktop.
214
+
215
+ ## License
216
+
217
+ MIT
@@ -0,0 +1,2 @@
1
+
2
+ export { }