Metadata-Version: 2.4
Name: gitsage-local
Version: 0.1.6
Summary: Local LLM powered Git commit generator
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: requests
Requires-Dist: pyperclip
Requires-Dist: toml
Dynamic: license-file

# GitSage
![logo](ressources/logo.png)

Local AI powered commit generator based on ur repository local change.

## Installation

### Prerequirements

    - Python>=3.10
    - Python3-pip or pipx
    - Python3-venv (optional if using pipx)
    - Ollama
    - utilitaire de commande pour gérer le presse-papier (ex: wl_clipboard, xclip, pbcopy, clip, etc..)

#### Start Ollama

```bash
$> ollama pull qwen3:8b (or the model of your choice)
```

#### Create your virtual environnent (if using pip)

```bash
$> python3 -m venv .venv
```

##### Use your virtual environnement

```bash
$> source .venv/bin/activate
```

### Install GitSage

#### with pip :

```bash
(.venv) $> pip install gitsage-local
```

#### with pipx :

```bash
$> pipx install gitsage-local
```

## Usage

```bash
$> gitsage <command> <options>
```

### Commands

    help                   Show this help message
    commit                 Generate a commit message based on the staged changes
    version/-v/--version   Show the version of GitSage

### Options

    --copy            Copy the output to the clipboard

## Configuration

The default configuration file is located at `~/.config/gitsage/config.toml`. If the file does not exist, it will be created with default values when you run the tool for the first time.

### Default Configuration :

```toml
model = "qwen3:8b"
prompt = """You generate Git commit messages.

Analyze the following staged git diff.

Return ONLY a single Conventional Commit message.
Format:
type(scope): description

Rules:
- Use feat, fix, refactor, docs, test, chore, or perf
- Keep the description concise
- Use imperative mood
- Do not invent changes
- Do not include markdown

"""
ollama_url = "http://localhost:11434"
```

You can modify the `model`, `prompt`, and `ollama_url` values in the configuration file to customize the behavior of GitSage according to your needs.
