You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
OCO_PROMPT_MODULE=<either conventional-commit or @commitlint>
129
131
```
130
132
131
133
### Global config for all repos
@@ -168,7 +170,7 @@ oco config set OCO_MODEL=gpt-3.5-turbo
168
170
169
171
Make sure that you spell it `gpt-4` (lowercase) and that you have API access to the 4th model. Even if you have ChatGPT+, that doesn't necessarily mean that you have API access to GPT-4.
170
172
171
-
## Locale configuration
173
+
### Locale configuration
172
174
173
175
To globally specify the language used to generate commit messages:
174
176
@@ -187,7 +189,55 @@ oco config set OCO_LANGUAGE=française
187
189
The default language setting is **English**
188
190
All available languages are currently listed in the [i18n](https://github.com/di-sukharev/opencommit/tree/master/src/i18n) folder
189
191
190
-
### Git flags
192
+
### Switch to `@commitlint`
193
+
194
+
OpenCommit allows you to choose the prompt module used to generate commit messages. By default, OpenCommit uses its conventional-commit message generator. However, you can switch to using the `@commitlint` prompt module if you prefer. This option lets you generate commit messages in respect with the local config.
195
+
196
+
You can set this option by running the following command:
197
+
198
+
```sh
199
+
oco config set OCO_PROMPT_MODULE=<module>
200
+
```
201
+
202
+
Replace `<module>` with either `conventional-commit` or `@commitlint`.
203
+
204
+
#### Example:
205
+
206
+
To switch to using th` '@commitlint` prompt module, run:
207
+
208
+
```sh
209
+
oco config set OCO_PROMPT_MODULE=@commitlint
210
+
```
211
+
212
+
To switch back to the default conventional-commit message generator, run:
213
+
214
+
```sh
215
+
oco config set OCO_PROMPT_MODULE=conventional-commit
216
+
```
217
+
218
+
#### Integrating with `@commitlint`
219
+
220
+
The integration between `@commitlint` and OpenCommit is done automatically the first time OpenCommit is run with `OCO_PROMPT_MODULE` set to `@commitlint`. However, if you need to force set or reset the configuration for `@commitlint`, you can run the following command:
221
+
222
+
```sh
223
+
oco commitlint force
224
+
```
225
+
226
+
To view the generated configuration for `@commitlint`, you can use this command:
227
+
228
+
```sh
229
+
oco commitlint get
230
+
```
231
+
232
+
This allows you to ensure that the configuration is set up as desired.
233
+
234
+
Additionally, the integration creates a file named `.opencommit-commitlint` which contains the prompts used for the local `@commitlint` configuration. You can modify this file to fine-tune the example commit message generated by OpenAI. This gives you the flexibility to make adjustments based on your preferences or project guidelines.
235
+
236
+
Additionally, OpenCommit generates a file named `.opencommit-commitlint` in your project directory which contains the prompts used for the local `@commitlint` configuration. You can modify this file to fine-tune the example commit message generated by OpenAI. If the local `@commitlint` configuration changes, this file will be updated the next time OpenCommit is run.
237
+
238
+
This offers you greater control over the generated commit messages, allowing for customization that aligns with your project's conventions.
239
+
240
+
## Git flags
191
241
192
242
The `opencommit` or `oco` commands can be used in place of the `git commit -m "${generatedMessage}"` command. This means that any regular flags that are used with the `git commit` command will also be applied when using `opencommit` or `oco`.
0 commit comments