Metadata-Version: 2.4
Name: commitai-cli
Version: 0.1.0
Summary: Local AI-powered git commit message generator using Ollama
Author-email: Ion Alexandru Cosa <icosa9@gmail.com>
License-Expression: MIT
Keywords: git,commit,ollama,ai,cli
Classifier: Programming Language :: Python :: 3
Classifier: Environment :: Console
Classifier: Topic :: Software Development :: Version Control :: Git
Requires-Python: >=3.12
Description-Content-Type: text/markdown
Requires-Dist: httpx

# commitai

Local AI-powered git commit message generator using [Ollama](https://ollama.com). Zero API cost, fully local.

## Requirements

- Python 3.12+
- [Ollama](https://ollama.com) running locally with a model pulled (e.g. `llama3.2:3b`)

## Installation

```bash
pip install commitai
```

## Usage

```bash
# Stage your changes first
git add .

# Generate commit message → confirm → commit
commit

# Generate commit message → confirm → commit → push
commit /deploy
```

At the prompt you can:
- `Y` or Enter — accept and commit
- `n` — abort
- `e` — open your `$EDITOR` to edit the message before committing

## Configuration

Create a `.commitrc` file in your repo root to override defaults:

```toml
model = "llama3.2:3b"
style = "conventional"
protected_branches = ["main", "master"]
```

## How it works

1. Reads your staged diff (`git diff --cached`)
2. Strips binary files and scans for secrets
3. Sends the diff to your local Ollama instance
4. Returns a [Conventional Commits](https://www.conventionalcommits.org/) message
