commit
Stages all changes and creates one AI-generated Conventional Commit per changed repository.
Usage
git-wrangler commit [options]
What it does
Discovers Git worktrees under the current directory, or targets exactly one worktree with --repo. It prepares git add -A context in a temporary index, skips repositories with no changes, sends redacted staged context to the configured AI endpoint, then creates one commit per changed repository.
Diff bodies for common generated, vendor, cache, build, and upload paths are hidden, while file names and stats remain visible.
If context collection or AI generation fails for any repository, Git Wrangler creates no commits and exits nonzero. The real index is staged only after valid AI messages are available.
Options
| Flag | Default | Description |
|---|---|---|
--repo <path> | Target exactly one repository instead of discovering recursively. | |
--max-chars-per-commit <num> | 3000 | Maximum redacted staged context characters per commit. |
--rpm <num> | 300 | Maximum API requests to start per minute. |
--timeout <seconds> | 90 | API timeout in seconds. |
--body | false | Generate a subject and body instead of subject only. |
--yes | false | Skip the data-send confirmation prompt. |
--guided | false | Interactively configure command options before execution. |
AI provider, base URL, model, and API key come from git-wrangler init, git-wrangler config, or supported environment variables.
Confirmation Flow
Before any API call, Git Wrangler prints the endpoint, model, repository count, context budget, and privacy summary, then asks for confirmation.
Declining the data-send prompt is a successful no-op: no data is sent and no commit is created.
After valid messages are generated, commits are created automatically. There is no second confirmation prompt.
--max-chars-per-commit, --rpm, and --timeout must be positive integers.
Example
git-wrangler config set ai.model gpt-4o
git-wrangler config set ai.api-key
git-wrangler commit --body