72 lines
1.4 KiB
Markdown
72 lines
1.4 KiB
Markdown
# git-commit-ai
|
|
|
|
A privacy-first CLI tool that generates intelligent Git commit message suggestions using local LLM (Ollama), supporting conventional commit formats without external API costs.
|
|
|
|
## Features
|
|
|
|
- Generate intelligent commit message suggestions from staged changes
|
|
- Support for Conventional Commits format
|
|
- Multi-language analysis
|
|
- Privacy-first (no external APIs, runs entirely locally)
|
|
- Customizable prompts and configurations
|
|
- Context-aware suggestions using commit history
|
|
|
|
## Installation
|
|
|
|
```bash
|
|
pip install git-commit-ai
|
|
```
|
|
|
|
## Quick Start
|
|
|
|
1. Ensure [Ollama](https://ollama.ai) is installed and running
|
|
2. Pull a model (recommended: qwen2.5-coder:3b):
|
|
```bash
|
|
ollama pull qwen2.5-coder:3b
|
|
```
|
|
3. Stage your changes:
|
|
```bash
|
|
git add .
|
|
```
|
|
4. Generate a commit message:
|
|
```bash
|
|
git-commit-ai generate
|
|
```
|
|
|
|
## Usage
|
|
|
|
### Basic Usage
|
|
|
|
```bash
|
|
git-commit-ai generate
|
|
```
|
|
|
|
### With Conventional Commits
|
|
|
|
```bash
|
|
git-commit-ai generate --conventional
|
|
```
|
|
|
|
### Specify Model
|
|
|
|
```bash
|
|
git-commit-ai generate --model llama3.2
|
|
```
|
|
|
|
## Configuration
|
|
|
|
Create a `.git-commit-ai/config.yaml` file in your repository:
|
|
|
|
```yaml
|
|
model: qwen2.5-coder:3b
|
|
base_url: http://localhost:11434
|
|
conventional: true
|
|
max_length: 80
|
|
```
|
|
|
|
## Troubleshooting
|
|
|
|
- Ensure Ollama is running: `ollama list`
|
|
- Check model is available: `ollama pull <model>`
|
|
- Verify git repository has staged changes
|