# 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. ## Install Save the content below to `.claude/skills/` or append to your `CLAUDE.md`: ## Quick Use ```bash # 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 ```bash 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 ```bash # 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: ```bash # 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](https://github.com/Nutlope). Licensed under MIT. > > [aicommits](https://github.com/Nutlope/aicommits) — ⭐ 3,000+ Thanks for eliminating "fix stuff" commits forever. --- ## 快速使用 ```bash npm install -g aicommit aicommit config set ANTHROPIC_API_KEY=sk-ant-... git add . aicommit # AI 自动生成: feat(auth): add JWT token refresh ``` --- ## 简介 AI Commit 是一个 CLI 工具,从暂存的 git 更改中自动生成有意义的 Conventional Commit 消息,GitHub 3,000+ stars。支持 Claude、GPT-4 和本地模型。一条命令生成完美的提交信息,告别 "fix stuff" 式提交。 --- ## 来源与感谢 > Created by [Nutlope](https://github.com/Nutlope). Licensed under MIT. > > [aicommits](https://github.com/Nutlope/aicommits) — ⭐ 3,000+ --- Source: https://tokrepo.com/en/workflows/158cf02b-635a-4bae-ac9d-fc93f684eec2 Author: Skill Factory