aicommit2 2.2.23 → 2.3.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 +44 -8
- package/dist/cli.mjs +119 -100
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -195,6 +195,13 @@ aicommit2 --all # or -a
|
|
|
195
195
|
- `--generate` or `-g`: Number of messages to generate (default: **1**)
|
|
196
196
|
- **Warning**: This uses more tokens, meaning it costs more.
|
|
197
197
|
- `--exclude` or `-x`: Files to exclude from AI analysis
|
|
198
|
+
- `--include-body` or `-i`: Force include commit body in all generated messages (default: **false**)
|
|
199
|
+
- When enabled, all commit messages will include a detailed body section
|
|
200
|
+
- Useful for providing more context in commit messages
|
|
201
|
+
- `--auto-select` or `-s`: Automatically select the commit message when only one AI model is configured (default: **false**)
|
|
202
|
+
- When enabled and only one AI provider is configured, the generated message is automatically selected
|
|
203
|
+
- Also skips the confirmation prompt for a seamless experience
|
|
204
|
+
- Has no effect when multiple AI providers are configured
|
|
198
205
|
- `--hook-mode`: Run as a Git hook, typically used with prepare-commit-msg hook (default: **false**)
|
|
199
206
|
- This mode is automatically enabled when running through the Git hook system
|
|
200
207
|
- See [Git hook](#git-hook) section for more details
|
|
@@ -359,7 +366,7 @@ _aicommit2_ offers flexible configuration options for all AI services, including
|
|
|
359
366
|
To specify multiple models, use the `--[Model].model=model1,model2` format.
|
|
360
367
|
|
|
361
368
|
```sh
|
|
362
|
-
aicommit2 --OPENAI.locale="jp" --GEMINI.temperature="0.5" --OPENAI.model="gpt-4o,gpt-3.5-turbo"
|
|
369
|
+
aicommit2 --OPENAI.locale="jp" --GEMINI.temperature="0.5" --OPENAI.model="gpt-4o-mini,gpt-3.5-turbo"
|
|
363
370
|
```
|
|
364
371
|
|
|
365
372
|
2. **Configuration file**: Refer to [Configuration File Location](#configuration-file-location) or use the `set` command.
|
|
@@ -376,14 +383,14 @@ _aicommit2_ offers flexible configuration options for all AI services, including
|
|
|
376
383
|
key="<your-api-key>"
|
|
377
384
|
temperature=0.8
|
|
378
385
|
generate=1
|
|
379
|
-
model="gpt-4o,gpt-3.5-turbo"
|
|
386
|
+
model="gpt-4o-mini,gpt-3.5-turbo"
|
|
380
387
|
systemPromptPath="<your-prompt-path>"
|
|
381
388
|
|
|
382
389
|
[GEMINI]
|
|
383
390
|
key="<your-api-key>"
|
|
384
391
|
generate=5
|
|
385
392
|
includeBody=true
|
|
386
|
-
model="gemini-
|
|
393
|
+
model="gemini-2.0-flash,gemini-1.5-pro"
|
|
387
394
|
|
|
388
395
|
[OLLAMA]
|
|
389
396
|
temperature=0.7
|
|
@@ -655,9 +662,9 @@ aicommit2 config set \
|
|
|
655
662
|
topP=0.8 \
|
|
656
663
|
maxTokens=1024 \
|
|
657
664
|
temperature=0.7 \
|
|
658
|
-
OPENAI.key="sk-..." OPENAI.model="gpt-4o" OPENAI.temperature=0.5 \
|
|
659
|
-
ANTHROPIC.key="sk-..." ANTHROPIC.model="claude-3-haiku" ANTHROPIC.maxTokens=2000 \
|
|
660
|
-
MISTRAL.key="your-key" MISTRAL.model="
|
|
665
|
+
OPENAI.key="sk-..." OPENAI.model="gpt-4o-mini" OPENAI.temperature=0.5 \
|
|
666
|
+
ANTHROPIC.key="sk-..." ANTHROPIC.model="claude-3-5-haiku-20241022" ANTHROPIC.maxTokens=2000 \
|
|
667
|
+
MISTRAL.key="your-key" MISTRAL.model="mistral-small-latest" \
|
|
661
668
|
OLLAMA.model="llama3.2" OLLAMA.numCtx=4096 OLLAMA.watchMode=true
|
|
662
669
|
```
|
|
663
670
|
|
|
@@ -712,14 +719,43 @@ The `logging` setting controls whether log files are generated. It can be config
|
|
|
712
719
|
- **Global `logging` setting**: When set in the general configuration, it controls the overall application logging (handled by Winston) and acts as a default for AI request/response logging.
|
|
713
720
|
- **Service-specific `logging` setting**: You can override the global `logging` setting for a particular AI service. If `logging` is set to `false` for a specific service, AI request/response logs will not be generated for that service, regardless of the global setting.
|
|
714
721
|
|
|
715
|
-
###
|
|
722
|
+
### Log Management
|
|
716
723
|
|
|
717
|
-
|
|
724
|
+
_aicommit2_ generates detailed logs for debugging and tracking AI requests. You can manage these log files using the built-in log commands:
|
|
725
|
+
|
|
726
|
+
#### View Log Files
|
|
727
|
+
|
|
728
|
+
```sh
|
|
729
|
+
# List all log files with details
|
|
730
|
+
aicommit2 log list
|
|
731
|
+
|
|
732
|
+
# Show logs directory path
|
|
733
|
+
aicommit2 log path
|
|
734
|
+
```
|
|
735
|
+
|
|
736
|
+
#### Open Log Directory
|
|
737
|
+
|
|
738
|
+
```sh
|
|
739
|
+
# Open logs directory in your file manager
|
|
740
|
+
aicommit2 log open
|
|
741
|
+
```
|
|
742
|
+
|
|
743
|
+
#### Clean Up Logs
|
|
718
744
|
|
|
719
745
|
```sh
|
|
746
|
+
# Remove all log files
|
|
720
747
|
aicommit2 log removeAll
|
|
721
748
|
```
|
|
722
749
|
|
|
750
|
+
#### Log File Information
|
|
751
|
+
|
|
752
|
+
- **Location**: Logs are stored in your system's state directory (usually `~/.local/state/aicommit2/logs` on Linux/macOS)
|
|
753
|
+
- **Content**: Each log file contains the git diff, system prompt, AI response, and metadata
|
|
754
|
+
- **Naming**: Files are named with timestamp and hash for easy identification
|
|
755
|
+
- **Size**: File sizes are displayed in human-readable format (B, KB, MB, GB)
|
|
756
|
+
|
|
757
|
+
|
|
758
|
+
|
|
723
759
|
## Custom Prompt Template
|
|
724
760
|
|
|
725
761
|
_aicommit2_ supports custom prompt templates through the `systemPromptPath` option. This feature allows you to define your own prompt structure, giving you more control over the commit message generation process.
|