aicommits 2.0.0-develop.2 → 2.0.0-develop.21
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 +31 -17
- package/dist/cli-DKM7kO7i.mjs +208 -0
- package/dist/cli.mjs +1 -1
- package/dist/token-BLAcxIyB.mjs +1 -0
- package/dist/token-util-CvHXdHmP.mjs +1 -0
- package/dist/{token-util-DvcpPQUZ.mjs → token-util-CzT2Q2oi.mjs} +1 -1
- package/package.json +7 -7
- package/dist/cli-p51f4U3R.mjs +0 -194
- package/dist/token-BcjwApjJ.mjs +0 -1
- package/dist/token-util-CwXWciaG.mjs +0 -1
package/README.md
CHANGED
|
@@ -17,9 +17,11 @@
|
|
|
17
17
|
1. Install _aicommits_:
|
|
18
18
|
|
|
19
19
|
```sh
|
|
20
|
-
npm install -g aicommits
|
|
20
|
+
npm install -g aicommits@develop
|
|
21
21
|
```
|
|
22
22
|
|
|
23
|
+
> We need @develop since v2 is still not released as latest/main!
|
|
24
|
+
|
|
23
25
|
2. Run the setup command to choose your AI provider:
|
|
24
26
|
|
|
25
27
|
```sh
|
|
@@ -31,6 +33,7 @@ This will guide you through:
|
|
|
31
33
|
- Selecting your AI provider (sets the `provider` config)
|
|
32
34
|
- Configuring your API key
|
|
33
35
|
- **Automatically fetching and selecting from available models** (when supported)
|
|
36
|
+
- **Choosing your preferred commit message format** (plain, conventional, or gitmoji)
|
|
34
37
|
|
|
35
38
|
Supported providers include:
|
|
36
39
|
|
|
@@ -38,14 +41,15 @@ This will guide you through:
|
|
|
38
41
|
- **OpenAI** - Get your API key from [OpenAI API Keys page](https://platform.openai.com/account/api-keys)
|
|
39
42
|
- **OpenRouter** - Get your API key from [OpenRouter](https://openrouter.ai/keys)
|
|
40
43
|
- **Ollama** (local) - Run AI models locally with [Ollama](https://ollama.ai)
|
|
44
|
+
- **LM Studio** (local) - No API key required. Runs on your computer via [LM Studio](https://lmstudio.ai/)
|
|
41
45
|
- **Custom OpenAI-compatible endpoint** - Use any service that implements the OpenAI API
|
|
42
46
|
|
|
43
|
-
|
|
47
|
+
**For CI/CD environments**, you can also set up configuration via the config file:
|
|
44
48
|
|
|
45
49
|
```bash
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
50
|
+
aicommits config set OPENAI_API_KEY="your_api_key_here"
|
|
51
|
+
aicommits config set OPENAI_BASE_URL="your_api_endpoint" # Optional, for custom endpoints
|
|
52
|
+
aicommits config set OPENAI_MODEL="your_model_choice" # Optional, defaults to provider default
|
|
49
53
|
```
|
|
50
54
|
|
|
51
55
|
> **Note:** When using environment variables, ensure all related variables (e.g., `OPENAI_API_KEY` and `OPENAI_BASE_URL`) are set consistently to avoid configuration mismatches with the config file.
|
|
@@ -65,7 +69,7 @@ aicommits --version
|
|
|
65
69
|
If it's not the [latest version](https://github.com/Nutlope/aicommits/releases/latest), run:
|
|
66
70
|
|
|
67
71
|
```sh
|
|
68
|
-
npm
|
|
72
|
+
npm install -g aicommits@develop
|
|
69
73
|
```
|
|
70
74
|
|
|
71
75
|
## Usage
|
|
@@ -94,7 +98,7 @@ aicommits --all # or -a
|
|
|
94
98
|
- `--generate` or `-g`: Number of messages to generate (default: **1**)
|
|
95
99
|
- `--exclude` or `-x`: Files to exclude from AI analysis
|
|
96
100
|
- `--all` or `-a`: Automatically stage changes in tracked files for the commit (default: **false**)
|
|
97
|
-
- `--type` or `-t`: Git commit message format (default: **
|
|
101
|
+
- `--type` or `-t`: Git commit message format (default: **plain**). Supports `plain`, `conventional`, and `gitmoji`
|
|
98
102
|
- `--confirm` or `-y`: Skip confirmation when committing after message generation (default: **false**)
|
|
99
103
|
- `--clipboard` or `-c`: Copy the selected message to the clipboard instead of committing (default: **false**)
|
|
100
104
|
|
|
@@ -108,15 +112,23 @@ aicommits --generate <i> # or -g <i>
|
|
|
108
112
|
|
|
109
113
|
> Warning: this uses more tokens, meaning it costs more.
|
|
110
114
|
|
|
111
|
-
####
|
|
115
|
+
#### Commit Message Formats
|
|
116
|
+
|
|
117
|
+
You can choose from three different commit message formats:
|
|
112
118
|
|
|
113
|
-
|
|
119
|
+
- **plain** (default): Simple, unstructured commit messages
|
|
120
|
+
- **conventional**: [Conventional Commits](https://conventionalcommits.org/) format with type and scope
|
|
121
|
+
- **gitmoji**: Emoji-based commit messages
|
|
122
|
+
|
|
123
|
+
Use the `--type` flag to specify the format:
|
|
114
124
|
|
|
115
125
|
```sh
|
|
116
126
|
aicommits --type conventional # or -t conventional
|
|
127
|
+
aicommits --type gitmoji # or -t gitmoji
|
|
128
|
+
aicommits --type plain # or -t plain (default)
|
|
117
129
|
```
|
|
118
130
|
|
|
119
|
-
This feature
|
|
131
|
+
This feature is useful if your project follows a specific commit message standard or if you're using tools that rely on these commit formats.
|
|
120
132
|
|
|
121
133
|
### Git hook
|
|
122
134
|
|
|
@@ -294,18 +306,20 @@ aicommits config set max-length=100
|
|
|
294
306
|
|
|
295
307
|
#### type
|
|
296
308
|
|
|
297
|
-
Default: `
|
|
309
|
+
Default: `plain`
|
|
298
310
|
|
|
299
|
-
The type of commit message to generate.
|
|
311
|
+
The type of commit message to generate. Available options:
|
|
300
312
|
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
313
|
+
- `plain`: Simple, unstructured commit messages
|
|
314
|
+
- `conventional`: Conventional Commits format with type and scope
|
|
315
|
+
- `gitmoji`: Emoji-based commit messages
|
|
304
316
|
|
|
305
|
-
|
|
317
|
+
Examples:
|
|
306
318
|
|
|
307
319
|
```sh
|
|
308
|
-
aicommits config set type=
|
|
320
|
+
aicommits config set type=conventional
|
|
321
|
+
aicommits config set type=gitmoji
|
|
322
|
+
aicommits config set type=plain
|
|
309
323
|
```
|
|
310
324
|
|
|
311
325
|
## How it works
|