id = "aicommit2"
name = "aicommit2"
homepage = "https://github.com/tak-bro/aicommit2"
description = "A Reactive CLI that generates commit messages for Git, YADM, and Jujutsu with Ollama, ChatGPT, Gemini, Claude, Mistral, and other AI."
executables = ["aicommit2", "aic2"]
[dotfiles]
paths = ["[configHome]/aicommit2/config.ini", "~/.aicommit2"]
secret = []
[[dotfiles.secret_paths]]
file = ["[configHome]/aicommit2/config.ini", "~/.aicommit2"]
match = { prefix = ["key"] }
[commands]
format = 1
label = "Generate commit message"
description = "Generate commit messages for the current changes with the configured AI providers. VCS selection, hooks, watch mode and config subcommands are left out."
quality = "ai-draft"
parser = { end_of_options = "--", interleave = "permute", long_equals = false, short_attached = false, short_bundles = false }
[[commands.source]]
id = "readme"
kind = "manual"
url = "https://github.com/tak-bro/aicommit2#readme"
revision = "main 2026-10"
evidence = """
- `--locale` or `-l`: Locale to use for the generated commit messages (default: **en**)
- `--generate` or `-g`: Number of messages to generate (default: **1**)
- `--type` or `-t`: Git commit message format (default: **conventional**). It supports conventional and gitmoji
- `--prompt` or `-p`: Custom prompt to fine-tune the AI generation
- `--include-body` or `-i`: Force include commit body in all generated messages (default: **false**)
- `--all` or `-a`: Automatically stage changes in tracked files for the commit, like `git commit -a`.
- `--confirm` or `-y`: Skip confirmation when committing after message generation (default: **false**)
- `--auto-select` or `-s`: Automatically select the first successfully generated message (default: **false**)
- `--edit` or `-e`: Open the AI-generated commit message in your default editor (default: **false**)
- `--clipboard` or `-c`: Copy the selected message to clipboard and exit **without committing** (default: **false**)
- `--dry-run` or `-d`: Generate commit message without committing (default: **false**).
- `--exclude` or `-x`: Files to exclude from AI analysis
"""
[[commands.field]]
id = "all"
label = "Stage tracked changes"
type = "boolean"
option = ["--all", "-a"]
sources = ["readme"]
[[commands.field]]
id = "type"
label = "Message format"
type = "enum"
option = ["--type", "-t"]
choices = [{ value = "conventional", label = "Conventional Commits" }, { value = "gitmoji", label = "Gitmoji" }]
sources = ["readme"]
[[commands.field]]
id = "locale"
label = "Locale"
type = "string"
option = ["--locale", "-l"]
suggestions = [{ value = "en", label = "English" }, { value = "zh-CN", label = "Chinese (Simplified)" }, { value = "ja", label = "Japanese" }]
sources = ["readme"]
[[commands.field]]
id = "generate"
label = "Messages to generate"
type = "integer"
option = ["--generate", "-g"]
sources = ["readme"]
[[commands.field]]
id = "prompt"
label = "Custom prompt"
type = "string"
option = ["--prompt", "-p"]
sources = ["readme"]
[[commands.field]]
id = "include_body"
label = "Include commit body"
type = "boolean"
option = ["--include-body", "-i"]
sources = ["readme"]
[[commands.field]]
id = "exclude"
label = "Exclude files"
type = "string"
option = ["--exclude", "-x"]
multiple = true
sources = ["readme"]
[[commands.field]]
id = "auto_select"
label = "Auto-select first message"
type = "boolean"
option = ["--auto-select", "-s"]
sources = ["readme"]
[[commands.field]]
id = "confirm"
label = "Skip confirmation"
type = "boolean"
option = ["--confirm", "-y"]
sources = ["readme"]
[[commands.field]]
id = "edit"
label = "Edit in editor"
type = "boolean"
option = ["--edit", "-e"]
sources = ["readme"]
[[commands.field]]
id = "clipboard"
label = "Copy to clipboard, do not commit"
type = "boolean"
option = ["--clipboard", "-c"]
sources = ["readme"]
[[commands.field]]
id = "dry_run"
label = "Dry run"
type = "boolean"
option = ["--dry-run", "-d"]
sources = ["readme"]
[[commands.task]]
id = "commit"
label = "Commit with an AI message"
fields = ["all", "type", "locale", "confirm"]
required = []
[[commands.task]]
id = "preview"
label = "Preview a message"
fields = ["type", "dry_run", "generate"]
required = ["dry_run"]
set = { dry_run = [true] }
[[commands.group]]
id = "basic"
label = "Basic"
fields = ["all", "type", "locale", "generate", "prompt", "dry_run", "clipboard", "confirm"]
[[commands.group]]
id = "advanced"
label = "Advanced"
fields = ["include_body", "exclude", "auto_select", "edit"]