gut-cli 0.1.9 → 0.1.10

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 CHANGED
@@ -2,6 +2,14 @@
2
2
 
3
3
  **Git Utility Tool** - AI-powered git commands for smarter workflows.
4
4
 
5
+ ## Why gut?
6
+
7
+ Working with git involves many small decisions that add up: writing clear commit messages, naming branches, describing pull requests, coming up with stash names you'll actually remember. These tasks aren't hard, but they interrupt your flow and take more time than they should.
8
+
9
+ gut handles these for you. Unlike AI coding assistants that analyze your entire codebase, gut focuses only on git operations—so it's fast. You get results in seconds, not minutes.
10
+
11
+ No subscription required. Just bring your own API key from Gemini, OpenAI, or Anthropic. Your keys are stored securely in your system's native keychain, never in plain text.
12
+
5
13
  ## Installation
6
14
 
7
15
  ```bash
@@ -10,22 +18,22 @@ npm install -g gut-cli
10
18
 
11
19
  ## Commands
12
20
 
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-merge` | `gut merge` | Resolve merge conflicts |
21
- | `gut ai-explain` | `gut explain` | Explain changes, commits, PRs, or files |
22
- | `gut ai-find` | `gut find` | Find commits by vague description |
23
- | `gut ai-branch` | `gut branch` | Generate branch names from description |
24
- | `gut changelog` | - | Generate changelogs |
25
- | `gut sync` | - | Sync with remote (fetch + rebase/merge) |
26
- | `gut stash` | - | Stash with AI-generated names |
27
- | `gut config` | - | Manage configuration (language, etc.) |
28
- | `gut lang` | - | Set or show output language |
21
+ | Command | Description |
22
+ |---------|-------------|
23
+ | `gut commit` | Generate commit messages |
24
+ | `gut pr` | Generate PR descriptions |
25
+ | `gut review` | Code review |
26
+ | `gut merge` | Resolve merge conflicts |
27
+ | `gut explain` | Explain changes, commits, PRs, or files |
28
+ | `gut find` | Find commits by vague description |
29
+ | `gut branch` | Generate branch names from description |
30
+ | `gut checkout` | Generate branch name from diff and checkout |
31
+ | `gut changelog` | Generate changelogs |
32
+ | `gut sync` | Sync with remote (fetch + rebase/merge) |
33
+ | `gut stash` | Stash with AI-generated names |
34
+ | `gut summary` | Generate work summary (daily/weekly reports) |
35
+ | `gut config` | Manage configuration (language, etc.) |
36
+ | `gut lang` | Set or show output language |
29
37
 
30
38
  ### `gut commit`
31
39
 
@@ -45,11 +53,7 @@ gut commit --all
45
53
  gut commit --provider openai
46
54
  ```
47
55
 
48
- **Commit Convention Support**: If a convention file exists in your repo, gut will follow it:
49
- - `.gut/commit-convention.md`
50
- - `.github/commit-convention.md`
51
- - `.commit-convention.md`
52
- - `.gitmessage`
56
+ **Template Support**: Create `.gut/commit.md` to customize the commit message prompt.
53
57
 
54
58
  ### `gut pr`
55
59
 
@@ -69,7 +73,7 @@ gut pr --create
69
73
  gut pr --copy
70
74
  ```
71
75
 
72
- **PR Template Support**: Automatically uses `.github/pull_request_template.md` if present.
76
+ **Template Support**: Automatically uses GitHub's `.github/pull_request_template.md` if present, or falls back to `.gut/pr.md`.
73
77
 
74
78
  ### `gut review`
75
79
 
@@ -191,7 +195,27 @@ gut branch 123 --type fix
191
195
  gut branch -d "add user authentication"
192
196
  ```
193
197
 
194
- **Branch Convention Support**: Create `.gut/branch-convention.md` for custom naming rules.
198
+ **Template Support**: Create `.gut/branch.md` for custom naming rules.
199
+
200
+ ### `gut checkout`
201
+
202
+ Generate a branch name from current diff and checkout.
203
+
204
+ ```bash
205
+ # Generate branch name from uncommitted changes
206
+ gut checkout
207
+
208
+ # Auto-checkout without confirmation
209
+ gut checkout --yes
210
+
211
+ # Use only staged changes
212
+ gut checkout --staged
213
+
214
+ # Use specific provider
215
+ gut checkout --provider openai
216
+ ```
217
+
218
+ **Template Support**: Create `.gut/checkout.md` to customize the prompt.
195
219
 
196
220
  ### `gut sync`
197
221
 
@@ -241,6 +265,46 @@ gut stash --drop 1
241
265
  gut stash --clear
242
266
  ```
