Git Commit Message Generator with AI
A CLI tool that generates commit messages using AI models based on your git repository changes.
Features
- 🤖 Wide Model Support:
- OpenAI
- Anthropic
- DeepSeek
- Aliyun
- iFlytek
- Zhipu
- Baidu
- Moonshot
- Tencent
- ByteDance
- Replicate
- Together AI
- 🔧 Custom API base
- 🔧 Custom Model Integration
- 📝 Conventional Commits Format
- 🎯 Customizable Prompt Templates
- 🔑 Secure Configuration Management
Installation
Using pipx (Recommended)
# Install pipx if you haven't
brew install pipx
pipx ensurepath
# Install aimsg
pipx install aimsg
# Upgrade aimsg
pipx upgrade aimsg
Using pip
pip install aimsg
Quick Start
- Initialize with your preferred model and API key:
aimsg init
- Stage your changes and generate commit message:
git add .
aimsg commit
- Get help or version information:
# Show version
aimsg --version
# Show all available commands
aimsg --help
# Show help for a specific command
aimsg model --help
aimsg commit --help
# Show current configuration
aimsg current
Configuration
Configure aimsg in order of priority:
- Project-level
.envfile (highest priority)
AIMSG_API_KEY=your_api_key
AIMSG_API_BASE=your_api_base
AIMSG_MODEL=your_model
AIMSG_PROMPT=your_prompt
- Environment variables(Secondary priority)
export AIMSG_API_KEY=your_api_key
export AIMSG_API_BASE=your_api_base
export AIMSG_MODEL=your_model
export AIMSG_PROMPT=your_prompt
- Global configuration via
aimsg init(lowest priority, default)
aimsg init
# Creates ~/.config/aimsg/config.json with default settings:
# - model: your_model
# - api_base: your_api_base
# - api_key: your_api_key
# - prompt: default prompt template
# - custom_models: custom model list
Model Management
# List available models
aimsg model list
# Add custom model
aimsg model add my-model https://api.example.com/v1
# Remove custom model
aimsg model remove my-model
Prompt Management
# Customize commit message prompt template
aimsg prompt
# Reset to default prompt template
aimsg reset-prompt
Default prompt template:
Based on the following git diff, generate a concise and descriptive commit message that follows conventional commits format.
Focus on the "what" and "why" of the changes.
Start with a type (feat, fix, docs, style, refactor, perf, test, build, ci, chore).
Do not include scope.
Limit the first line to 72 characters.
Add a blank line followed by a more detailed description if necessary.
The default prompt template guides the AI to:
- Follow conventional commits format
- Focus on the "what" and "why" of changes
- Keep the first line under 72 characters
- Add detailed description when necessary
Default API Providers
- OpenAI:
https://api.openai.com/v1 - Anthropic:
https://api.anthropic.com/v1 - Google:
https://generativelanguage.googleapis.com/v1 - DeepSeek:
https://api.deepseek.com/v1 - Aliyun:
https://dashscope.aliyuncs.com/api/v1 - iFlytek:
https://spark-api.xf-yun.com/v3.1 - Zhipu:
https://open.bigmodel.cn/api/v1 - Baidu:
https://aip.baidubce.com/rpc/2.0/ai_custom/v1/wenxinworkshop - Moonshot:
https://api.moonshot.cn/v1 - Tencent:
https://hunyuan.cloud.tencent.com/hyllm/v1 - ByteDance:
https://api.doubao.com/v1 - Replicate:
https://api.replicate.com/v1 - Together AI:
https://api.together.xyz/v1
License
MIT
Metadata
Release files for aimsg 0.2.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| aimsg-0.2.3.tar.gz | 13.6 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| aimsg-0.2.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 27.6 kB
Release files / aimsg-0.2.3.tar.gz
| Download URL | aimsg-0.2.3.tar.gz |
|---|---|
| Size | 13.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f590da8339060d5911b989fb579c051d87453b8ebd365ebf28505e729cfc759d
|
|
BLAKE2b-256 checksum How to use checksums |
6f013b65f85f02c24702f9d567ea8a26b740c094d2eead1e25b215c92ec317a3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Release files / aimsg-0.2.3-py3-none-any.whl
| Download URL | aimsg-0.2.3-py3-none-any.whl |
|---|---|
| Size | 13.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
de3f05b029d94221acdd52b5c4b94586c6fbb3e74be15cee92e43a2a34af771a
|
|
BLAKE2b-256 checksum How to use checksums |
1f63a998a7c4f8255dcb4c75133a625279b2390367557b3ca0b123dccadcdbb5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Security for aimsg 0.2.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.