aicommits 2.0.0-develop.8 → 2.0.0

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
@@ -1,6 +1,7 @@
1
1
  <div align="center">
2
2
  <div>
3
3
  <img src=".github/screenshot.png" alt="AI Commits"/>
4
+ <img src="./aic.png" width="50" alt="AI Commits"/>
4
5
  <h1 align="center">AI Commits</h1>
5
6
  </div>
6
7
  <p>A CLI that writes your git commit messages for you with AI. Never write a commit message again.</p>
@@ -17,11 +18,9 @@
17
18
  1. Install _aicommits_:
18
19
 
19
20
  ```sh
20
- npm install -g aicommits@develop
21
+ npm install -g aicommits
21
22
  ```
22
23
 
23
- > We need @develop since v2 is still not released as latest/main! Don't remove it to test v2!
24
-
25
24
  2. Run the setup command to choose your AI provider:
26
25
 
27
26
  ```sh
@@ -33,13 +32,17 @@ This will guide you through:
33
32
  - Selecting your AI provider (sets the `provider` config)
34
33
  - Configuring your API key
35
34
  - **Automatically fetching and selecting from available models** (when supported)
35
+ - **Choosing your preferred commit message format** (plain, conventional, or gitmoji)
36
36
 
37
37
  Supported providers include:
38
38
 
39
39
  - **TogetherAI** (recommended) - Get your API key from [TogetherAI](https://api.together.ai/)
40
40
  - **OpenAI** - Get your API key from [OpenAI API Keys page](https://platform.openai.com/account/api-keys)
41
+ - **Groq** - Get your API key from [Groq Console](https://console.groq.com/keys)
42
+ - **xAI** - Get your API key from [xAI Console](https://console.x.ai/)
41
43
  - **OpenRouter** - Get your API key from [OpenRouter](https://openrouter.ai/keys)
42
44
  - **Ollama** (local) - Run AI models locally with [Ollama](https://ollama.ai)
45
+ - **LM Studio** (local) - No API key required. Runs on your computer via [LM Studio](https://lmstudio.ai/)
43
46
  - **Custom OpenAI-compatible endpoint** - Use any service that implements the OpenAI API
44
47
 
45
48
  **For CI/CD environments**, you can also set up configuration via the config file:
@@ -67,7 +70,7 @@ aicommits --version
67
70
  If it's not the [latest version](https://github.com/Nutlope/aicommits/releases/latest), run:
68
71
 
69
72
  ```sh
70
- npm update -g aicommits
73
+ npm install -g aicommits
71
74
  ```
72
75
 
73
76
  ## Usage
@@ -93,12 +96,14 @@ aicommits --all # or -a
93
96
 
94
97
  #### CLI Options
95
98
 
96
- - `--generate` or `-g`: Number of messages to generate (default: **1**)
97
- - `--exclude` or `-x`: Files to exclude from AI analysis
98
99
  - `--all` or `-a`: Automatically stage changes in tracked files for the commit (default: **false**)
99
- - `--type` or `-t`: Git commit message format (default: **conventional**). Supports `conventional` and `gitmoji`
100
- - `--confirm` or `-y`: Skip confirmation when committing after message generation (default: **false**)
101
100
  - `--clipboard` or `-c`: Copy the selected message to the clipboard instead of committing (default: **false**)
101
+ - `--generate` or `-g`: Number of messages to generate (default: **1**)
102
+ - `--exclude` or `-x`: Files to exclude from AI analysis
103
+ - `--type` or `-t`: Git commit message format (default: **plain**). Supports `plain`, `conventional`, and `gitmoji`
104
+ - `--prompt` or `-p`: Custom prompt to guide the LLM behavior (e.g., specific language, style instructions)
105
+ - `--no-verify` or `-n`: Bypass pre-commit hooks while committing (default: **false**)
106
+ - `--yes` or `-y`: Skip confirmation when committing after message generation (default: **false**)
102
107
 
103
108
  #### Generate multiple recommendations
104
109
 
@@ -110,15 +115,41 @@ aicommits --generate <i> # or -g <i>
110
115
 
111
116
  > Warning: this uses more tokens, meaning it costs more.
112
117
 
113
- #### Generating Conventional Commits
118
+ #### Commit Message Formats
114
119
 
115
- If you'd like to generate [Conventional Commits](https://conventionalcommits.org/), you can use the `--type` flag followed by `conventional`. This will prompt `aicommits` to format the commit message according to the Conventional Commits specification:
120
+ You can choose from three different commit message formats:
121
+
122
+ - **plain** (default): Simple, unstructured commit messages
123
+ - **conventional**: [Conventional Commits](https://conventionalcommits.org/) format with type and scope
124
+ - **gitmoji**: Emoji-based commit messages
125
+
126
+ Use the `--type` flag to specify the format:
116
127
 
117
128
  ```sh
118
129
  aicommits --type conventional # or -t conventional
130
+ aicommits --type gitmoji # or -t gitmoji
131
+ aicommits --type plain # or -t plain (default)
119
132
  ```
120
133
 
121
- This feature can be useful if your project follows the Conventional Commits standard or if you're using tools that rely on this commit format.
134
+ 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.
135
+
136
+ #### Custom Prompts
137
+
138
+ You can customize the LLM's behavior with the `--prompt` flag to guide commit message generation:
139
+
140
+ ```sh
141
+ # Write commit messages in a specific language
142
+ aicommits -p "Write commit messages in Italian"
143
+
144
+ # Focus on specific aspects of the changes
145
+ aicommits -p "Focus on performance implications of changes"
146
+
147
+ # Use a specific style or tone
148
+ aicommits -p "Use technical jargon suitable for senior developers"
149
+
150
+ # Include specific details in the message
151
+ aicommits -p "Always mention the specific function names and file paths changed"
152
+ ```
122
153
 
123
154
  ### Git hook
124
155
 
@@ -258,7 +289,7 @@ Model to use for OpenAI-compatible providers.
258
289
 
259
290
  #### provider
260
291
 
261
- The selected AI provider. Set automatically during `aicommits setup`. Valid values: `openai`, `togetherai`, `ollama`, `custom`.
292
+ The selected AI provider. Set automatically during `aicommits setup`. Valid values: `openai`, `togetherai`, `groq`, `xai`, `openrouter`, `ollama`, `lmstudio`, `custom`.
262
293
 
263
294
  #### locale
264
295
 
@@ -296,18 +327,20 @@ aicommits config set max-length=100
296
327
 
297
328
  #### type
298
329
 
299
- Default: `""` (Empty string)
330
+ Default: `plain`
300
331
 
301
- The type of commit message to generate. Set this to "conventional" to generate commit messages that follow the Conventional Commits specification:
332
+ The type of commit message to generate. Available options:
302
333
 
303
- ```sh
304
- aicommits config set type=conventional
305
- ```
334
+ - `plain`: Simple, unstructured commit messages
335
+ - `conventional`: Conventional Commits format with type and scope
336
+ - `gitmoji`: Emoji-based commit messages
306
337
 
307
- You can clear this option by setting it to an empty string:
338
+ Examples:
308
339
 
309
340
  ```sh
310
- aicommits config set type=
341
+ aicommits config set type=conventional
342
+ aicommits config set type=gitmoji
343
+ aicommits config set type=plain
311
344
  ```
312
345
 
313
346
  ## How it works