SkillsApr 6, 2026·2 min read

AI Commit — Auto-Generate Git Commits with AI

CLI tool that generates conventional commit messages from your staged changes using AI. Supports Claude, GPT-4, and local models. One command for perfect commit messages. 3,000+ stars.

SK
Skill Factory · Community
Quick Use

Use it first, then decide how deep to go

This block should tell both the user and the agent what to copy, install, and apply first.

# Install
npm install -g aicommit

# Configure (one-time)
aicommit config set ANTHROPIC_API_KEY=sk-ant-...

# Stage your changes, then:
aicommit
# AI analyzes the diff and generates:
# feat(auth): add JWT token refresh with sliding window expiry

Intro

AI Commit is a CLI tool that automatically generates meaningful, conventional commit messages from your staged git changes using AI with 3,000+ GitHub stars. Instead of writing "fix stuff" or spending time crafting the perfect message, stage your changes and run aicommit — it reads the diff, understands the intent, and produces a conventional commit message. Supports Claude, GPT-4, Gemini, and local models via Ollama. Best for developers who want consistent, descriptive commit history without the mental overhead. Works with: any git repository. Setup time: under 1 minute.


Features

Smart Diff Analysis

AI Commit reads your staged diff and understands:

  • What changed (added function, fixed bug, refactored code)
  • Why it changed (intent from code context)
  • Conventional commit type (feat, fix, refactor, docs, test, chore)

Multiple Suggestions

aicommit --num 3
# 1. feat(auth): add JWT refresh token rotation
# 2. feat(auth): implement sliding window token expiry
# 3. feat(security): add automatic JWT token refresh mechanism
# Choose [1-3]:

Conventional Commits Format

Always generates properly formatted messages:

type(scope): description

[optional body]

Model Configuration

# Use Claude
aicommit config set provider=anthropic model=claude-sonnet-4-20250514

# Use GPT-4
aicommit config set provider=openai model=gpt-4o

# Use local model
aicommit config set provider=ollama model=llama3.1

Git Hook Integration

Auto-generate on every commit:

# Install as prepare-commit-msg hook
aicommit hook install

# Now every `git commit` auto-generates a message
git add .
git commit  # AI message pre-filled, edit if needed

Key Stats

  • 3,000+ GitHub stars
  • Conventional Commits format
  • 5+ model providers supported
  • Git hook integration
  • Multi-suggestion mode

FAQ

Q: What is AI Commit? A: AI Commit is a CLI tool that reads your staged git diff and generates meaningful conventional commit messages using AI, saving time and improving commit history quality.

Q: Is AI Commit free? A: The tool is open-source under MIT. You need an LLM API key (or use free local models via Ollama).

Q: Does AI Commit see my entire codebase? A: No, it only reads the staged diff — the specific lines you changed. Your full codebase is never sent to the AI.


🙏

Source & Thanks

Created by Nutlope. Licensed under MIT.

aicommits — ⭐ 3,000+

Thanks for eliminating "fix stuff" commits forever.

Discussion

Sign in to join the discussion.
No comments yet. Be the first to share your thoughts.

Related Assets