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 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
- Alternatively, you can use environment variables (recommended for CI/CD):
47
+ **For CI/CD environments**, you can also set up configuration via the config file:
44
48
 
45
49
  ```bash
46
- export OPENAI_API_KEY="your_api_key_here"
47
- export OPENAI_BASE_URL="your_api_endpoint" # Optional, for custom endpoints
48
- export OPENAI_MODEL="your_model_choice" # Optional, defaults to provider default
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 update -g aicommits
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: **conventional**). Supports `conventional` and `gitmoji`
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
- #### Generating Conventional Commits
115
+ #### Commit Message Formats
116
+
117
+ You can choose from three different commit message formats:
112
118
 
113
- 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:
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 can be useful if your project follows the Conventional Commits standard or if you're using tools that rely on this commit format.
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: `""` (Empty string)
309
+ Default: `plain`
298
310
 
299
- The type of commit message to generate. Set this to "conventional" to generate commit messages that follow the Conventional Commits specification:
311
+ The type of commit message to generate. Available options:
300
312
 
301
- ```sh
302
- aicommits config set type=conventional
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
- You can clear this option by setting it to an empty string:
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