Write better Git commits, faster
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.2.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.2-py3-none-any.whl
(12.0 kB
view details)
File details
Details for the file git_gcm-2.0.2.tar.gz.
File metadata
- Download URL: git_gcm-2.0.2.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 |
f77badb9ce2ce6ae5158cf1d18a468c0bfad2707c93b483ae503ac388a9cc0df
|
|
| MD5 |
384becb2ddd68582cfb3341ddff8af8f
|
|
| BLAKE2b-256 |
4ec0ab2a2ded4a99f7e42a03f8c3509a44c24b50d7ea00f30e28ef47308136e9
|
File details
Details for the file git_gcm-2.0.2-py3-none-any.whl.
File metadata
- Download URL: git_gcm-2.0.2-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 |
cc9438e37bb4c226806806f333e43070cd37a82f153794eda77b5cc75520bfc9
|
|
| MD5 |
ac046b915675e8b2e52d497798f9296d
|
|
| BLAKE2b-256 |
dc7164fb1989eef7b629dadb0d1d7f5cb4b046d0b83cbd3135cb97baa95b64c6
|