Current collected state Current
Observed since 21 Oct, 10:14 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
ai-commit-helper
AI-powered Git commit message generator
基于AI的Git提交信息生成工具,帮助开发者自动生成专业、规范的提交信息。
# 从PyPI安装
pip install ai-commit-helper
# 或从源码安装
git clone https://github.com/fscyc/ai-commit-helper.git
cd ai-commit-helper
pip install -e .
# 生成当前暂存区的提交信息
aicommit
# 生成指定文件的提交信息
aicommit --file path/to/file.py
# 使用中文格式
aicommit --format zh
# 使用emoji风格
aicommit --format emoji
# 批量生成多个提交信息
aicommit --batch 5
访问:https://ai-commit-helper.fscyc.github.io
ai-commit-helper/
├── src/ # 核心Python代码
├── web/ # Web界面代码
├── vscode-extension/ # VS Code扩展
├── tests/ # 单元测试和集成测试
├── docs/ # 文档
├── examples/ # 使用示例
├── configs/ # 配置文件
└── scripts/ # 构建和部署脚本
# 克隆仓库
git clone https://github.com/fscyc/ai-commit-helper.git
cd ai-commit-helper
# 创建虚拟环境
python -m venv venv
source venv/bin/activate # Linux/Mac
# 或
venv\Scripts\activate # Windows
# 安装开发依赖
pip install -r requirements-dev.txt
pytest tests/
创建配置文件 ~/.aicommit/config.yaml:
# DeepSeek API配置
deepseek:
api_key: "your-api-key"
model: "deepseek-chat"
base_url: "https://api.deepseek.com"
# 生成选项
generation:
default_format: "conventional"
max_length: 100
temperature: 0.7
include_emoji: true
# 模板配置
templates:
conventional: |
{{type}}({{scope}}): {{description}}
{{body}}
{{footer}}
zh: |
{{type}}({{scope}}): {{description}}
{{body}}
from ai_commit_helper import generate_commit_message
# 生成提交信息
result = generate_commit_message(
code_diff="...git diff output...",
format="conventional",
history=None
)
print(result.message)
启动本地服务器:
aicommit serve --port 8000
API端点:
POST /generate - 生成提交信息GET /formats - 获取支持的格式列表POST /batch - 批量生成欢迎贡献代码、报告问题或提出建议!
git checkout -b feature/amazing-feature)git commit -m 'Add some amazing feature')git push origin feature/amazing-feature)本项目采用 MIT 许可证 - 查看 LICENSE 文件了解详情。
如果这个工具对你有帮助,请考虑赞助支持:
Download counts and popularity will appear here as the collector receives them.
| Package / target | Requirement | Relationship |
|---|---|---|
requestsEnvironment{
"extras": "",
"marker": null,
"requires_python": ">=3.7",
"evaluation": "NOT_EVALUATED"
} | requests>=2.28.0 | runtime |
PyYAMLEnvironment{
"extras": "",
"marker": null,
"requires_python": ">=3.7",
"evaluation": "NOT_EVALUATED"
} | PyYAML>=6.0 | runtime |
fastapiEnvironment{
"extras": "",
"marker": "extra == \"web\"",
"requires_python": ">=3.7",
"evaluation": "NOT_EVALUATED"
} | fastapi>=0.104.0; extra == "web" | runtime |
uvicornEnvironment{
"extras": "standard",
"marker": "extra == \"web\"",
"requires_python": ">=3.7",
"evaluation": "NOT_EVALUATED"
} | uvicorn[standard]>=0.24.0; extra == "web" | runtime |
pydanticEnvironment{
"extras": "",
"marker": "extra == \"web\"",
"requires_python": ">=3.7",
"evaluation": "NOT_EVALUATED"
} | pydantic>=2.0.0; extra == "web" | runtime |
pytestEnvironment{
"extras": "",
"marker": "extra == \"dev\"",
"requires_python": ">=3.7",
"evaluation": "NOT_EVALUATED"
} | pytest>=7.0.0; extra == "dev" | runtime |
pytest-covEnvironment{
"extras": "",
"marker": "extra == \"dev\"",
"requires_python": ">=3.7",
"evaluation": "NOT_EVALUATED"
} | pytest-cov>=4.0.0; extra == "dev" | runtime |
blackEnvironment{
"extras": "",
"marker": "extra == \"dev\"",
"requires_python": ">=3.7",
"evaluation": "NOT_EVALUATED"
} | black>=23.0.0; extra == "dev" | runtime |
flake8Environment{
"extras": "",
"marker": "extra == \"dev\"",
"requires_python": ">=3.7",
"evaluation": "NOT_EVALUATED"
} | flake8>=6.0.0; extra == "dev" | runtime |
mypyEnvironment{
"extras": "",
"marker": "extra == \"dev\"",
"requires_python": ">=3.7",
"evaluation": "NOT_EVALUATED"
} | mypy>=1.0.0; extra == "dev" | runtime |
twineEnvironment{
"extras": "",
"marker": "extra == \"dev\"",
"requires_python": ">=3.7",
"evaluation": "NOT_EVALUATED"
} | twine>=4.0.0; extra == "dev" | runtime |
buildEnvironment{
"extras": "",
"marker": "extra == \"dev\"",
"requires_python": ">=3.7",
"evaluation": "NOT_EVALUATED"
} | build>=1.0.0; extra == "dev" | runtime |
coloramaEnvironment{
"extras": "",
"marker": "extra == \"color\"",
"requires_python": ">=3.7",
"evaluation": "NOT_EVALUATED"
} | colorama>=0.4.0; extra == "color" | runtime |
bdist_wheel · 18.55 KB · Python py3
sdist · 20.21 KB · Python source
Observed since 21 Oct, 10:14 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package_version:425b42bfc384bf02d93430a6f79c2ea75facbae43bc08b02eacdbcc90f40a700