aicommit2 2.4.17 → 2.4.18
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 +69 -8
- package/dist/cli.mjs +178 -116
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<h1 align="center">AICommit2</h1>
|
|
5
5
|
</div>
|
|
6
6
|
<p>
|
|
7
|
-
A Reactive CLI that generates commit messages for Git and Jujutsu with Ollama, ChatGPT, Gemini, Claude, Mistral, and other AI
|
|
7
|
+
A Reactive CLI that generates commit messages for Git, YADM, and Jujutsu with Ollama, ChatGPT, Gemini, Claude, Mistral, and other AI
|
|
8
8
|
</p>
|
|
9
9
|
</div>
|
|
10
10
|
|
|
@@ -37,17 +37,18 @@ aicommit2 config set OPENAI.key=<your-key>
|
|
|
37
37
|
git add .
|
|
38
38
|
aicommit2
|
|
39
39
|
|
|
40
|
-
# Also works with Jujutsu repositories (auto-detected)
|
|
40
|
+
# Also works with YADM and Jujutsu repositories (auto-detected)
|
|
41
|
+
yadm add <file>
|
|
41
42
|
aicommit2
|
|
42
43
|
```
|
|
43
44
|
|
|
44
45
|
## Introduction
|
|
45
46
|
|
|
46
|
-
AICommit2 automatically generates commit messages using AI. It
|
|
47
|
+
AICommit2 automatically generates commit messages using AI. It supports [Git](https://git-scm.com/), [YADM](https://yadm.io/) (Yet Another Dotfiles Manager), and [Jujutsu](https://github.com/jj-vcs/jj)(jj) repositories with automatic detection. [AICommits](https://github.com/Nutlope/aicommits) inspired the core functionalities and architecture of this project.
|
|
47
48
|
|
|
48
49
|
## Key features
|
|
49
50
|
|
|
50
|
-
- **[VCS Support](#version-control-systems)**: Works with
|
|
51
|
+
- **[VCS Support](#version-control-systems)**: Works with Git, YADM, and Jujutsu repositories
|
|
51
52
|
- **[Multi-AI Support](#cloud-ai-services)**: Integrates with OpenAI, Anthropic Claude, Google Gemini, Mistral AI, Cohere, Groq, Ollama and more
|
|
52
53
|
- **[OpenAI API Compatibility](docs/providers/compatible.md)**: Support for any service that implements the OpenAI API specification
|
|
53
54
|
- **[Reactive CLI](#usage)**: Enables simultaneous requests to multiple AIs and selection of the best commit message
|
|
@@ -201,6 +202,41 @@ aicommit2
|
|
|
201
202
|
- Supports all Git features and hooks
|
|
202
203
|
- Requires staging changes before commit
|
|
203
204
|
|
|
205
|
+
### YADM Support
|
|
206
|
+
|
|
207
|
+
AICommit2 supports [YADM (Yet Another Dotfiles Manager)](https://yadm.io/) for managing dotfiles:
|
|
208
|
+
|
|
209
|
+
```bash
|
|
210
|
+
# Standard YADM workflow
|
|
211
|
+
yadm add <files>
|
|
212
|
+
aicommit2
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
**Features:**
|
|
216
|
+
|
|
217
|
+
- Automatic detection of YADM repositories (prioritized before Git)
|
|
218
|
+
- Uses `yadm` commands instead of `git` for all operations
|
|
219
|
+
- Supports all YADM features including encryption and alternate files
|
|
220
|
+
- Works with dotfiles in `$HOME` directory
|
|
221
|
+
- Hook installation: `aicommit2 hook install` (installs to `~/.config/yadm/hooks/`)
|
|
222
|
+
- **Note:** Watch mode (`--watch-commit`) is not supported for YADM repositories
|
|
223
|
+
|
|
224
|
+
**Installation:**
|
|
225
|
+
|
|
226
|
+
```bash
|
|
227
|
+
# macOS
|
|
228
|
+
brew install yadm
|
|
229
|
+
|
|
230
|
+
# Linux
|
|
231
|
+
apt-get install yadm # Debian/Ubuntu
|
|
232
|
+
dnf install yadm # Fedora
|
|
233
|
+
|
|
234
|
+
# Initialize repository
|
|
235
|
+
yadm init
|
|
236
|
+
# or clone existing dotfiles
|
|
237
|
+
yadm clone <url>
|
|
238
|
+
```
|
|
239
|
+
|
|
204
240
|
### Jujutsu Support
|
|
205
241
|
|
|
206
242
|
AICommit2 also supports [Jujutsu (jj)](https://github.com/martinvonz/jj) repositories:
|
|
@@ -237,10 +273,35 @@ jj init
|
|
|
237
273
|
|
|
238
274
|
### Detection Priority
|
|
239
275
|
|
|
240
|
-
1.
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
276
|
+
1. **CLI flags** (highest priority - overrides everything):
|
|
277
|
+
- `--git`: Force use Git
|
|
278
|
+
- `--yadm`: Force use YADM
|
|
279
|
+
- `--jj`: Force use Jujutsu
|
|
280
|
+
2. **Environment variables**:
|
|
281
|
+
- `FORCE_GIT=true`: Forces Git
|
|
282
|
+
- `FORCE_YADM=true`: Forces YADM
|
|
283
|
+
- `FORCE_JJ=true`: Forces Jujutsu
|
|
284
|
+
3. **Config**: `aicommit2 config set forceGit=true` (forces Git)
|
|
285
|
+
4. **Auto-detection**:
|
|
286
|
+
- Jujutsu repository (checked first - since jj v0.34.0+, repos are colocated with .git)
|
|
287
|
+
- Git repository (checked for .git directories - regular Git repos)
|
|
288
|
+
- YADM repository (checked last - for dotfiles in $HOME without .git directory)
|
|
289
|
+
|
|
290
|
+
### Force VCS Selection
|
|
291
|
+
|
|
292
|
+
Sometimes you may want to use a specific VCS even when multiple are available:
|
|
293
|
+
|
|
294
|
+
```bash
|
|
295
|
+
# Use YADM in a directory that has both .git and YADM tracking
|
|
296
|
+
cd ~/my-project # Has .git directory
|
|
297
|
+
aicommit2 --yadm # Forces YADM usage instead of Git
|
|
298
|
+
|
|
299
|
+
# Use Git explicitly
|
|
300
|
+
aicommit2 --git
|
|
301
|
+
|
|
302
|
+
# Use Jujutsu explicitly
|
|
303
|
+
aicommit2 --jj
|
|
304
|
+
```
|
|
244
305
|
|
|
245
306
|
## Usage
|
|
246
307
|
|