@vavasilva/git-commit-ai 0.3.1 → 0.3.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 +39 -25
- package/package.json +18 -7
package/README.md
CHANGED
|
@@ -1,16 +1,49 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Git Commit AI — AI commit message generator CLI
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[](https://www.npmjs.com/package/@vavasilva/git-commit-ai)
|
|
4
|
+
[](https://www.npmjs.com/package/@vavasilva/git-commit-ai)
|
|
5
|
+
[](https://opensource.org/licenses/MIT)
|
|
4
6
|
|
|
5
|
-
|
|
7
|
+
> Generate Conventional Commit messages from staged git changes using LLMs (Ollama, llama.cpp, OpenAI, Anthropic, Groq).
|
|
6
8
|
|
|
7
|
-
**
|
|
9
|
+
**git-commit-ai** is a CLI that analyzes your `git diff --staged` and suggests high-quality **Conventional Commits** (`type(scope): subject`) with an interactive confirm/edit/regenerate flow.
|
|
10
|
+
|
|
11
|
+
**Backends:** Ollama (local), llama.cpp (local), OpenAI (GPT models), Anthropic (Claude), Groq (Llama)
|
|
12
|
+
|
|
13
|
+
## Quick Start
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
# Install
|
|
17
|
+
npm install -g @vavasilva/git-commit-ai
|
|
18
|
+
|
|
19
|
+
# 1. Make changes to your code
|
|
20
|
+
echo "console.log('hello')" > hello.js
|
|
21
|
+
|
|
22
|
+
# 2. Stage your changes
|
|
23
|
+
git add hello.js
|
|
24
|
+
|
|
25
|
+
# 3. Generate commit message and commit
|
|
26
|
+
git-commit-ai
|
|
27
|
+
|
|
28
|
+
# Output:
|
|
29
|
+
# 📝 Generated commit message
|
|
30
|
+
# feat: add hello.js script
|
|
31
|
+
# [C]onfirm [E]dit [R]egenerate [A]bort? c
|
|
32
|
+
# ✓ Committed: feat: add hello.js script
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## How it works
|
|
36
|
+
|
|
37
|
+
1. You stage your changes (`git add ...`)
|
|
38
|
+
2. git-commit-ai reads `git diff --staged`
|
|
39
|
+
3. A selected LLM backend proposes a Conventional Commit message
|
|
40
|
+
4. You confirm, edit, regenerate, or abort (no commit happens until you confirm)
|
|
8
41
|
|
|
9
42
|
## Features
|
|
10
43
|
|
|
11
44
|
- **Multiple Backends** - Ollama (local), llama.cpp (local), OpenAI, Anthropic Claude, Groq
|
|
12
45
|
- **Auto-Detection** - Automatically selects available backend
|
|
13
|
-
- **
|
|
46
|
+
- **Conventional Commits** - Generates `type(scope): subject` format (Karma compatible)
|
|
14
47
|
- **Interactive Flow** - Confirm, Edit, Regenerate, or Abort before committing
|
|
15
48
|
- **Individual Commits** - Option to commit each file separately
|
|
16
49
|
- **Dry Run** - Preview messages without committing
|
|
@@ -250,25 +283,6 @@ export ANTHROPIC_API_KEY="your-api-key"
|
|
|
250
283
|
export GROQ_API_KEY="your-api-key"
|
|
251
284
|
```
|
|
252
285
|
|
|
253
|
-
## Quick Start
|
|
254
|
-
|
|
255
|
-
```bash
|
|
256
|
-
# 1. Make changes to your code
|
|
257
|
-
echo "console.log('hello')" > hello.js
|
|
258
|
-
|
|
259
|
-
# 2. Stage your changes
|
|
260
|
-
git add hello.js
|
|
261
|
-
|
|
262
|
-
# 3. Generate commit message and commit
|
|
263
|
-
git-commit-ai
|
|
264
|
-
|
|
265
|
-
# Output:
|
|
266
|
-
# 📝 Generated commit message
|
|
267
|
-
# feat: add hello.js script
|
|
268
|
-
# [C]onfirm [E]dit [R]egenerate [A]bort? c
|
|
269
|
-
# ✓ Committed: feat: add hello.js script
|
|
270
|
-
```
|
|
271
|
-
|
|
272
286
|
## Usage
|
|
273
287
|
|
|
274
288
|
```bash
|
|
@@ -464,7 +478,7 @@ ignore_patterns = ["dist/*", "*.generated.ts"]
|
|
|
464
478
|
| `config --set <key=value>` | Set a config value |
|
|
465
479
|
| `config --list-keys` | List all valid config keys |
|
|
466
480
|
|
|
467
|
-
## Commit Types (
|
|
481
|
+
## Commit Types (Conventional Commits)
|
|
468
482
|
|
|
469
483
|
| Type | Description |
|
|
470
484
|
|------|-------------|
|
package/package.json
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vavasilva/git-commit-ai",
|
|
3
|
-
"version": "0.3.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.3.3",
|
|
4
|
+
"description": "CLI that generates Conventional Commit messages from staged git changes using LLMs (OpenAI, Anthropic, Ollama, Groq).",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": "./dist/index.js"
|
|
9
|
+
},
|
|
7
10
|
"bin": {
|
|
8
11
|
"git-commit-ai": "./dist/index.js"
|
|
9
12
|
},
|
|
@@ -34,15 +37,23 @@
|
|
|
34
37
|
"keywords": [
|
|
35
38
|
"git",
|
|
36
39
|
"commit",
|
|
40
|
+
"commit message",
|
|
41
|
+
"commit message generator",
|
|
42
|
+
"conventional commits",
|
|
43
|
+
"conventional-commit",
|
|
44
|
+
"semantic commit",
|
|
45
|
+
"commitlint",
|
|
46
|
+
"cli",
|
|
47
|
+
"developer tools",
|
|
48
|
+
"automation",
|
|
49
|
+
"llm",
|
|
37
50
|
"ai",
|
|
38
|
-
"ollama",
|
|
39
51
|
"openai",
|
|
40
52
|
"anthropic",
|
|
53
|
+
"claude",
|
|
54
|
+
"ollama",
|
|
41
55
|
"groq",
|
|
42
|
-
"
|
|
43
|
-
"cli",
|
|
44
|
-
"karma",
|
|
45
|
-
"conventional-commits"
|
|
56
|
+
"llama"
|
|
46
57
|
],
|
|
47
58
|
"author": "Wagner Silva",
|
|
48
59
|
"license": "MIT",
|