Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Added
- `--yes`/`-y` commits without prompting (one-shot non-interactive mode); `--dry-run` prints the message without committing.
- `--amend` regenerates the message and amends the previous commit; `-a`/`--all` stages tracked modifications first.
- `--provider` and `--model` overrides per run; unknown options/commands are now rejected instead of ignored.
- `completion` command printing bash/zsh/fish/powershell scripts (bundled resources, native-image ready).

### Changed
- Native binary caps heap at 256MB (`-R:MaxHeapSize=256m`, overridable per run with `-Xmx`); SBOM emits JSON only.

Expand Down
31 changes: 31 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,37 @@ ai-commit # If auto-commit is enabled, it commits instantly AND pushes instantl
# Note: auto-push does not require auto-commit to work
```

### Command-Line Flags

Flags work on any run without changing saved settings:

```bash
git add .
ai-commit --yes # Commit immediately, no prompt (great for scripts)
ai-commit --dry-run # Print the message, commit nothing
ai-commit --amend # Regenerate the message and amend the last commit
ai-commit -a # Stage tracked modifications first (like git commit -a)
ai-commit --provider anthropic # Use one provider for this run only
ai-commit --model gpt-4o # Override the model for this run only
ai-commit --provider ollama --model llama3
```

Unknown options and commands are rejected instead of ignored. `--model` is
rejected for DeepSeek, which uses a fixed model.

### Shell Completions

```bash
# Bash
ai-commit completion bash >> ~/.bash_completion
# Zsh
ai-commit completion zsh > ~/.zsh/completions/_ai-commit
# Fish
ai-commit completion fish > ~/.config/fish/completions/ai-commit.fish
# PowerShell
ai-commit completion powershell >> $PROFILE
```

## Examples

**OpenAI:**
Expand Down
11 changes: 9 additions & 2 deletions TEST_SUMMARY.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Test Suite Summary

## Total Tests: 168
## Total Tests: 217

JaCoCo gate on `verify`: 90% line + branch minimum (currently 96.2% line, 90.5% branch).
JaCoCo gate on `verify`: 90% line + branch minimum (currently 95.8% line, 92.4% branch).

---

Expand Down Expand Up @@ -109,22 +109,29 @@ mvn clean verify
| ConfigTest | 9 | ~100% provider/config logic and guards |
| ConfigPolicyTest | 10 | URL policy, loopback, truthy, timeout range |
| ConfigParsingTest | 10 | temperature/timeout parsing, isConfigured |
| ConfigWithModelTest | 6 | per-run model overrides |
| UserPreferencesTest | 10 | ~100% preference/state/formatting |
| AiCommitCliTest | 4 | toggle parsing, error description |
| AiCommitCliRunTest | 18 | run() paths: version/help/config/commit-flow|
| AiCommitCliArgsTest | 11 | flag parsing, fail-closed rejects |
| AiCommitCliDispatchTest | 11 | flow dispatch, overrides, shells |
| AiProviderFactoryTest | 4 | ~100% provider selection/prioritization |
| AiProviderFactoryReliabilityTest | 6 | per-provider type, output caps, priority |
| AiProviderFactorySelectionTest | 6 | forced selection, priority, rejects |
| GitServiceTest | 6 | ~90% public GitService usage scenarios |
| GitServiceEnvTest | 2 | secret env scrubbing |
| GitServiceValidationTest | 7 | timeout/dir/message validation |
| GitServiceWorkingDirTest | 6 | directory resolution matrix |
| GitServiceProcessTest | 8 | timeout/interrupt/truncation/process errors |
| GitServiceWriteTest | 3 | stage tracked, amend |
| SecretScannerTest | 17 | secret patterns, caps, summary hygiene |
| CommitServiceTest | 15 | ~95% workflow, interactive, AI |
| CommitServiceAutoPushTest | 12 | ~100% all auto-commit/push paths |
| CommitServiceGuardTest | 9 | fail-closed consent, diff policy |
| CommitServiceReliabilityTest | 9 | AI error mapping, null stages, interrupt |
| CommitServiceEdgeTest | 6 | null diff/output, 5xx, edit edges |
| CommitServiceFlowTest | 5 | preview, forced auto, amend flows |
| CompletionTest | 7 | bundled scripts, shell dispatch |

---

Expand Down
Loading
Loading