ai-conventional-commit-cli

👋 Introduction

AI-assisted, style-aware Conventional Commit generator and splitter — an opinionated CLI that learns your repo's commit style and produces polished single or multi-commits safely, quickly, and repeatably.

ai-conventional-commit-cli is an opinionated, style-aware AI assistant for crafting and splitting git commits. It reads your staged diff, learns your repository's commit style from recent history, and produces Conventional Commits-compliant messages — one polished commit, or a cleanly split series.

Provider-agnostic: route through any OpenCode-supported model, use the Claude CLI with no API key, or call the Anthropic SDK directly with your own key.

✨ Features

  • AI-generated conventional commits — reads your staged diff and produces a Conventional Commits-compliant message in one command.
  • Smart commit splitting — clusters hunks semantically and proposes multiple atomic commits, each selectively staged and executed.
  • Gitmoji style supportstandard, gitmoji (emoji + type), and gitmoji-pure (emoji only) modes out of the box.
  • Refine & reword — iteratively reshape the last commit's wording or reword any past commit using natural-language instructions.
  • Plugin system — register custom transform and validate hooks to enforce team conventions or post-process candidates.
  • Privacy-aware diff filtering — three tiers (low / medium / high) control exactly how much code is sent to the model.

📦 Install

npm install -g @kud/ai-conventional-commit-cli

Optional shell alias for convenience:

alias aicc='ai-conventional-commit'

🚀 Quick Start

Generate a commit from staged changes:

git add .
ai-conventional-commit
# ✔ feat(api): add pagination metadata to list endpoint

Propose and execute multiple commits:

ai-conventional-commit split
# 1. refactor(parser): simplify token scanning
# 2. feat(parser): support negated glob segments
# 3. test(parser): add cases for brace + extglob combos

Head to Getting Started for the full command and flag reference.

On this page