commit-ai-msg
v0.1.0
Published
AI-powered git commit message generator — Open Core
Maintainers
Readme
AI Commit Message
AI-powered git commit message generator — 让 AI 帮你写 commit message
为什么做这个?
写好 commit message 很重要,但没人愿意花时间写。AI Commit Message 从你的 git diff 自动生成清晰、规范的 commit message,让你专注于写代码。
参考框架: Open Core 模式(开源核心 + 付费高级功能),对标 opencommit、aicommits
特性
| 功能 | 免费版 | Pro 版 | |:---|:---:|:---:| | 生成 commit message | ✅ | ✅ | | 多 Provider 支持 | ✅ | ✅ | | 本地模型(Ollama) | ✅ | ✅ | | 自定义 prompt | ✅ | ✅ | | Conventional Commits | ✅ | ✅ | | 交互模式 | ✅ | ✅ | | 团队规范检查 | ❌ | ✅ | | 自动生成 PR 描述 | ❌ | ✅ | | 自动生成 Changelog | ❌ | ✅ | | Git 数据洞察 | ❌ | ✅ |
快速开始
安装
# 全局安装
npm install -g ai-commit-message
# 或者直接运行
npx ai-commit-message使用
# 在 git 仓库中运行
ai-commit
# 指定 Provider
ai-commit --provider deepseek
# 指定 commit 类型
ai-commit --type feat
# 只看 diff 不提交(dry-run)
ai-commit --dry-run
# 交互模式(确认/编辑后再提交)
ai-commit --interactive配置
# 设置 API Key
ai-commit config set DEEPSEEK_API_KEY your-key
# 设置默认 Provider
ai-commit config set provider deepseek
# 查看当前配置
ai-commit config list支持的 Provider
| Provider | 免费版 | Pro 版 | 配置 |
|:---|:---:|:---:|:---|
| DeepSeek | ✅ | ✅ | DEEPSEEK_API_KEY |
| OpenAI | ✅ | ✅ | OPENAI_API_KEY |
| Ollama(本地) | ✅ | ✅ | 无需 API Key |
| Claude | ❌ | ✅ | ANTHROPIC_API_KEY |
| Gemini | ❌ | ✅ | GEMINI_API_KEY |
开发
git clone https://github.com/2446573/ai-commit-message.git
cd ai-commit-message
npm install
npm run dev发布计划
- v0.1 — MVP:基础 commit message 生成,DeepSeek + Ollama 支持
- v0.2 — 交互模式,多 Provider 切换
- v0.3 — Conventional Commits 规范检查
- v1.0 — 稳定版,自定义 prompt
- v1.x — Pro 版:团队规范、PR 描述、Changelog
许可证
MIT License — 随便用,署名就行
相关项目
- opencommit — 同类项目,MIT,7k stars
- aicommits — 同类项目,MIT,5k stars
