AI-powered conventional commit message generator
Project description
⚡ Git Pulse
AI-powered conventional commit messages, right from your terminal.
Stop struggling with commit messages. Git Pulse reads your staged changes, asks your favorite AI model, and generates a perfect Conventional Commit message – ready to use.
✨ Features
- 🧠 Uses AI to understand your code diff and craft meaningful messages
- 📐 Strict Conventional Commits format (
feat(scope): description) - 🔒 Title never exceeds 72 characters
- 🎮 Interactive (confirm/edit/abort) or fully automatic mode
- 🪝 One-command hook installation (
git pulse init) - 🔌 Pluggable providers: OpenCode, OpenAI, Ollama (more soon)
- 🐍 Tiny dependency: only
requests– Python 3.8+
🚀 Quickstart
1. Install
pip install gitpulse
2. Configure your AI provider
By default, Git Pulse uses OpenCode (local or remote). Set the environment variables:
export OPENCODE_API_URL="http://localhost:8080/v1/chat/completions"
export OPENCODE_API_KEY="your-key-here"
If you prefer OpenAI:
export OPENAI_API_KEY="sk-..."
Or Ollama:
export OLLAMA_API_URL="http://localhost:11434/api/generate"
3. Make some changes and stage them
git add .
4. Let Git Pulse generate your commit message
git pulse
You'll see a generated message like feat(auth): add JWT token validation.
Confirm, edit, or abort – it's that simple.
For fully automated pipelines:
git pulse --auto
📦 Usage
git pulse [options] # generate a commit message
git pulse init # install the prepare-commit-msg hook
Options for git pulse
| Flag | Description |
|---|---|
--auto |
Automatically commit without confirmation |
--provider |
AI provider: opencode (default), openai, ollama |
--model |
Model name (e.g., gpt-4o-mini) |
--api-url |
Override API base URL |
--api-key |
Override API key |
--output |
Write message to a file (used internally by the hook) |
Git Hook
After running git pulse init, every time you run git commit, the hook will:
- Check for staged changes
- Generate a conventional commit message automatically
- Open your editor with the message pre-filled (or commit directly if
--autowas set).
🔧 Supported AI Providers
| Provider | Default Model | Env Vars |
|---|---|---|
| OpenCode | opencode |
OPENCODE_API_URL, OPENCODE_API_KEY |
| OpenAI | gpt-4o-mini |
OPENAI_API_KEY |
| Ollama | llama3 |
OLLAMA_API_URL |
You can pass --provider, --model, --api-url, and --api-key at runtime to override defaults.
🤖 How It Works
- Extracts the
git diff --cachedoutput - Sends it together with a carefully engineered system prompt to the AI endpoint
- Parses the response, strips any formatting, truncates to 72 characters
- If in interactive mode, lets you review and edit; if automatic, commits immediately
The system prompt is designed to produce only the commit message, nothing else.
🛠 Development
Clone the repo and install in editable mode:
git clone https://github.com/erico964-blip/gitpulse
cd gitpulse
pip install -e .
Run tests (coming soon):
pytest
📜 License
MIT © erico964-blip
⭐ Star the repo — If Git Pulse saves you from a few minutes of commit-message anguish, give it a star on GitHub!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
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
File details
Details for the file gitpulse_commit-0.1.0.tar.gz.
File metadata
- Download URL: gitpulse_commit-0.1.0.tar.gz
- Upload date:
- Size: 10.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
712146277913cc0b55b0d43b19ba8a01a3a058249add9ce5e6c5a44896fa5500
|
|
| MD5 |
56ae79e3717fec9256a53b8fa96b9460
|
|
| BLAKE2b-256 |
4179e23d51682260d4bbc76c3810f936c9d88880cd52dd2a755d69f49283adab
|
File details
Details for the file gitpulse_commit-0.1.0-py3-none-any.whl.
File metadata
- Download URL: gitpulse_commit-0.1.0-py3-none-any.whl
- Upload date:
- Size: 10.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
38e401af31d82759a886eb70f5aac2ece3377c3f4cca310d24f8b9769a42a17f
|
|
| MD5 |
a02967edab7d05ccddca26d3138e3a81
|
|
| BLAKE2b-256 |
0bd793394b66cfd97f5aa089bb736bf4717ae470f349a7077367f6db2205e340
|