{"id":44944364,"url":"https://github.com/pbsladek/ai-mr-comment","last_synced_at":"2026-05-02T21:01:49.502Z","repository":{"id":338917586,"uuid":"981330236","full_name":"pbsladek/ai-mr-comment","owner":"pbsladek","description":"A command-line tool written in Golang that generates professional Github/Gitlab Merge Request (MR) comments based on git diffs using LLMs.","archived":false,"fork":false,"pushed_at":"2026-04-25T19:06:53.000Z","size":16157,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-04-25T19:24:50.628Z","etag":null,"topics":["ai","anthropic-claude","cli","gemini","git","golang","llms","ollama","openai","pull-requests"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pbsladek.png","metadata":{"files":{"readme":"README.md","changelog":"changelog.go","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":".github/SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-05-10T21:25:17.000Z","updated_at":"2026-04-25T19:06:35.000Z","dependencies_parsed_at":"2026-04-01T19:02:51.882Z","dependency_job_id":null,"html_url":"https://github.com/pbsladek/ai-mr-comment","commit_stats":null,"previous_names":["pbsladek/ai-mr-comment"],"tags_count":73,"template":false,"template_full_name":null,"purl":"pkg:github/pbsladek/ai-mr-comment","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pbsladek%2Fai-mr-comment","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pbsladek%2Fai-mr-comment/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pbsladek%2Fai-mr-comment/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pbsladek%2Fai-mr-comment/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pbsladek","download_url":"https://codeload.github.com/pbsladek/ai-mr-comment/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pbsladek%2Fai-mr-comment/sbom","scorecard":{"id":1243555,"data":{"date":"2026-02-18T09:48:38Z","repo":{"name":"github.com/pbsladek/ai-mr-comment","commit":"fca4c2cb7dbdbe5d412f5e7730e6e15495a5d513"},"scorecard":{"version":"v5.3.0","commit":"c22063e786c11f9dd714d777a687ff7c4599b600"},"score":7.1,"checks":[{"name":"Maintained","score":10,"reason":"30 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/c22063e786c11f9dd714d777a687ff7c4599b600/docs/checks.md#maintained"}},{"name":"Security-Policy","score":10,"reason":"security policy file detected","details":["Info: security policy file detected: .github/SECURITY.md:1","Info: Found linked content: .github/SECURITY.md:1","Info: Found disclosure, vulnerability, and/or timelines in security policy: .github/SECURITY.md:1","Info: Found text in security policy: .github/SECURITY.md:1"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/c22063e786c11f9dd714d777a687ff7c4599b600/docs/checks.md#security-policy"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/c22063e786c11f9dd714d777a687ff7c4599b600/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":0,"reason":"Found 0/16 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/c22063e786c11f9dd714d777a687ff7c4599b600/docs/checks.md#code-review"}},{"name":"Binary-Artifacts","score":9,"reason":"binaries present in source code","details":["Warn: binary detected: ai-mr-comment:1"],"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/c22063e786c11f9dd714d777a687ff7c4599b600/docs/checks.md#binary-artifacts"}},{"name":"Dependency-Update-Tool","score":10,"reason":"update tool detected","details":["Info: detected update tool: Dependabot: .github/dependabot.yml:1"],"documentation":{"short":"Determines if the project uses a dependency update tool.","url":"https://github.com/ossf/scorecard/blob/c22063e786c11f9dd714d777a687ff7c4599b600/docs/checks.md#dependency-update-tool"}},{"name":"Token-Permissions","score":10,"reason":"GitHub workflow tokens follow principle of least privilege","details":["Info: jobLevel 'actions' permission set to 'read': .github/workflows/codeql.yml:20","Info: jobLevel 'contents' permission set to 'read': .github/workflows/codeql.yml:21","Info: jobLevel 'contents' permission set to 'read': .github/workflows/dependency-review.yml:13","Warn: jobLevel 'contents' permission set to 'write': .github/workflows/sbom.yml:14","Info: jobLevel 'contents' permission set to 'read': .github/workflows/scorecard.yml:18","Info: jobLevel 'actions' permission set to 'read': .github/workflows/scorecard.yml:19","Info: topLevel permissions set to 'read-all': .github/workflows/codeql.yml:12","Info: topLevel permissions set to 'read-all': .github/workflows/dependency-review.yml:7","Info: topLevel permissions set to 'read-all': .github/workflows/release.yml:8","Info: topLevel permissions set to 'read-all': .github/workflows/sbom.yml:7","Info: topLevel permissions set to 'read-all': .github/workflows/scorecard.yml:10","Info: topLevel permissions set to 'read-all': .github/workflows/test.yml:9"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/c22063e786c11f9dd714d777a687ff7c4599b600/docs/checks.md#token-permissions"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/c22063e786c11f9dd714d777a687ff7c4599b600/docs/checks.md#license"}},{"name":"Pinned-Dependencies","score":10,"reason":"all dependencies are pinned","details":["Info:  15 out of  15 GitHub-owned GitHubAction dependencies pinned","Info:   6 out of   6 third-party GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/c22063e786c11f9dd714d777a687ff7c4599b600/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/c22063e786c11f9dd714d777a687ff7c4599b600/docs/checks.md#cii-best-practices"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/c22063e786c11f9dd714d777a687ff7c4599b600/docs/checks.md#fuzzing"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/c22063e786c11f9dd714d777a687ff7c4599b600/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":10,"reason":"SAST tool is run on all commits","details":["Info: SAST configuration detected: CodeQL","Info: all commits (18) are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/c22063e786c11f9dd714d777a687ff7c4599b600/docs/checks.md#sast"}},{"name":"Signed-Releases","score":0,"reason":"Project has not signed or included provenance with any releases.","details":["Warn: release artifact v0.1.1 not signed: https://api.github.com/repos/pbsladek/ai-mr-comment/releases/287566315","Warn: release artifact v0.1.1 does not have provenance: https://api.github.com/repos/pbsladek/ai-mr-comment/releases/287566315"],"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/c22063e786c11f9dd714d777a687ff7c4599b600/docs/checks.md#signed-releases"}},{"name":"Packaging","score":10,"reason":"packaging workflow detected","details":["Info: Project packages its releases by way of GitHub Actions.: .github/workflows/release.yml:11"],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/c22063e786c11f9dd714d777a687ff7c4599b600/docs/checks.md#packaging"}},{"name":"Branch-Protection","score":3,"reason":"branch protection is not maximal on development and all release branches","details":["Info: 'allow deletion' disabled on branch 'main'","Info: 'force pushes' disabled on branch 'main'","Info: 'branch protection settings apply to administrators' is required to merge on branch 'main'","Warn: 'stale review dismissal' is disabled on branch 'main'","Warn: branch 'main' does not require approvers","Info: codeowner review is required on branch 'main'","Warn: 'last push approval' is disabled on branch 'main'","Warn: no status checks found to merge onto branch 'main'","Info: PRs are required in order to make changes on branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/c22063e786c11f9dd714d777a687ff7c4599b600/docs/checks.md#branch-protection"}},{"name":"Contributors","score":3,"reason":"project has 1 contributing companies or organizations -- score normalized to 3","details":["Info: found contributions from: seekr technologies"],"documentation":{"short":"Determines if the project has a set of contributors from multiple organizations (e.g., companies).","url":"https://github.com/ossf/scorecard/blob/c22063e786c11f9dd714d777a687ff7c4599b600/docs/checks.md#contributors"}},{"name":"CI-Tests","score":10,"reason":"9 out of 9 merged PRs checked by a CI test -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project runs tests before pull requests are merged.","url":"https://github.com/ossf/scorecard/blob/c22063e786c11f9dd714d777a687ff7c4599b600/docs/checks.md#ci-tests"}}]},"last_synced_at":"2026-02-18T12:41:44.613Z","repository_id":338917586,"created_at":"2026-02-18T12:41:44.613Z","updated_at":"2026-02-18T12:41:44.613Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32549387,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-02T19:18:06.202Z","status":"ssl_error","status_checked_at":"2026-05-02T19:16:21.335Z","response_time":132,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","anthropic-claude","cli","gemini","git","golang","llms","ollama","openai","pull-requests"],"created_at":"2026-02-18T09:26:22.277Z","updated_at":"2026-05-02T21:01:49.487Z","avatar_url":"https://github.com/pbsladek.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ai-mr-comment\n\n[![Go Test](https://github.com/pbsladek/ai-mr-comment/actions/workflows/test.yml/badge.svg)](https://github.com/pbsladek/ai-mr-comment/actions/workflows/test.yml)\n[![Release](https://img.shields.io/github/v/release/pbsladek/ai-mr-comment)](https://github.com/pbsladek/ai-mr-comment/releases)\n[![Go Report Card](https://goreportcard.com/badge/github.com/pbsladek/ai-mr-comment)](https://goreportcard.com/report/github.com/pbsladek/ai-mr-comment)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\nA command-line tool written in Go that generates professional GitLab Merge Request (MR) or GitHub Pull Request (PR) comments based on git diffs using AI (OpenAI, Anthropic, Gemini, Ollama, or local CLI tools — Claude Code, Gemini CLI, or Codex).\n\n## Features\n\n- Reads git diffs from current repo or from a file\n- Auto-detects branch diff against `origin/main` or `origin/master` when no flags are given\n- Staged-only diff (`--staged`) for reviewing changes before committing\n- Exclude files from the diff by glob pattern (`--exclude`)\n- Smart chunking (`--smart-chunk`) for large diffs: summarizes each file, then synthesizes a final comment\n- Optional MR/PR title generation (`--title`) alongside the comment, printed as a distinct section\n- **Generate comments directly from a GitHub PR or GitLab MR URL** (`--pr`) — no local checkout needed\n- Supports public **github.com**, **GitHub Enterprise**, public **gitlab.com**, and **self-hosted GitLab** instances\n- Supports OpenAI, Anthropic (Claude), Google Gemini, and Ollama APIs\n- **Local CLI providers** — delegate auth to locally installed CLI tools, no API key management needed:\n  - `claude-cli` — uses the local `claude` binary (Claude Code session), no API key required\n  - `gemini-cli` — uses the local `gemini` binary (Google OAuth), no API key required\n  - `codex-cli` — uses the local `codex` binary (quiet mode), requires `OPENAI_API_KEY`\n- Customizable API endpoints and models via `--model` flag or config\n- Multiple prompt styles — `default`, `conventional`, `technical`, `user-focused`, `emoji`, `sassy`, `monday`, `jira`, `commit`, `commit-emoji`, `commit-conventional`, `chaos`, `haiku`, `roast`, `intern`, `shakespeare`, `manager`, `yoda`, `excuse`\n- **Jira-aware template** (`--template=jira`) — extracts ticket key from branch name and places it first so Jira auto-links\n- **Commit message generation** (`--commit-msg`) — outputs a single conventional-style line ready for `git commit -m`\n- **`quick-commit` subcommand** — stages all changes, generates a conventional commit message (type and scope derived from the diff), commits, and pushes in one step\n- **Gitmoji support** (`--emoji` on `quick-commit`) — appends a type-matched emoji to the commit subject (✨ feat, 🐛 fix, ♻️ refactor, etc.)\n- **Opt-out conventional commits** (`--no-conventional` on `quick-commit`) — skips conventional format enforcement for free-form messages\n- **Chaos mode** (`--chaos`) — chaotic/absurd conventional commit on `quick-commit`; unhinged-but-accurate MR/PR description on the root command\n- **Haiku mode** (`--haiku`) — commit description as a 5-7-5 haiku on `quick-commit`; full MR/PR description in haiku form on the root command\n- **Roast mode** (`--roast`) — passive-aggressive commit on `quick-commit`; sardonically judgmental MR/PR description on the root command\n- **Fortune trailer** (`--fortune` on `quick-commit`) — appends a dev-wisdom fortune-cookie quote as a commit body\n- **Monday mode** (`--monday` on `quick-commit`) — casual, low-energy \"pre-coffee\" commit message\n- **Jira commit mode** (`--jira` on `quick-commit`) — prefixes the commit message with the Jira ticket key extracted from the branch name\n- **Emoji commit mode** (`--emoji-commit` on `quick-commit`) — appends a type-matched gitmoji to the commit description\n- **Sassy mode** (`--sassy` on `quick-commit`) — sassy but technically accurate commit message\n- **Technical mode** (`--technical` on `quick-commit`) — maximum technical precision; references exact function/struct names from the diff\n- **Intern mode** (`--intern`) — written by an overly enthusiastic junior developer who is SO excited about everything; works on both root cmd and `quick-commit`\n- **Shakespeare mode** (`--shakespeare`) — Early Modern English, iambic cadence, dramatic flair; works on both root cmd and `quick-commit`\n- **Manager mode** (`--manager`) — passive-aggressive corporate non-speak, \"per our earlier discussion\"; works on both root cmd and `quick-commit`\n- **Yoda mode** (`--yoda`) — inverted syntax, object before subject, strong with this one the force is; works on both root cmd and `quick-commit`\n- **Excuse mode** (`--excuse`) — technically accurate but every section has a built-in justification for why it had to be this way; works on both root cmd and `quick-commit`\n- **CI/CD gate** (`--exit-code`) — exits with code 2 when the AI flags critical issues, enabling pipeline enforcement\n- **Auto-post comments** (`--post`) — publishes the generated comment directly to the GitHub PR or GitLab MR via API\n- **Update remote PR/MR metadata** (`--update-title`, `--update-description`) — writes the generated title and/or description back to GitHub or GitLab\n- **Named config profiles** (`--profile`) — switch between providers/models/templates with a single flag; define profiles in `~/.ai-mr-comment.toml` under `[profile.\u003cname\u003e]`\n- Configuration file support (`~/.ai-mr-comment.toml`)\n- Environment variable configuration\n- Outputs to a file (`--output`) or the system clipboard (`--clipboard=title|description|commit-msg|all`); when `--output` is set, stdout is suppressed — output goes to the file only\n- `--output` writes JSON when `--format=json` is set — ideal for saving structured review artifacts\n- Structured JSON output for scripting and CI (`--format json`)\n- Verbose debug logging to stderr (`--verbose`) — API timing, diff stats, config details\n- Live streaming output to the terminal — tokens appear as they are generated\n- Bootstrap a config file with `init-config` (never edit TOML by hand again)\n- All prompt templates stored as editable files in `templates/` — embedded at build time, overridable at `~/.config/ai-mr-comment/templates/\u003cname\u003e.tmpl`\n- Shell completions for bash, zsh, fish, and PowerShell (`completion` subcommand)\n- **Shell aliases** (`gen-aliases`) — prints `amc` and `amc-*` convenience aliases ready to source into your shell profile\n- **Changelog generation** (`changelog`) — produces a user-facing Keep a Changelog entry from a commit range, grouped by Added / Fixed / Breaking Changes etc.\n- **Custom system prompt** (`--system-prompt`) — supply an ad-hoc prompt inline or from a file (`@path`), overriding the active template for a single run\n- Precise token counting for Gemini and heuristic estimation for others\n- Estimated cost calculation in debug mode\n- Native binary with no runtime dependencies\n\n## Installation\n\n### Prerequisites\n\n- Git\n- API key for your preferred provider (OpenAI, Anthropic, or Google Gemini) — **not required** when using `claude-cli`, `gemini-cli`, or `ollama`\n\n### macOS (Homebrew)\n\n```bash\nbrew tap pbsladek/tap\nbrew install ai-mr-comment\n```\n\nOr install directly in one command:\n\n```bash\nbrew install pbsladek/tap/ai-mr-comment\n```\n\nUpgrade later with:\n\n```bash\nbrew upgrade ai-mr-comment\n```\n\n### Other Platforms\n\nDownload the latest binary for your OS from the [Releases](https://github.com/pbsladek/ai-mr-comment/releases) page.\nRelease archives are published for Linux, macOS, and Windows on both x86_64 and arm64.\n\nFor Linux/macOS script installation, download and inspect `scripts/install.sh` from the [repository](https://github.com/pbsladek/ai-mr-comment), then run it directly. The script verifies the downloaded archive against the release `checksums.txt` (and optionally the cosign signature) before installing.\n\n### Building from Source\n\nRequires Go 1.26+.\n\n```bash\n# Clone the repository\ngit clone https://github.com/pbsladek/ai-mr-comment.git\ncd ai-mr-comment\n\n# Build\nmake build\n\n# The binary will be available at ./dist/ai-mr-comment\n# Build and run on current diff\nmake test-run\n\n# Fetch latest tags first so --version shows the correct release tag\nmake fetch-tags build\n```\n\n### Docker\n\nNo Go toolchain required. The image includes git so all diff and commit commands work.\nPublished image: `pwbsladek/ai-mr-comment` on Docker Hub.\nRelease images are published as multi-arch Linux manifests for amd64 and arm64.\nFIPS variant tag: `pwbsladek/ai-mr-comment:\u003cversion\u003e-fips`.\n\nIf you build locally, log in to DHI first (base images are pulled from `dhi.io`):\n\n```bash\ndocker login dhi.io\n```\n\n```bash\n# Build the image\nmake docker-build\n\n# Scan for fixable critical/high CVEs\nmake docker-scout\n\n# Run against the current repo diff (mounts PWD, passes API keys from env)\nmake docker-run ARGS=\"--provider openai\"\n\n# Run quick-commit\nmake docker-quick-commit ARGS=\"--dry-run\"\n\n# Pull a specific version (replace v0.18.1 with the version you want)\ndocker pull pwbsladek/ai-mr-comment:v0.18.1\ndocker pull pwbsladek/ai-mr-comment:v0.18.1-fips\n\n# Or use docker directly\ndocker run --rm -it \\\n  -v \"$(pwd):/repo\" -w /repo \\\n  -e OPENAI_API_KEY \\\n  pwbsladek/ai-mr-comment:v0.18.1 --provider openai\n```\n\n**Mounting your config file:**\n```bash\ndocker run --rm -it \\\n  -v \"$(pwd):/repo\" -w /repo \\\n  -v \"$HOME/.ai-mr-comment.toml:/home/nonroot/.ai-mr-comment.toml:ro\" \\\n  -e OPENAI_API_KEY \\\n  pwbsladek/ai-mr-comment:v0.18.1\n```\n\n**Fetching a PR/MR by URL (no repo mount needed):**\n```bash\ndocker run --rm \\\n  -e OPENAI_API_KEY \\\n  -e GITHUB_TOKEN \\\n  pwbsladek/ai-mr-comment:v0.18.1 --pr https://github.com/owner/repo/pull/42\n```\n\n\u003e **Note:** `--clipboard` is not available inside a container. Use `--output` or `--format json` instead to capture the output.\n\n## Configuration File\n\nThe tool looks for `.ai-mr-comment.toml` in your home directory or the current directory.\n\n### Generating the config file\n\nRun `init-config` to write a fully-commented template to `~/.ai-mr-comment.toml`:\n\n```bash\nai-mr-comment init-config\n\n# Write to a custom path instead\nai-mr-comment init-config --output ./ai-mr-comment.toml\n```\n\nThe command refuses to overwrite an existing file. Remove the old file first if you want to regenerate it.\n\n```toml\n# Choose which provider to use: \"openai\", \"anthropic\", \"gemini\", \"ollama\", \"claude-cli\", \"gemini-cli\", or \"codex-cli\"\nprovider = \"anthropic\"\n\n# === Anthropic Settings ===\nanthropic_api_key = \"xxxx\"\nanthropic_model = \"claude-sonnet-4-6\"\nanthropic_endpoint = \"https://api.anthropic.com/\"\n# Other Anthropic models: claude-opus-4-6, claude-haiku-4-5-20251001\n\n# === Claude CLI Settings ===\n# No API key needed — auth is delegated to the local claude CLI process.\n# Requires Claude Code to be installed (https://claude.ai/code).\n# claude_cli_path = \"\"              # auto-detected: ~/.claude/local/claude, then PATH\nclaude_cli_model = \"claude-sonnet-4-6\"\n\n# === OpenAI Settings ===\nopenai_api_key = \"xxxx\"\nopenai_model = \"gpt-4.1-mini\"\nopenai_endpoint = \"https://api.openai.com/v1/\"\n# Other OpenAI models: gpt-4.1, gpt-4.1-nano, gpt-4o, gpt-4o-mini, o3, o3-mini\n\n# === Gemini Settings ===\ngemini_api_key = \"xxxx\"\ngemini_model = \"gemini-2.5-flash\"\n# Other Gemini models: gemini-2.5-pro, gemini-2.5-flash-lite, gemini-3\n\n# === Gemini CLI Settings ===\n# No API key needed — auth is delegated to the local gemini CLI process (Google OAuth).\n# Requires the Gemini CLI to be installed (https://github.com/google-gemini/gemini-cli).\n# gemini_cli_path = \"\"              # auto-detected from PATH\ngemini_cli_model = \"gemini-2.5-flash\"\n\n# === Codex CLI Settings ===\n# No API key needed — auth is delegated to the local codex CLI process.\n# Requires the OpenAI Codex CLI to be installed (https://github.com/openai/codex).\n# codex_cli_path = \"\"               # auto-detected from PATH\n# codex_cli_model = \"\"              # uses codex default when empty\n\n# === Ollama Settings ===\nollama_model = \"llama3.2\"\nollama_endpoint = \"http://localhost:11434/api/generate\"\n\n# === GitHub / GitHub Enterprise ===\ngithub_token = \"xxxx\"       # or set GITHUB_TOKEN env var (required for private repos)\n# github_base_url = \"\"      # set for GitHub Enterprise, e.g. https://github.mycompany.com\n\n# === GitLab / Self-Hosted GitLab ===\ngitlab_token = \"xxxx\"       # or set GITLAB_TOKEN env var (required for private projects)\n# gitlab_base_url = \"\"      # set for self-hosted GitLab, e.g. https://gitlab.mycompany.com\n\n# === Template Settings ===\n# Options: default, conventional, technical, user-focused, emoji, sassy, monday,\n#          jira, commit, commit-emoji, commit-conventional,\n#          chaos, haiku, roast, intern, shakespeare, manager, yoda, excuse\ntemplate = \"default\"\n\n# === Named Profiles ===\n# Switch with: ai-mr-comment --profile \u003cname\u003e\n# A profile overrides any top-level setting for that invocation only.\n\n[profile.fast]\nprovider     = \"openai\"\nopenai_model = \"gpt-4.1-nano\"\ntemplate     = \"conventional\"\n\n[profile.openai]\nprovider     = \"openai\"\nopenai_model = \"gpt-4.1-mini\"\n\n[profile.anthropic]\nprovider        = \"anthropic\"\nanthropic_model = \"claude-opus-4-6\"\ntemplate        = \"technical\"\n\n[profile.gemini]\nprovider     = \"gemini\"\ngemini_model = \"gemini-2.5-flash\"\n\n[profile.claude-cli]\nprovider         = \"claude-cli\"\nclaude_cli_model = \"claude-sonnet-4-6\"\n\n[profile.gemini-cli]\nprovider          = \"gemini-cli\"\ngemini_cli_model  = \"gemini-2.5-flash\"\n\n[profile.codex-cli]\nprovider = \"codex-cli\"\n\n[profile.local]\nprovider     = \"ollama\"\nollama_model = \"llama3.2\"\n```\n\n## Example Output\n\n**Text mode (`--title`):**\n\n```\n── Title ────────────────────────────────\n\nfeat: Add user authentication system\n\n\n── Description ──────────────────────────\n\n## Summary\n\nAdds a complete user authentication system using JWT tokens and bcrypt password hashing. Required to protect API endpoints and support user identity across sessions.\n\n## Key Changes\n\n- Added user model with bcrypt password hashing\n- Implemented JWT authentication middleware\n- Created login and registration API endpoints\n- Added comprehensive unit tests for auth logic\n\n## Why These Changes\n\nProvides a secure foundation for user identity, allowing protected access to API resources.\n\n```\n\n**JSON mode (`--format json`):**\n\n```json\n{\n  \"title\": \"feat: Add user authentication system\",\n  \"description\": \"## Key Changes\\n\\n- Added user model...\",\n  \"comment\": \"## Key Changes\\n\\n- Added user model...\",\n  \"provider\": \"openai\",\n  \"model\": \"gpt-4o-mini\"\n}\n```\n\n`description` and `comment` carry the same value; `comment` is kept for backwards compatibility. When `--exit-code` is set, a `\"verdict\": \"PASS\"` or `\"verdict\": \"FAIL\"` field is also included.\n\n**Commit message mode (`--commit-msg --format json`):**\n\n```json\n{\"commit_message\":\"feat(auth): add JWT refresh token support\"}\n```\n\n## Usage\n\n```bash\n# Generate comment for the full branch diff (auto-detects merge base with origin/main)\nai-mr-comment\n\n# Generate comment for staged changes only\nai-mr-comment --staged\n\n# Exclude generated or vendored files\nai-mr-comment --exclude \"vendor/**\" --exclude \"*.sum\"\n\n# Use smart chunking for large diffs (summarizes per-file, then combines)\nai-mr-comment --smart-chunk\n\n# Use a specific provider and template\nai-mr-comment --provider anthropic --template technical\n\n# Override the model for a single run\nai-mr-comment --model gpt-4o\n\n# Generate comment for a specific commit range\nai-mr-comment --commit \"HEAD~3..HEAD\"\n\n# Pipe a diff through stdin\ngit diff | ai-mr-comment --file=- --plain\ngh pr diff 42 | ai-mr-comment --quiet\n\n# Generate a comment from a GitHub PR URL (no local checkout needed)\nai-mr-comment --pr https://github.com/owner/repo/pull/42\n\n# Generate a comment from a GitLab MR URL\nai-mr-comment --pr https://gitlab.com/group/project/-/merge_requests/5\n\n# Generate a comment from a GitHub Enterprise or self-hosted GitLab URL\n# (set github_base_url / gitlab_base_url in config or env)\nGITHUB_BASE_URL=https://github.mycompany.com \\\n  ai-mr-comment --pr https://github.mycompany.com/owner/repo/pull/42\n\nGITLAB_BASE_URL=https://gitlab.mycompany.com \\\n  ai-mr-comment --pr https://gitlab.mycompany.com/group/project/-/merge_requests/5\n\n# Generate a title and comment together (shown as separate sections)\nai-mr-comment --title\n\n# Output structured JSON for CI/scripting\n# Always includes title, description, provider, and model fields\nai-mr-comment --format json\n\n# Generate only a git commit message (conventional commits style)\nai-mr-comment --commit-msg --staged\n\n# Generate a commit message as JSON\nai-mr-comment --commit-msg --format json | jq -r '.commit_message'\n\n# Copy the description to clipboard\nai-mr-comment --clipboard=description\n\n# Copy the title to clipboard\nai-mr-comment --title --clipboard=title\n\n# Copy a commit message to clipboard\nai-mr-comment --commit-msg --clipboard=commit-msg\n\n# Gate CI on AI review — exits 2 if critical issues are detected\nai-mr-comment --exit-code --pr https://github.com/owner/repo/pull/42\n\n# Generate and immediately post the comment back to the PR/MR\nai-mr-comment --pr https://github.com/owner/repo/pull/42 --post\n\n# Generate and update the actual PR/MR title and description\nai-mr-comment --pr https://github.com/owner/repo/pull/42 --update-title --update-description\n\n# Save JSON review to a file (for artifact upload in CI)\nai-mr-comment --format json --output /tmp/review.json --pr https://github.com/owner/repo/pull/42\n\n# Enable verbose debug logging to stderr (API timing, diff stats, config)\nai-mr-comment --verbose\n\n# Show token and cost estimation without calling the API\nai-mr-comment --debug\n\n# Print the exact prompt/request for agent debugging without calling the API\ngit diff | ai-mr-comment --file=- --print-prompt\ngit diff | ai-mr-comment --file=- --print-request | jq .\n\n# Preview planned work without calling the provider or writing files\ngit diff | ai-mr-comment --dry-run --file=-\n\n# Inspect changed files and diff stats without spending tokens\nai-mr-comment --changed-files\nai-mr-comment --summary-only --format=json | jq .\n\n# Inspect resolved config, tokens, git state, and local CLI binaries\nai-mr-comment doctor\nai-mr-comment config-dump --format=json | jq .\n\n# Apply a built-in preset\nai-mr-comment --preset ci --pr https://github.com/owner/repo/pull/42\nai-mr-comment --preset local-fast --file=-\nai-mr-comment --preset security\nai-mr-comment changelog --preset release-notes --commit=\"v1.2.0..HEAD\"\n\n# Override the system prompt for a single run (inline)\nai-mr-comment --system-prompt=\"Focus only on security vulnerabilities.\"\n\n# Override the system prompt from a file\nai-mr-comment --system-prompt=@~/prompts/security-review.txt\n\n# Chaos mode — unhinged but accurate MR/PR description\nai-mr-comment --chaos\n\n# Haiku mode — entire description as 5-7-5 haikus\nai-mr-comment --haiku\n\n# Roast mode — sardonically judgmental but correct\nai-mr-comment --roast\n\n# Generate a user-facing changelog entry from the last 10 commits\nai-mr-comment changelog --commit=\"HEAD~10..HEAD\"\n\n# Generate a changelog entry for a release range, output as JSON\nai-mr-comment changelog --commit=\"v1.2.0..HEAD\" --format=json\n\n# Print shell aliases (amc, amc-qc, amc-cl, …) and add to profile\nai-mr-comment gen-aliases \u003e\u003e ~/.zshrc\n\n# Or evaluate on every shell start to always stay up to date\n# eval \"$(ai-mr-comment gen-aliases)\"\n\n# Generate shell completion script\nai-mr-comment completion bash \u003e\u003e ~/.bash_completion\nai-mr-comment completion zsh \u003e ~/.zsh/completions/_ai-mr-comment\n\n# Bootstrap a config file (writes ~/.ai-mr-comment.toml)\nai-mr-comment init-config\n\n# Use a named profile (provider/model/template preset)\nai-mr-comment --profile fast\nai-mr-comment --profile anthropic --title\n```\n\n### Agent and Pipe Integration\n\n`ai-mr-comment` can be used as a Unix-style filter:\n\n```bash\ngit diff | ai-mr-comment --file=- --plain\ngit show HEAD | ai-mr-comment commit-message --file=-\ngh pr diff 42 | ai-mr-comment review --quiet\ngit diff | ai-mr-comment verdict --file=-\n```\n\nFor structured agent input, pass JSON on stdin:\n\n```bash\nprintf '%s' '{\n  \"title\": \"Add auth flow\",\n  \"description\": \"Implements token refresh\",\n  \"branch\": \"feat/AUTH-123-refresh\",\n  \"diff\": \"diff --git a/auth.go b/auth.go\\n+...\"\n}' | ai-mr-comment review --input=json --quiet\n```\n\nAgent-oriented commands:\n\n```bash\nai-mr-comment review --file=-\nai-mr-comment title --file=-\nai-mr-comment commit-message --file=-\nai-mr-comment verdict --file=-\nai-mr-comment estimate --file=-\n```\n\nMachine-friendly output modes:\n\n```bash\nai-mr-comment --quiet\nai-mr-comment --plain\nai-mr-comment --stream=jsonl\nai-mr-comment --print-prompt\nai-mr-comment --print-request\nai-mr-comment --dry-run\nai-mr-comment --summary-only\n```\n\nExit codes are stable for automation: `0` success/pass, `1` tool or runtime error, `2` AI verdict fail, `3` no diff/input, `4` invalid usage.\n\n### Options\n\n- `--pr \u003cURL\u003e`: GitHub PR or GitLab MR URL — fetches diff and metadata remotely, no local checkout needed. Works with `github.com`, GitHub Enterprise, `gitlab.com`, and self-hosted GitLab. Mutually exclusive with `--staged`, `--commit`, and `--file`.\n- `--commit \u003cCOMMIT\u003e`: Specific commit or range\n- `--staged`: Diff staged changes only (`git diff --cached`); mutually exclusive with `--commit`\n- `--exclude \u003cPATTERN\u003e`: Exclude files matching glob pattern (e.g. `vendor/**`, `*.sum`). Can be repeated.\n- `--smart-chunk`: Split large diffs by file, summarize each, then synthesize a final comment\n- `--title`: Generate a concise MR/PR title alongside the comment; printed as a distinct `── Title ──` section in text mode. When `--format=json` is used, title is always generated automatically (no need for `--title`). Mutually exclusive with `--commit-msg`.\n- `--commit-msg`: Generate a single-line git commit message instead of a full MR/PR description. Output is clean text or `{\"commit_message\":\"...\"}` in JSON mode. Mutually exclusive with `--title`.\n- `--multi-line`: Generate a multi-line commit message (subject + blank line + markdown body) when used with `--commit-msg` or `quick-commit`. GitHub and GitLab use this format to pre-fill the PR/MR title and description automatically.\n- `--exit-code`: Exit with code 2 when the AI detects critical issues (bugs, security vulnerabilities, data loss risks). Mutually exclusive with `--commit-msg`.\n- `--post`: Post the generated comment back to the GitHub PR or GitLab MR via API (requires `--pr`). Uses the same token as diff fetching.\n- `--update-title`: Update the GitHub PR title or GitLab MR title with the generated title (requires `--pr`). Mutually exclusive with `--commit-msg`.\n- `--update-description`: Update the GitHub PR body or GitLab MR description with the generated description (requires `--pr`). Mutually exclusive with `--commit-msg` and `--title-only`.\n- `--dry-run`: Print the resolved plan and diff stats without calling the provider, writing output files, copying to clipboard, posting comments, or updating PR/MR metadata.\n- `--changed-files`: Print changed file paths and exit without calling the provider.\n- `--summary-only`: Print diff stats and changed files and exit without calling the provider.\n- `--file \u003cFILE\u003e`: Read diff from file instead of git. Use `--file=-` to read from stdin.\n- `--output \u003cFILE\u003e`: Write output to file instead of stdout — **suppresses all terminal output**. Writes JSON when `--format=json` is set; writes the commit message when `--commit-msg` is set.\n- `--clipboard \u003cWHAT\u003e`: Copy to system clipboard — `title`, `description` (or `comment`), `commit-msg`, or `all` (title + description separated by a blank line)\n- `--format \u003cFORMAT\u003e`: Output format — `text` (default) or `json`\n- `--input \u003cFORMAT\u003e`: Input format — `text` (default) or `json` for structured agent input (`title`, `description`, `branch`, `diff`)\n- `--quiet`: Force strict JSON output on stdout for agents and scripts\n- `--plain`, `--no-decorate`: Suppress text section headers and decorative separators\n- `--stream=jsonl`: Emit JSON Lines events (`start`, `token`, `done`) instead of decorated text\n- `--print-prompt`: Print the resolved system prompt and exit without calling the provider\n- `--print-request`: Print the resolved provider request as JSON and exit without calling the provider\n- `--preset \u003cNAME\u003e`: Apply built-in defaults: `ci` (JSON + exit-code + technical), `local-fast` (Ollama + plain), `security` (security-focused technical review), or `release-notes` (user-focused title/description).\n- `--provider \u003cPROVIDER\u003e`: Provider (`openai`, `anthropic`, `gemini`, `ollama`, `claude-cli`, `gemini-cli`, `codex-cli`)\n- `--model \u003cNAME\u003e`: Override the model for this run (e.g. `gpt-4o`, `claude-opus-4-6`, `gemini-2.5-flash`)\n- `-t, --template \u003cNAME\u003e`: Template style — `default`, `conventional`, `technical`, `user-focused`, `emoji`, `sassy`, `monday`, `jira`, `commit`, `commit-emoji`, `commit-conventional`, `chaos`, `haiku`, `roast`, `intern`, `shakespeare`, `manager`, `yoda`, `excuse` (`commit`, `commit-emoji`, and `commit-conventional` require `--commit-msg`; style templates cannot be combined with `--commit-msg`)\n- `--system-prompt \u003cTEXT|@FILE\u003e`: Override the system prompt for this run. Pass the prompt inline (`--system-prompt=\"Focus on security\"`) or read it from a file with an `@` prefix (`--system-prompt=@review.txt`). Mutually exclusive with `--template`.\n- `--chaos`: Generate a chaotic, dramatically over-the-top MR/PR description (still technically accurate). Mutually exclusive with `--template`, `--system-prompt`, `--commit-msg`.\n- `--haiku`: Generate the entire MR/PR description as a sequence of haikus (5-7-5). Mutually exclusive with `--template`, `--system-prompt`, `--commit-msg`.\n- `--roast`: Generate a technically accurate but sardonically judgmental MR/PR description. Mutually exclusive with `--template`, `--system-prompt`, `--commit-msg`.\n- `--profile \u003cNAME\u003e`: Activate a named config profile defined under `[profile.\u003cname\u003e]` in `~/.ai-mr-comment.toml`. Overrides top-level provider, model, template, and other settings for this run only.\n- `--debug`: Show precise token usage and cost estimation without calling the generation API\n- `--verbose`: Print detailed debug lines to stderr — config file path, diff stats, template source, streaming decision, and per-API-call timing and response size\n- `--version`: Print version, commit SHA, and repository URL in `key=value` format and exit\n- `-h, --help`: Print help\n\n### Diagnostics\n\n`doctor` and its alias `config-dump` inspect local readiness without making a live provider request:\n\n```bash\nai-mr-comment doctor\nai-mr-comment doctor --provider openai\nai-mr-comment doctor --preset local-fast --format=json\n```\n\nUse `check` when you want a live provider ping.\n\n### Subcommands\n\n- `quick-commit [flags]`: Stage all changes, generate an AI commit message, commit, and push in one step. See [Quick Commit](#quick-commit) below.\n- `publish [flags]`: Generate and sync a PR/MR title, description, managed summary comment, labels, and reviewers in one step. See [Publish](#publish) below.\n- `changelog [flags]`: Generate a user-facing changelog entry from a commit range or diff file. See [Changelog](#changelog) below.\n- `gen-aliases [--shell bash|zsh] [--output FILE]`: Print `amc` and `amc-*` shell aliases to stdout. See [Shell Aliases](#shell-aliases) below.\n- `models [--provider \u003cNAME\u003e]`: List known model names for a provider.\n- `init-config [--output \u003cPATH\u003e]`: Write a default config file to `~/.ai-mr-comment.toml` (or the given path). Refuses to overwrite an existing file.\n- `completion [bash|zsh|fish|powershell]`: Print a shell completion script to stdout.\n\n## GitHub \u0026 GitLab Integration (`--pr`)\n\nPoint `--pr` at any GitHub pull request or GitLab merge request URL to generate a comment without needing the repository checked out locally.\n\n```bash\n# GitHub (public)\nai-mr-comment --pr https://github.com/owner/repo/pull/42\n\n# GitLab (public)\nai-mr-comment --pr https://gitlab.com/group/project/-/merge_requests/5\n```\n\n### Authentication\n\nPublic repos and projects work without a token (subject to API rate limits). For private repos set the token via environment variable or config file:\n\n| Platform | Env var | Config key |\n|---|---|---|\n| GitHub / GitHub Enterprise | `GITHUB_TOKEN` | `github_token` |\n| GitLab / Self-Hosted GitLab | `GITLAB_TOKEN` | `gitlab_token` |\n\n### Self-Hosted Instances\n\nFor GitHub Enterprise or self-hosted GitLab, pass the instance base URL. The SDKs automatically append the correct API path (`/api/v3/` for GitHub, `/api/v4/` for GitLab).\n\n**Environment variables:**\n```bash\n# GitHub Enterprise\nGITHUB_BASE_URL=https://github.mycompany.com \\\n  ai-mr-comment --pr https://github.mycompany.com/owner/repo/pull/42\n\n# Self-hosted GitLab\nGITLAB_BASE_URL=https://gitlab.mycompany.com \\\n  ai-mr-comment --pr https://gitlab.mycompany.com/group/project/-/merge_requests/5\n```\n\n**Config file (`.ai-mr-comment.toml`):**\n```toml\ngithub_base_url = \"https://github.mycompany.com\"\ngitlab_base_url = \"https://gitlab.mycompany.com\"\n```\n\n## Templates\n\nSelect a template with `-t` / `--template`. All templates receive the branch name as context (useful for ticket key extraction).\n\nAll built-in templates live in `templates/` in the repository and are embedded into the binary at build time. You can override any template by placing a file at `~/.config/ai-mr-comment/templates/\u003cname\u003e.tmpl`.\n\n| Name | Description |\n|---|---|\n| `default` | Professional description with Summary, Key Changes, Why, Checklist, Notes |\n| `conventional` | Conventional Commits body with optional BREAKING CHANGE and Refs |\n| `technical` | Deep technical focus — Summary, Implementation Details, Rationale, Testing Strategy |\n| `user-focused` | Non-technical perspective — What's New, Why Important, Impact |\n| `emoji` | Fun emoji-rich format with Summary section |\n| `sassy` | Dry-wit tone, technically accurate |\n| `monday` | Casual \"pre-coffee\" tone |\n| `jira` | Puts the Jira ticket key from the branch name first so Jira auto-links; includes Summary section |\n| `commit` | Single-line conventional commit message (requires `--commit-msg`) |\n| `commit-emoji` | Single-line gitmoji-style commit message (requires `--commit-msg`) |\n| `commit-conventional` | Full Conventional Commits message with optional body, BREAKING CHANGE footer, and Refs (requires `--commit-msg`) |\n| `chaos` | Chaotic, dramatically over-the-top description (still technically accurate) |\n| `haiku` | Entire description as a sequence of haikus |\n| `roast` | Sardonically judgmental, dry-wit tone |\n| `intern` | Overly enthusiastic junior-developer energy |\n| `shakespeare` | Shakespearean Early Modern English |\n| `manager` | Passive-aggressive corporate non-speak |\n| `yoda` | Inverted Yoda syntax |\n| `excuse` | Technically accurate with built-in excuses for every decision |\n\n### Jira Integration\n\nThe `jira` template extracts the ticket key from your branch name (e.g. `feat/ABC-123-add-login` → `ABC-123`) and places it at the very start of the description so Jira's branch/commit linking picks it up automatically.\n\n```bash\nai-mr-comment --template jira --staged\n# Output starts with: \"ABC-123 Add login endpoint\\n\\n## Key Changes...\"\n```\n\nThis works because the current branch name is automatically prepended to the diff context for all local git operations (not `--file` or `--pr`).\n\n## Custom System Prompt\n\nUse `--system-prompt` to replace the active template prompt for a single run — no template file needed.\n\n```bash\n# Inline prompt\nai-mr-comment --system-prompt=\"Focus only on security vulnerabilities.\"\n\n# Read from a file (@ prefix)\nai-mr-comment --system-prompt=@~/prompts/security-review.txt\n\n# Works on the changelog subcommand too\nai-mr-comment changelog --commit=\"v1.2.0..HEAD\" \\\n  --system-prompt=\"List only breaking changes in one sentence each.\"\n```\n\n`--system-prompt` and `--template` are mutually exclusive — use one or the other per run.\n\nWhen `--exit-code` is also set, the verdict preamble is still prepended on top of the custom prompt (same behaviour as with templates).\n\n## Commit Messages\n\nUse `--commit-msg` to generate a single conventional-style commit message instead of a full PR description.\n\n```bash\n# Print the message (text mode)\nai-mr-comment --commit-msg --staged\n\n# JSON output — single key, pipeline-friendly\nai-mr-comment --commit-msg --format json\n# {\"commit_message\":\"feat(auth): add JWT refresh token support\"}\n\n# Pipe directly into git commit\ngit commit -m \"$(ai-mr-comment --commit-msg --staged)\"\n\n# Copy to clipboard\nai-mr-comment --commit-msg --staged --clipboard=commit-msg\n\n# Gitmoji style\nai-mr-comment --commit-msg --template commit-emoji --staged\n\n# Multi-line message: subject + blank line + markdown body\n# GitHub/GitLab use this to pre-fill the PR/MR title and description\nai-mr-comment --commit-msg --multi-line --staged\n\n# Use it with quick-commit too\nai-mr-comment quick-commit --multi-line\n```\n\n`--commit-msg` and `--title` are mutually exclusive. In JSON mode, the response contains only `commit_message` (no `description` or `title` fields).\n\n## Quick Commit\n\n`quick-commit` is a one-command shortcut for the full stage → AI message → commit → push workflow.\n\n```bash\n# Full workflow\nai-mr-comment quick-commit\n\n# Preview the generated message without touching git\nai-mr-comment quick-commit --dry-run\n\n# Generate a long multi-section commit body\nai-mr-comment quick-commit --long\n\n# Aim for a specific body length\nai-mr-comment quick-commit --body-lines=32\n\n# Commit but skip the push\nai-mr-comment quick-commit --no-push\n\n# Use a specific provider or model\nai-mr-comment quick-commit --provider anthropic --model claude-opus-4-6\n\n# Use a named profile\nai-mr-comment quick-commit --profile anthropic\n\n# Force a breaking-change commit (feat!) for a major version bump\nai-mr-comment quick-commit --breaking\n\n# Append a type-matched gitmoji to the subject\nai-mr-comment quick-commit --emoji\n# e.g. feat(cli): add flag ✨\n\n# Skip conventional commits format — free-form message\nai-mr-comment quick-commit --no-conventional\n\n# Chaos mode — random funny/absurd conventional commit (great for pipeline trigger commits)\nai-mr-comment quick-commit --chaos\n# e.g. ci(gremlins): ask nicely that the gremlins stop eating the cache\n\n# Haiku mode — commit description as a 5-7-5 haiku about the diff\nai-mr-comment quick-commit --haiku\n# e.g. feat(auth): tokens flow in / sessions find their rightful home / login works at last\n\n# Roast mode — technically accurate but passive-aggressively judgmental\nai-mr-comment quick-commit --roast\n# e.g. refactor(naming): rename 'x' to something a human might understand\n\n# Fortune trailer — appends a dev-wisdom quote as a commit body\nai-mr-comment quick-commit --fortune\n# commit subject + blank line + \"The best code is the code you didn't have to write.\"\n\n# Combine chaos + fortune for maximum vibes\nai-mr-comment quick-commit --chaos --fortune\n\n# Monday mode — casual, low-energy \"pre-coffee\" commit\nai-mr-comment quick-commit --monday\n# e.g. chore(deps): update the packages, it is what it is\n\n# Jira mode — prefix with ticket key extracted from branch name\nai-mr-comment quick-commit --jira\n# e.g. feat(auth): ABC-123 add JWT refresh token support\n\n# Emoji-commit mode — append a type-matched gitmoji to the description\nai-mr-comment quick-commit --emoji-commit\n# e.g. feat(auth): add refresh token rotation ✨\n\n# Sassy mode — accurate but with attitude\nai-mr-comment quick-commit --sassy\n# e.g. fix(auth): handle the edge case that definitely should have been handled\n\n# Technical mode — maximum precision, references exact names from the diff\nai-mr-comment quick-commit --technical\n# e.g. refactor(api): replace O(n²) scan with hash-map lookup in resolveUser\n\n# Intern mode — SO excited about this commit!!\nai-mr-comment quick-commit --intern\n# e.g. feat(auth): add the login thing everyone was asking about!!\n\n# Shakespeare mode — hark, the diff doth speak\nai-mr-comment quick-commit --shakespeare\n# e.g. fix(parser): hark, the null doth crash our noble code no more\n\n# Manager mode — per our earlier alignment session\nai-mr-comment quick-commit --manager\n# e.g. feat(auth): action item from last sprint re: token refresh, going forward\n\n# Yoda mode — inverted syntax, strong with this commit it is\nai-mr-comment quick-commit --yoda\n# e.g. fix(cache): stale data, purge we must\n\n# Excuse mode — it happened for reasons, there were constraints\nai-mr-comment quick-commit --excuse\n# e.g. fix(parser): handle empty input, which apparently nobody tested before\n\n# JSON output — only commit_message is printed, all status lines suppressed\nai-mr-comment quick-commit --format json\n# {\"commit_message\":\"feat(cli): add login endpoint\"}\n```\n\nSteps performed:\n1. `git add .` — stages all changes\n2. Reads the staged diff; prepends branch name for ticket key context\n3. Calls AI with the conventional commits prompt\n4. `git commit -m \"\u003cmessage\u003e\"`\n5. `git push --set-upstream origin \u003cbranch\u003e` — works for new branches too\n\n| Flag | Description |\n|---|---|\n| `--dry-run` | Generate and print the message, skip all git operations |\n| `--no-push` | Commit but skip the push |\n| `--breaking` | Force `feat!` conventional commit type to signal a breaking change (major version bump) |\n| `--multi-line` | Generate a multi-line message (subject + body) that pre-fills the PR/MR title and description |\n| `--long` | Generate a longer multi-section body; implies `--multi-line` |\n| `--body-lines` | Target body line count for long multi-line commits; implies `--multi-line` |\n| `--emoji` | Append a type-matched gitmoji to the subject (✨ feat, 🐛 fix, ♻️ refactor, 💥 breaking, etc.) |\n| `--no-conventional` | Skip conventional commits format — AI generates a free-form message instead |\n| `--chaos` | Generate a random funny/absurd conventional commit (ignores the real diff; great for pipeline trigger commits) |\n| `--haiku` | Write the commit description as a 5-7-5 haiku about the actual diff |\n| `--roast` | Technically accurate but passive-aggressively judgmental commit message |\n| `--fortune` | Append a dev-wisdom fortune-cookie quote as a commit body (`git log` shows it as a trailer) |\n| `--monday` | Casual, low-energy \"pre-coffee\" tone; accurate but undemanding |\n| `--jira` | Prefix the message with the Jira ticket key extracted from the branch name |\n| `--emoji-commit` | Append a type-matched gitmoji to the commit description |\n| `--sassy` | Sassy but technically accurate commit message |\n| `--technical` | Maximum technical precision; references exact function/struct names from the diff |\n| `--intern` | Overly enthusiastic junior-developer commit message |\n| `--shakespeare` | Commit description in Shakespearean Early Modern English |\n| `--manager` | Passive-aggressive corporate non-speak commit message |\n| `--yoda` | Commit description in Yoda's inverted syntax |\n| `--excuse` | Technically accurate commit message with a built-in excuse |\n| `--format json` | Output `{\"commit_message\":\"...\"}` only; suppress status lines |\n| `--provider` | Override the AI provider |\n| `--model` | Override the model |\n| `--profile` | Activate a named config profile |\n\n## Publish\n\n`publish` is the one-shot remote PR/MR workflow. It generates a title and description, updates the remote title/body, preserves manual description text by syncing only a managed section, and creates or updates one managed summary comment.\n\n```bash\n# Existing GitHub PR or GitLab MR\nai-mr-comment publish --pr https://github.com/owner/repo/pull/42\n\n# Add labels, request reviewers, and mark the title as Draft: if the generated text looks risky\nai-mr-comment publish \\\n  --pr https://gitlab.com/group/project/-/merge_requests/5 \\\n  --auto-labels \\\n  --label=release-notes \\\n  --reviewer=12345 \\\n  --draft-if-risky\n\n# From a local branch: find an existing PR/MR or create one from origin\nai-mr-comment publish\n\n# Preview without writing remote changes\nai-mr-comment publish --pr https://github.com/owner/repo/pull/42 --dry-run --format=json\n```\n\n| Flag | Description |\n|---|---|\n| `--pr` | Existing GitHub PR or GitLab MR URL. If omitted, `publish` uses the current branch and `origin` remote to find or create a PR/MR |\n| `--no-update-title` | Skip updating the remote title |\n| `--no-update-description` | Skip updating the remote PR body / MR description |\n| `--replace-description` | Replace the full description instead of syncing the managed `ai-mr-comment` section |\n| `--post-summary` | Create or update one managed summary comment. Defaults to `true`; use `--post-summary=false` to disable |\n| `--auto-labels` | Apply simple labels inferred from changed files and generated text, such as `docs`, `tests`, `ci`, `dependencies`, or `security` |\n| `--label` | Add an explicit label. Can be repeated or comma-separated |\n| `--reviewer` | Request a reviewer. GitHub uses usernames; GitLab uses numeric user IDs |\n| `--draft-if-risky` | Prefix the generated title with `Draft:` when generated text indicates high risk |\n| `--dry-run` | Generate and print the planned remote changes without writing them |\n| `--format` | `text` (default) or `json` |\n\n## Changelog\n\n`changelog` generates a user-facing changelog entry from any diff source. Output follows the [Keep a Changelog](https://keepachangelog.com/) format, grouped under the headings that apply: Added, Changed, Deprecated, Removed, Fixed, Security, Breaking Changes.\n\n```bash\n# Last 10 commits (Makefile default)\nmake changelog\n\n# Specific release range\nai-mr-comment changelog --commit=\"v1.2.0..HEAD\"\n\n# From a diff file\nai-mr-comment changelog --file=my.diff --provider=anthropic\n\n# JSON output for CI pipelines\nai-mr-comment changelog --commit=\"v1.2.0..HEAD\" --format=json\n\n# Write directly to a file\nai-mr-comment changelog --commit=\"v1.2.0..HEAD\" --output=CHANGELOG.md\n\n# Override the prompt for a custom format\nai-mr-comment changelog --commit=\"v1.2.0..HEAD\" \\\n  --system-prompt=\"List only breaking changes.\"\n```\n\n| Flag | Description |\n|---|---|\n| `--commit` | Commit or commit range (e.g. `v1.2.0..HEAD`) |\n| `--file` | Read diff from a file instead of git |\n| `--format` | `text` (default) or `json` (`{\"changelog\":\"...\",\"provider\":\"...\",\"model\":\"...\"}`) |\n| `--output` | Write output to a file instead of stdout |\n| `--provider` | AI provider override |\n| `--model` | Model override |\n| `--profile` | Activate a named config profile |\n| `--system-prompt` | Override the changelog system prompt |\n\n## Shell Aliases\n\n`gen-aliases` prints a block of ready-to-source shell alias definitions.\n\n```bash\n# Append once to your profile\nai-mr-comment gen-aliases \u003e\u003e ~/.zshrc\n\n# Or evaluate on every shell start (always up-to-date)\neval \"$(ai-mr-comment gen-aliases)\"\n\n# Write directly to a file\nai-mr-comment gen-aliases --output=~/.bashrc\n\n# Via make\nmake gen-aliases\n```\n\nAliases defined:\n\n| Alias | Expands to |\n|---|---|\n| `amc` | `ai-mr-comment` |\n| `amc-staged` | `ai-mr-comment --staged` |\n| `amc-commit` | `ai-mr-comment --commit-msg --staged` |\n| `amc-commit-multi` | `ai-mr-comment --commit-msg --multi-line --staged` |\n| `amc-title` | `ai-mr-comment --title` |\n| `amc-json` | `ai-mr-comment --format=json` |\n| `amc-debug` | `ai-mr-comment --debug` |\n| `amc-chaos` | `ai-mr-comment --chaos` |\n| `amc-haiku` | `ai-mr-comment --haiku` |\n| `amc-roast` | `ai-mr-comment --roast` |\n| `amc-intern` | `ai-mr-comment --intern` |\n| `amc-shakespeare` | `ai-mr-comment --shakespeare` |\n| `amc-manager` | `ai-mr-comment --manager` |\n| `amc-yoda` | `ai-mr-comment --yoda` |\n| `amc-excuse` | `ai-mr-comment --excuse` |\n| `amc-conventional` | `ai-mr-comment --template=conventional` |\n| `amc-emoji` | `ai-mr-comment --template=emoji` |\n| `amc-jira` | `ai-mr-comment --template=jira` |\n| `amc-monday` | `ai-mr-comment --template=monday` |\n| `amc-sassy` | `ai-mr-comment --template=sassy` |\n| `amc-technical` | `ai-mr-comment --template=technical` |\n| `amc-user` | `ai-mr-comment --template=user-focused` |\n| `amc-qc` | `ai-mr-comment quick-commit` |\n| `amc-qc-dry` | `ai-mr-comment quick-commit --dry-run` |\n| `amc-qc-breaking` | `ai-mr-comment quick-commit --breaking` |\n| `amc-qc-chaos` | `ai-mr-comment quick-commit --chaos` |\n| `amc-qc-haiku` | `ai-mr-comment quick-commit --haiku` |\n| `amc-qc-roast` | `ai-mr-comment quick-commit --roast` |\n| `amc-qc-fortune` | `ai-mr-comment quick-commit --fortune` |\n| `amc-qc-monday` | `ai-mr-comment quick-commit --monday` |\n| `amc-qc-jira` | `ai-mr-comment quick-commit --jira` |\n| `amc-qc-emoji` | `ai-mr-comment quick-commit --emoji-commit` |\n| `amc-qc-sassy` | `ai-mr-comment quick-commit --sassy` |\n| `amc-qc-technical` | `ai-mr-comment quick-commit --technical` |\n| `amc-qc-intern` | `ai-mr-comment quick-commit --intern` |\n| `amc-qc-shakespeare` | `ai-mr-comment quick-commit --shakespeare` |\n| `amc-qc-manager` | `ai-mr-comment quick-commit --manager` |\n| `amc-qc-yoda` | `ai-mr-comment quick-commit --yoda` |\n| `amc-qc-excuse` | `ai-mr-comment quick-commit --excuse` |\n| `amc-cl` | `ai-mr-comment changelog` |\n| `amc-models` | `ai-mr-comment models` |\n| `amc-init` | `ai-mr-comment init-config` |\n\n| Flag | Description |\n|---|---|\n| `--shell` | `bash` (default) or `zsh` — both use identical alias syntax |\n| `--output` | Also write aliases to this file |\n\n## Local CLI Providers\n\nThree providers delegate AI calls and authentication to a locally installed CLI tool — no API key management in `ai-mr-comment` is required. These are useful on machines where auth is handled by the CLI's own session (SSO, OAuth, Claude Code session).\n\n### `claude-cli` — Claude Code\n\nDelegates to the [`claude`](https://claude.ai/code) binary. Auth is managed by Claude Code — no `ANTHROPIC_API_KEY` needed.\n\n```toml\nprovider = \"claude-cli\"\nclaude_cli_model = \"claude-sonnet-4-6\"\n```\n\nBinary lookup order:\n1. `claude_cli_path` in config (if set)\n2. `~/.claude/local/claude`\n3. `claude` on `$PATH`\n\n| Key | Description | Default |\n|---|---|---|\n| `claude_cli_path` | Explicit path to the `claude` binary | auto-detected |\n| `claude_cli_model` | Model passed via `--model` | `claude-sonnet-4-6` |\n\n### `gemini-cli` — Google Gemini CLI\n\nDelegates to the [`gemini`](https://github.com/google-gemini/gemini-cli) binary. Auth uses Google OAuth — no `GEMINI_API_KEY` needed.\n\nInstall: `npm install -g @google/gemini-cli`\n\n```toml\nprovider = \"gemini-cli\"\ngemini_cli_model = \"gemini-2.5-flash\"\n```\n\n| Key | Description | Default |\n|---|---|---|\n| `gemini_cli_path` | Explicit path to the `gemini` binary | auto-detected via `$PATH` |\n| `gemini_cli_model` | Model passed via `--model` | `gemini-2.5-flash` |\n\n### `codex-cli` — OpenAI Codex CLI\n\nDelegates to the [`codex`](https://github.com/openai/codex) binary in quiet/non-interactive mode. Still requires `OPENAI_API_KEY` but handles its own session and approval flow.\n\nInstall: `npm install -g @openai/codex`\n\n```toml\nprovider = \"codex-cli\"\n# codex_cli_model = \"\"   # leave empty to use codex default\n```\n\n| Key | Description | Default |\n|---|---|---|\n| `codex_cli_path` | Explicit path to the `codex` binary | auto-detected via `$PATH` |\n| `codex_cli_model` | Model passed via `--model` | empty (codex default) |\n\n### Profiles\n\nAll three have built-in profiles:\n\n```bash\nai-mr-comment --profile claude-cli\nai-mr-comment --profile gemini-cli\nai-mr-comment --profile codex-cli\n```\n\n## Named Profiles\n\nDefine named profiles in `~/.ai-mr-comment.toml` under `[profile.\u003cname\u003e]` sections. Each profile can override any top-level setting — provider, model, template, endpoint, etc.\n\n```toml\nprovider        = \"anthropic\"\nanthropic_model = \"claude-sonnet-4-6\"\ntemplate        = \"default\"\n\n[profile.fast]\nprovider     = \"openai\"\nopenai_model = \"gpt-4.1-nano\"\ntemplate     = \"conventional\"\n\n[profile.openai]\nprovider     = \"openai\"\nopenai_model = \"gpt-4.1\"\ntemplate     = \"technical\"\n\n[profile.anthropic]\nprovider        = \"anthropic\"\nanthropic_model = \"claude-opus-4-6\"\ntemplate        = \"technical\"\n\n[profile.gemini]\nprovider     = \"gemini\"\ngemini_model = \"gemini-3-pro-preview\"\ntemplate     = \"technical\"\n\n[profile.local]\nprovider     = \"ollama\"\nollama_model = \"llama3.2\"\n\n[profile.claude-cli]\nprovider         = \"claude-cli\"\nclaude_cli_model = \"claude-sonnet-4-6\"\n\n[profile.gemini-cli]\nprovider         = \"gemini-cli\"\ngemini_cli_model = \"gemini-2.5-flash\"\n\n[profile.codex-cli]\nprovider = \"codex-cli\"\n```\n\nActivate a profile by passing `--profile \u003cname\u003e` to any command:\n\n```bash\n# Quick review with the fast profile\nai-mr-comment --profile fast\n\n# Deep technical review with Anthropic Opus\nai-mr-comment --profile anthropic --title\n\n# Generate a changelog with Gemini Pro\nai-mr-comment changelog --profile gemini --commit=\"v1.2.0..HEAD\"\n\n# Commit with Ollama (no API key needed)\nai-mr-comment quick-commit --profile local --dry-run\n\n# Use Claude CLI session auth (no API key needed)\nai-mr-comment --profile claude-cli\n\n# Use Gemini CLI with Google OAuth (no API key needed)\nai-mr-comment --profile gemini-cli\n\n# Use Codex CLI\nai-mr-comment --profile codex-cli\n```\n\nRun `ai-mr-comment init-config` to generate a config file pre-populated with the standard profiles above.\n\n## CI/CD Usage\n\nThree flags are designed specifically for pipeline integration:\n\n### `--exit-code` — Gate merges on AI review\n\nInstruct the AI to output a `VERDICT: PASS` or `VERDICT: FAIL` line before its review. If FAIL, the process exits with code 2, failing your pipeline step.\n\n```bash\n# Fail the pipeline if the AI detects critical issues\nai-mr-comment --exit-code --pr \"$PR_URL\"\necho $?  # 0 = PASS, 2 = FAIL, 1 = tool error\n\n# JSON includes the verdict field for downstream processing\nai-mr-comment --exit-code --format json --pr \"$PR_URL\" | jq .verdict\n```\n\n**GitHub Actions example:**\n```yaml\n- name: AI Code Review\n  run: ai-mr-comment --exit-code --pr \"${{ github.event.pull_request.html_url }}\"\n  env:\n    OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}\n    GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n  # Step fails (exit 2) if AI detects critical issues\n```\n\n### `--post` — Auto-post comments to PRs/MRs\n\nAfter generating the comment, post it directly to the PR or MR via the GitHub/GitLab API. Uses the same token as diff fetching — no extra setup needed.\n\n```bash\n# Generate and post in one step\nai-mr-comment --pr \"$PR_URL\" --post\n\n# Combine with exit-code: review, post, and gate in one command\nai-mr-comment --exit-code --post --pr \"$PR_URL\"\n```\n\n**GitHub Actions example:**\n```yaml\n- name: AI Review \u0026 Comment\n  run: ai-mr-comment --post --pr \"${{ github.event.pull_request.html_url }}\"\n  env:\n    OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}\n    GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n```\n\n### `--output` with `--format json` — Save review artifacts\n\nWrite the full JSON review to a file. Useful for artifact upload, audit trails, or passing data between pipeline jobs.\n\n```bash\n# Write JSON to file\nai-mr-comment --format json --output review.json --pr \"$PR_URL\"\n\n# Upload as artifact (GitHub Actions)\n# - uses: actions/upload-artifact@v4\n#   with: { name: ai-review, path: review.json }\n\n# Read in a later job\ncat review.json | jq -r '.description'\ncat review.json | jq -r '.verdict'  # when --exit-code was used\n```\n\nWhen `--commit-msg` is set, `--output` writes the commit message (with a trailing newline) rather than JSON.\n\n## Streaming Output\n\nWhen running interactively (stdout is a TTY), the tool streams tokens directly to the terminal as the model generates them, so you see the comment appear word by word rather than waiting for the full response.\n\nStreaming is automatically disabled and the output is fully buffered when:\n\n- `--format json` is set (the full response is needed before encoding)\n- `--smart-chunk` is set (multi-stage summarise + synthesise calls)\n- `--output \u003cfile\u003e` is set (writing to a file)\n- stdout is not a TTY (piped output, CI, redirected to file)\n\nIf a streaming call fails mid-flight, the tool transparently falls back to a standard buffered request and outputs the full comment normally.\n\n## Token \u0026 Cost Estimation\n\nWhen running with the `--debug` flag, the tool provides a detailed breakdown of the expected usage:\n\n- **Gemini**: Uses official SDK token counting (100% accurate).\n- **OpenAI/Anthropic/Ollama**: Uses a conservative character-based heuristic (~3.5 chars per token).\n- **Cost**: Calculates estimated input cost in USD based on current model pricing (Ollama is free).\n\n## Development\n\n### Project Structure\n\n- `./`: Main Go source files (`main.go`, `api.go`, etc.)\n- `templates/`: Markdown prompt templates\n- `testdata/`: Sample git diffs for testing\n- `dist/`: Compiled binaries (after build)\n\n### Testing\n\n```bash\n# Run unit tests\nmake test\n\n# Run integration tests (requires GEMINI_API_KEY)\nmake test-integration\n\n# Run Ollama-only integration tests (CPU-friendly small model)\nOLLAMA_ENDPOINT=http://127.0.0.1:11434/api/generate \\\nOLLAMA_MODEL=llama3.2:1b \\\nmake test-integration-ollama\n\n# Run fuzz tests (30s per target)\nmake test-fuzz\n\n# Run response-quality evals on curated diff fixtures (promptfoo)\nmake eval-quality\n\n# Run writing-quality evals for commit messages + PR title/description\nmake eval-quality-writing\n\n# Install/update pinned eval dependencies only\nmake eval-quality-deps\n\n# Run linter\nmake lint\n```\n\nCI coverage on PRs includes fast unit/lint/fuzz checks.\nLong Ollama integration + promptfoo quality eval lanes run from a separate manual workflow: `Ollama Integration (Manual)`.\nOpen GitHub Actions, select that workflow, then click **Run workflow**.\n\n### Response Quality Evals\n\n`make eval-quality` runs end-to-end evals against fixture diffs in `evals/` and scores the generated review for recall, severity coverage, actionability, and false positives.\nIn CI, evals write a compact JSON report to `evals/promptfoo-results.json` and print a short summary.\nCI uses serialized eval calls and extended per-test timeout for CPU models (`PROMPTFOO_MAX_CONCURRENCY=1`, `PROMPTFOO_EVAL_TIMEOUT_MS=300000`).\n\nPrerequisites:\n- Node.js + `npm`\n- A reachable model provider (defaults to local Ollama)\n- Built binary (handled automatically by `make eval-quality`)\n- Pinned eval dependencies (including `promptfoo`) are installed from `evals/package-lock.json`\n\nUseful overrides:\n- `AMC_EVAL_PROVIDER` (default `ollama`)\n- `AMC_EVAL_MODEL` (default `llama3.2:1b`)\n- `AMC_EVAL_TEMPLATE` (default `technical`)\n- `AMC_EVAL_FLAGS` (additional CLI flags)\n\n```bash\n# Example: run evals against local Ollama 1B model\nAMC_EVAL_PROVIDER=ollama AMC_EVAL_MODEL=llama3.2:1b make eval-quality\n\n# Example: run commit + PR writing evals against local Ollama 8B model\nAMC_EVAL_PROVIDER=ollama AMC_EVAL_MODEL=llama3.1:8b AMC_EVAL_TEMPLATE=default make eval-quality-writing\n\n# Open the latest promptfoo report UI\nmake eval-quality-view\n```\n\n### Dependency Updates\n\nDependabot opens grouped PRs weekly (Monday) for Go modules, npm packages in `evals/`, and GitHub Actions.\n\nTo approve and auto-merge all open Dependabot PRs at once:\n\n```bash\ngh pr list --author \"app/dependabot\" --json number --jq '.[].number' | \\\n  xargs -I {} gh pr merge {} --auto --squash\n```\n\n\u003e `--auto` queues each PR to merge once all required status checks pass. Requires auto-merge to be enabled in the repo settings. Drop `--auto` and use `--squash` alone to merge immediately without waiting for CI.\n\n### Shell Completions\n\n```bash\n# Install bash completions\nmake install-completion-bash\n\n# Install zsh completions\nmake install-completion-zsh\n\n# Or generate manually for any shell\nai-mr-comment completion [bash|zsh|fish|powershell]\n```\n\n## Contributing\n\n### Commit Convention\n\nThis project uses [Conventional Commits](https://www.conventionalcommits.org/) to drive automatic semantic versioning. Every commit merged to `main` must follow the format:\n\n```\n\u003ctype\u003e[optional scope]: \u003cdescription\u003e\n```\n\n| Type | Description | Version bump |\n|---|---|---|\n| `fix:` | Bug fix | patch (`0.0.x`) |\n| `feat:` | New feature | minor (`0.x.0`) |\n| `feat!:` or `BREAKING CHANGE:` footer | Breaking change | major (`x.0.0`) |\n| `chore:`, `docs:`, `ci:`, `test:`, `refactor:`, `style:`, `perf:` | Non-functional | none |\n\n**Examples:**\n```\nfix: handle empty diff gracefully\nfeat: add clipboard output support\nfeat!: redesign config file format\nchore: update dependencies\n```\n\n### Release Process\n\nMerging to `main` automatically creates a version tag (e.g. `v0.2.0`) based on the commits since the last release — no GitHub Release is created yet.\n\nWhen ready to publish a release:\n1. Go to **GitHub → Releases → Draft a new release**\n2. Pick the pre-created tag from the dropdown\n3. Click **Publish release** — GoReleaser builds and attaches signed binaries automatically\n4. Release workflow dispatches the source tarball metadata to `pbsladek/homebrew-tap` for Homebrew validation/update automation\n\n## License\n\nMIT\n\n## Acknowledgements\n\nThis project is a Go rewrite of [mr-comment](https://github.com/RobertKozak/mr-comment) originally created by [Robert Kozak](https://github.com/RobertKozak).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpbsladek%2Fai-mr-comment","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpbsladek%2Fai-mr-comment","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpbsladek%2Fai-mr-comment/lists"}