243
267
 
268
+ ### `gut summary`
269
+
270
+ Generate a work summary from your commits (for daily/weekly reports).
271
+
272
+ ```bash
273
+ # Today's summary (default: your commits)
274
+ gut summary
275
+
276
+ # Daily report
277
+ gut summary --daily
278
+
279
+ # Weekly report
280
+ gut summary --weekly
281
+
282
+ # Custom date range
283
+ gut summary --since "2024-01-01" --until "2024-01-31"
284
+
285
+ # Include diff for more detail
286
+ gut summary --weekly --with-diff
287
+
288
+ # Output as markdown (great for Slack/docs)
289
+ gut summary --weekly --markdown
290
+
291
+ # Copy to clipboard
292
+ gut summary --daily --copy
293
+
294
+ # Specify different author
295
+ gut summary --author "John Doe"
296
+ ```
297
+
298
+ **Options:**
299
+ - `--daily` - Generate daily report (since today)
300
+ - `--weekly` - Generate weekly report (since 1 week ago)
301
+ - `--since <date>` - Start date (default: today)
302
+ - `--until <date>` - End date
303
+ - `--author <author>` - Filter by author (default: current git user)
304
+ - `--with-diff` - Include diff analysis for more detail
305
+ - `--markdown` - Output as markdown
306
+ - `--copy` - Copy to clipboard
307
+
244
308
  ### `gut changelog`
245
309
 
246
310
  Generate a changelog from commits.
@@ -259,7 +323,7 @@ gut changelog --tag v1.0.0
259
323
  gut changelog --json
260
324
  ```
261
325
 
262
- **Changelog Template Support**: If `CHANGELOG.md` exists, gut will match its style.
326
+ **Template Support**: Create `.gut/changelog.md` to customize the changelog format.
263
327
 
264
328
  ### `gut lang`
265
329
 
@@ -344,21 +408,35 @@ API keys can also be set via environment variables:
344
408
  - `GUT_OPENAI_API_KEY` or `OPENAI_API_KEY`
345
409
  - `GUT_ANTHROPIC_API_KEY` or `ANTHROPIC_API_KEY`
346
410
 
411
+ ## Security
412
+
413
+ API keys are stored securely using your operating system's native credential storage:
414
+
415
+ - **macOS**: Keychain
416
+ - **Windows**: Credential Vault
417
+ - **Linux**: Secret Service API (libsecret)
418
+
419
+ 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.
420
+
347
421
  ## Project Configuration
348
422
 
349
- gut looks for these configuration files in your repository:
423
+ gut looks for template files in your repository's `.gut/` folder. Each template uses `{{variable}}` syntax for dynamic content.
350
424
 
351
425
  | File | Purpose |
352
426
  |------|---------|
353
- | `.gut/commit-convention.md` | Custom commit message rules |
354
- | `.gut/pr-template.md` | PR description template |
355
- | `.gut/changelog-template.md` | Changelog style template |
356
- | `.gut/merge-strategy.md` | Merge conflict resolution rules |
357
- | `.gut/explain.md` | Project context for explanations |
358
- | `.gut/find.md` | Project context for commit search |
359
- | `.gut/branch-convention.md` | Custom branch naming rules |
360
- | `.github/pull_request_template.md` | PR template (fallback) |
361
- | `CHANGELOG.md` | Changelog style (fallback) |
427
+ | `.gut/commit.md` | Commit message prompt |
428
+ | `.gut/pr.md` | PR description prompt |
429
+ | `.gut/branch.md` | Branch naming rules |
430
+ | `.gut/checkout.md` | Checkout branch name prompt |
431
+ | `.gut/merge.md` | Merge conflict resolution rules |
432
+ | `.gut/review.md` | Code review criteria |
433
+ | `.gut/explain.md` | Explanation context |
434
+ | `.gut/explain-file.md` | File explanation context |
435
+ | `.gut/find.md` | Commit search context |
436
+ | `.gut/changelog.md` | Changelog format |
437
+ | `.gut/stash.md` | Stash name prompt |
438
+ | `.gut/summary.md` | Work summary format |
439
+ | `.github/pull_request_template.md` | GitHub PR template (prioritized over `.gut/pr.md`) |
362
440
 
363
441
  ## Development
364
442