aicommit2 2.4.6 → 2.4.8

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.
Files changed (3) hide show
  1. package/README.md +29 -20
  2. package/dist/cli.mjs +60 -66
  3. package/package.json +2 -2
package/README.md CHANGED
@@ -195,18 +195,21 @@ aicommit2
195
195
  AICommit2 also supports [Jujutsu (jj)](https://github.com/martinvonz/jj) repositories:
196
196
 
197
197
  ```bash
198
- # No staging needed
198
+ # Automatic jj detection (no staging needed)
199
199
  aicommit2
200
200
 
201
- # Force use when both Git and jj present
202
- JJ=true aicommit2
201
+ # Force Git when both .jj and .git exist (for colocated repos)
202
+ FORCE_GIT=true aicommit2
203
+ # or
204
+ aicommit2 config set forceGit=true
203
205
  ```
204
206
 
205
207
  **Features:**
206
208
 
207
- - Automatic detection of `.jj` repositories
208
- - Uses `jj describe` for commits
209
+ - Automatic detection of `.jj` repositories (prioritized over Git since jj v0.34.0+ uses colocated repos)
210
+ - Uses `jj describe` and `jj new` for commits
209
211
  - Supports Jujutsu's fileset syntax for file exclusions
212
+ - Works seamlessly with colocated Git repositories
210
213
 
211
214
  **Installation:**
212
215
 
@@ -223,10 +226,10 @@ jj init
223
226
 
224
227
  ### Detection Priority
225
228
 
226
- 1. Git repository (default)
227
- 2. Jujutsu repository (if Git not found)
228
- 3. Environment override: `JJ=true` forces Jujutsu
229
- 4. Config: `aicommit2 config set jujutsu=true`
229
+ 1. `FORCE_GIT=true` environment variable (highest priority - forces Git)
230
+ 2. Config: `aicommit2 config set forceGit=true` (forces Git)
231
+ 3. Jujutsu repository (checked first - since jj v0.34.0+, repos are colocated with .git by default)
232
+ 4. Git repository (fallback)
230
233
 
231
234
  ## Usage
232
235
 
@@ -251,7 +254,7 @@ aicommit2 --all # or -a
251
254
 
252
255
  - `--locale` or `-l`: Locale to use for the generated commit messages (default: **en**)
253
256
  - `--all` or `-a`: Automatically stage changes in tracked files for the commit (default: **false**)
254
- - `--type` or `-t`: Git commit message format (default: **conventional**). It supports [`conventional`](https://conventionalcommits.org/), [`gitmoji`](https://gitmoji.dev/), and `jujutsu`
257
+ - `--type` or `-t`: Git commit message format (default: **conventional**). It supports [`conventional`](https://conventionalcommits.org/) and [`gitmoji`](https://gitmoji.dev/)
255
258
  - `--confirm` or `-y`: Skip confirmation when committing after message generation (default: **false**)
256
259
  - `--clipboard` or `-c`: Copy the selected message to the clipboard (default: **false**).
257
260
  - If you give this option, **_aicommit2_ will not commit**.
@@ -285,8 +288,8 @@ Examples:
285
288
  # Generate multiple commit messages with clipboard and file exclusions
286
289
  aicommit2 --locale "jp" --all --type "conventional" --generate 3 --clipboard --exclude "*.json" --exclude "*.ts"
287
290
 
288
- # Generate and edit a Jujutsu-style commit message
289
- aicommit2 --edit --type jujutsu # or conventional, gitmoji
291
+ # Generate and edit a commit message
292
+ aicommit2 --edit --type conventional # or gitmoji
290
293
  ```
291
294
 
292
295
  ### Git hook
@@ -552,11 +555,23 @@ aicommit2 config set exclude="*.ts,*.json"
552
555
 
553
556
  > NOTE: `exclude` option does not support per model. It is **only** supported by General Settings.
554
557
 
558
+ ##### forceGit
559
+
560
+ Default: `false`
561
+
562
+ Force Git detection even in Jujutsu repositories (useful when you have both `.jj` and `.git` directories):
563
+
564
+ ```sh
565
+ aicommit2 config set forceGit=true
566
+ ```
567
+
568
+ This is equivalent to using the `FORCE_GIT=true` environment variable, but persistent across sessions.
569
+
555
570
  ##### type
556
571
 
557
572
  Default: `conventional`
558
573
 
559
- Supported: `conventional`, `gitmoji`, `jujutsu`
574
+ Supported: `conventional`, `gitmoji`
560
575
 
561
576
  The type of commit message to generate:
562
577
 
@@ -572,12 +587,6 @@ aicommit2 config set type="conventional"
572
587
  aicommit2 config set type="gitmoji"
573
588
  ```
574
589
 
575
- **Jujutsu**: Use component-focused commit messages optimized for Jujutsu workflows:
576
-
577
- ```sh
578
- aicommit2 config set type="jujutsu"
579
- ```
580
-
581
590
  ##### locale
582
591
 
583
592
  Default: `en`
@@ -887,7 +896,7 @@ Use curly braces `{}` to denote these placeholders for options. The following pl
887
896
 
888
897
  - [{locale}](#locale): The language for the commit message (**string**)
889
898
  - [{maxLength}](#max-length): The maximum length for the commit message (**number**)
890
- - [{type}](#type): The type of the commit message (**conventional**, **gitmoji**, or **jujutsu**)
899
+ - [{type}](#type): The type of the commit message (**conventional** or **gitmoji**)
891
900
  - [{generate}](#generate): The number of commit messages to generate (**number**)
892
901
 
893
902
  #### Example Template