git-courer

module
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 18, 2026 License: MIT

README

git-courer

Git operations for your AI coding assistant — local, private, free.

Release Build MIT License


Demo

https://github.com/user-attachments/assets/cb6f11a7-2972-469a-8bf0-f3d0c0ac1f90


git-courer is an MCP server that handles git operations locally so your AI coding assistant doesn't waste tokens on them.

Instead of Claude, Cursor, or Windsurf reading diffs and writing commit messages, they delegate to git-courer — which uses a local Ollama model to do it faster, for free, without sending your code anywhere.

Every time your AI would read a diff, write a commit, or create a branch, it burns tokens — usually 500–2,000 per operation, without you asking for it. git-courer intercepts those operations and runs them locally. Near-zero tokens spent on git.

Install

curl -fsSL https://gitcourer.sh | sh

That's it. It installs the binary and auto-configures every AI tool it detects on your machine.

Requirements: Git · Ollama (optional, for AI commit messages)

Manual install:

# macOS / Linux
curl -fsSL https://github.com/Alejandro-M-P/git-courer/releases/latest/download/git-courer-$(uname -s | tr '[:upper:]' '[:lower:]')-$(uname -m) -o /usr/local/bin/git-courer
chmod +x /usr/local/bin/git-courer
git-courer setup

# Windows (PowerShell)
irm https://github.com/Alejandro-M-P/git-courer/releases/latest/download/git-courer-windows-amd64.exe -o git-courer.exe
.\git-courer.exe setup

How it works

You: "commit my changes"
        ↓
AI delegates to git-courer (via MCP)
        ↓
git-courer: reads diff → checks for secrets → asks Ollama → commits
        ↓
"✓ feat: add user authentication"

Every commit runs through 5 security layers that catch API keys, passwords, and tokens before they're staged.

Releases combine two things: Go calculates the version from your commit types (feat: → minor, feat!: → major), and Ollama writes a human-readable changelog from those commits.

Supported tools

Tool Auto-configured
Claude Code
Cursor
Windsurf
OpenCode
Cline
VS Code
Claude Desktop
Continue

Run git-courer setup to configure all detected tools at once, or git-courer mcp cursor for a specific one.

Configuration

Run git-courer setup in your project — it creates .gcourer/config.yaml with sensible defaults.

See docs/config.md for all options.

Known limitations

Breaking change detection in commits requires a larger model (13b+). Small models (under ~7b) may write chore: remove X when feat!: remove X is correct. If your change is breaking, say it explicitly:

"commit this — it removes the /api/v1 endpoint, it's a breaking change"

See docs/models.md for a full comparison of tested models and their capabilities.

Contributing

Read CONTRIBUTING.md — covers setup, architecture, and how to run the tests (including integration tests with real Ollama).


FAQ

Do I need Ollama? No. git-courer works without it — commit messages will be generic. Install Ollama if you want AI-generated ones.

Is my code sent anywhere? No. Everything runs on your machine — git-courer, Ollama, your data.

Who decides the version number in a release? Go, not Ollama. Version is calculated from commit types (feat: → minor, feat!: → major). Ollama only writes the human changelog.

My tool isn't listed. Open an issue. If it supports MCP, adding it is usually a few lines.

How do I mark a breaking change? Use ! after the commit type (feat!:) or include BREAKING CHANGE: in the body. git-courer picks this up automatically for version bumping and changelog generation.

Directories

Path Synopsis
internal
adapters/confirm
Package confirm implements ports.Confirm using files on disk.
Package confirm implements ports.Confirm using files on disk.
adapters/llm
Package llm implements the LLM port using Ollama as the backend.
Package llm implements the LLM port using Ollama as the backend.
config
Package config loads and merges git-courer configuration.
Package config loads and merges git-courer configuration.
core/errors
Package domainerr provides domain-level error types and sentinel errors.
Package domainerr provides domain-level error types and sentinel errors.
core/ports
Package ports defines the interfaces (inward-facing) that the core depends on.
Package ports defines the interfaces (inward-facing) that the core depends on.
delivery/mcp
Package mcp provides the MCP server and tool handlers for git-courer.
Package mcp provides the MCP server and tool handlers for git-courer.
infra/chunkers
Package chunkers provides chunking strategies for various git outputs.
Package chunkers provides chunking strategies for various git outputs.
infra/logging
Package logging provides log rotation for git-courer.
Package logging provides log rotation for git-courer.
infra/secrets
Package secrets provides regex-based secret detection in files.
Package secrets provides regex-based secret detection in files.
installer
Package installer provides installation and management for git-courer.
Package installer provides installation and management for git-courer.
security
Package security implements multi-layer security checks before commits.
Package security implements multi-layer security checks before commits.
shared/prompts
Package prompts provides LLM prompt templates for git-courer operations.
Package prompts provides LLM prompt templates for git-courer operations.
workflow
CommitService orchestrates the commit workflow: status → LLM decides what to stage → security check → chunk diff → LLM messages → git commit(s).
CommitService orchestrates the commit workflow: status → LLM decides what to stage → security check → chunk diff → LLM messages → git commit(s).

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL