Skip to main content

GitSage

logo

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

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

Create your virtual environnent (if using pip)

$> python3 -m venv .venv
Use your virtual environnement
$> source .venv/bin/activate

Install GitSage

with pip :

(.venv) $> pip install gitsage-local

with pipx :

$> pipx install gitsage-local

Usage

$> 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 :

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"
exclude = ["*.lock", "package-lock.json", "pnpm-lock.yaml", "*.min.js", "*.min.css", "*.map"]

exclude lists glob patterns of files left out of the diff sent to the model (matched at any depth), which keeps lockfiles and generated files from filling the context. If the key is missing, the default list above is used.

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

Metadata

Release files for gitsage-local 1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gitsage-local 1.0
File Size Uploaded
gitsage_local-1.0.tar.gz 5.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for gitsage-local 1.0
File Interpreter ABI Platform
gitsage_local-1.0-py3-none-any.whl Python 3 none any Details

Total release size: 11.2 kB

Release files / gitsage_local-1.0.tar.gz

Download URL gitsage_local-1.0.tar.gz
Size 5.1 kB
Tags Source
SHA-256 checksum
How to use checksums
12617ad1c039a4d8131873f2eafea7c7dd51580fcf4a33b086ffebf6ea932189
BLAKE2b-256 checksum
How to use checksums
11cc3afb6184c559c3c946a9102c841d4c8fed70a9144f1bd12fb6cbd83544b9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Release files / gitsage_local-1.0-py3-none-any.whl

Download URL gitsage_local-1.0-py3-none-any.whl
Size 6.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6a6493d17f7ba4653d05a26669fb1f6c935f7100cf65655a587e6f0ecc2053fe
BLAKE2b-256 checksum
How to use checksums
fbcc6ebb50e25a064509be64c33ee6482556de169a10d3a7bb7e57d6aeb537b4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Release history Release notifications | RSS feed

This release

1.0 This release

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page