Write Git commits the smart way.
Project description
GCM
基于大模型的 Git Commit Message 生成,支持所有 OpenAI 协议兼容的服务。
安装
# Mac 用户先装 pipx
brew install pipx && pipx ensurepath
pipx install git-gcm
升级:pipx upgrade git-gcm
配置
export GCM_API_URL=https://api.openai.com/v1
export GCM_API_KEY=your-api-key
export GCM_MODEL=gpt-4o-mini
持久化写入 ~/.zshrc / ~/.bashrc 后 source 一下。
使用
git add .
gcm # 生成 commit message 并进入交互菜单
gcm -v # 详细模式
gcm -f # 跳过 git hooks(等价 --no-verify)
gcm --print-only # 仅输出,不提交
生成后进入交互菜单(↑↓ 选择,Enter 确认):
- 提交 — 直接
git commit - 编辑 — 微调 message,Alt/⌥+Enter 保存
- 仅输出 — 只打印不提交
非交互终端(如
gcm | cat)自动跳过菜单,直接输出。
示例
精简模式:
feat(auth): 添加用户登录功能
详细模式(-v):
feat(auth): 添加用户登录功能
- 实现 JWT token 认证
- 添加登录表单验证
- 集成第三方 OAuth 登录
MIT License
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
git_gcm-2.0.1.tar.gz
(11.0 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
git_gcm-2.0.1-py3-none-any.whl
(12.0 kB
view details)
File details
Details for the file git_gcm-2.0.1.tar.gz.
File metadata
- Download URL: git_gcm-2.0.1.tar.gz
- Upload date:
- Size: 11.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b3f68464d92176775fb6bfffe4ee1ca87288dfbcb848d9f42c35530eb02f2f5e
|
|
| MD5 |
ce7660283b6e215b7c4f67976d63d066
|
|
| BLAKE2b-256 |
550a1ad8043c0c76e3860e08eae53b14a09348f2298a1ba888a44b2fe90266f1
|
File details
Details for the file git_gcm-2.0.1-py3-none-any.whl.
File metadata
- Download URL: git_gcm-2.0.1-py3-none-any.whl
- Upload date:
- Size: 12.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
100b21e2446525b551e9df5afbee218cc9a3d430aca15e481e3076af2be0abca
|
|
| MD5 |
2262b41cd3e4a01e89fb5d0e9ec887d4
|
|
| BLAKE2b-256 |
177382568a0ffe5645259e57e37486f311a346522d2cc7f04973096fcf68ef79
|