Skip to main content

gitme-ai

AI-powered git commit message generator. Reads your staged changes and generates a well-formatted Conventional Commits message using a local or cloud LLM.

Local-first and privacy-friendly by default — your diffs never leave your machine unless you choose a cloud provider.


Requirements

  • Python 3.11 or higher
  • Git

Installation

pip install gitme-ai

Quick Start

Stage your changes as you normally would, then run gitme:

git add .
gitme

That's it. gitme reads your staged diff, sends it to the AI, and prints a suggested commit message in your terminal.

By default it uses Ollama with gemma3n:e4b running locally. See Providers below to set up Ollama or switch to a cloud provider.


Usage

Basic

gitme

Copy to clipboard

gitme --copy

The message is printed to the terminal and copied to your clipboard. You can then paste it directly into git commit -m "...".

Add extra context

gitme --context "this is a hotfix for the login bug in production"

The context is appended to the prompt so the model has more information to work with. Useful when the diff alone doesn't tell the full story.


Providers

gitme supports three providers. You set your preferred one once and it applies to every future run.

Ollama (default — local, free, private)

Ollama runs models on your own machine. No API key needed, no data leaves your computer.

1. Install Ollama

Download from ollama.com and open the app. You'll see it in your menu bar when it's running.

2. Pull the model

ollama pull gemma3n:e4b

3. Run gitme

gitme

Ollama is already the default — nothing else to configure.

To use a different Ollama model:

gitme-config set model mistral

OpenAI (cloud, best quality)

Uses the OpenAI API. You need an API key and credit — gpt-4o-mini is cheap and works well for commit messages.

1. Set your API key

gitme-config set openai_api_key YOUR_API_KEY
gitme-config set provider openai
gitme-config set model gpt-4o-mini

2. Run gitme

gitme

Your API key is stored locally in ~/.gitme.toml and never shared.


OpenRouter (cloud, free tier available)

OpenRouter provides access to many models including free ones. No credit card required for the free tier.

Get a free API key at openrouter.ai.

1. Set your API key

gitme-config set openrouter_api_key YOUR_API_KEY
gitme-config set provider openrouter
gitme-config set model "nvidia/nemotron-3-nano-30b-a3b:free"

2. Run gitme

gitme

Configuration

Configuration is stored in ~/.gitme.toml and shared across all your projects.

View current config

gitme-config show

Output:

provider: ollama
model: gemma3n:e4b
style: conventional

Set a value

gitme-config set <key> <value>

Available keys:

Key Description Default
provider Which provider to use: ollama, openai, or openrouter ollama
model Model name for the active provider gemma3n:e4b
style Commit style (currently conventional) conventional
openai_api_key Your OpenAI API key —
openrouter_api_key Your OpenRouter API key —

Examples

# Switch to OpenAI
gitme-config set provider openai
gitme-config set model gpt-4o-mini
gitme-config set openai_api_key sk-...

# Switch back to Ollama
gitme-config set provider ollama
gitme-config set model gemma3n:e4b

Commit Format

gitme follows the Conventional Commits specification:

type(scope): short description

- optional body explaining why the change was made

Fixes #123  (optional footer)

Commit types:

Type When to use
feat New feature or capability
fix Bug fix
refactor Code restructured without changing behaviour
docs Documentation changes only
style Formatting or whitespace, no logic changes
test Adding or updating tests
chore Maintenance, config changes, dependency updates

License

MIT

Metadata

Release files for gitme-ai 0.1.3

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

Source distribution (sdist)

Source distribution for gitme-ai 0.1.3
File Size Uploaded
gitme_ai-0.1.3.tar.gz 9.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for gitme-ai 0.1.3
File Interpreter ABI Platform
gitme_ai-0.1.3-py3-none-any.whl Python 3 none any Details

Total release size: 19.9 kB

Release files / gitme_ai-0.1.3.tar.gz

Download URL gitme_ai-0.1.3.tar.gz
Size 9.5 kB
Tags Source
SHA-256 checksum
How to use checksums
c68c00b8b226b982270f787279eda767aaffb24c3268dcc2ff2af746f04a042f
BLAKE2b-256 checksum
How to use checksums
68bb71575f548048155669d5701a96077ae523fc6a75db5c764c36013a643264
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.2

Release files / gitme_ai-0.1.3-py3-none-any.whl

Download URL gitme_ai-0.1.3-py3-none-any.whl
Size 10.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0f6cb752dbfa2514021d6d127fcfa8e62935bfea57615bc2f238a068f8e654fc
BLAKE2b-256 checksum
How to use checksums
a6d4f6666fb3aa1af6a7cc91df40ac697ff523383275eecaf786b7d7ad753c47
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.2

Release history Release notifications | RSS feed

This release

0.1.3 This release

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

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