Generate Conventional Commit messages & changelogs from git diffs using local Gemma
Project description
git-to-doc ⚡
Turn any git diff into a Conventional Commit message, changelog, and plain-English PR summary — powered by Gemma running locally via Ollama.
Install
pip install git-to-doc
Requires: Ollama running locally with a Gemma model pulled:
ollama pull gemma4
Usage
# From a GitHub PR URL
git-to-doc https://github.com/pallets/flask/pull/5000
# From a local .diff file
git-to-doc sample.diff
# Save output as markdown
git-to-doc https://github.com/pallets/flask/pull/5000 --output md
# Save both markdown and JSON
git-to-doc sample.diff --output both
# Use a different model
git-to-doc sample.diff --model gemma2:2b
# Benchmark multiple diffs
git-to-doc-compare sample.diff https://github.com/pallets/flask/pull/5000
Output
For each diff, git-to-doc produces:
- Conventional Commit message — ready to paste into
git commit - Changelog entry — ready to paste into
CHANGELOG.md - Plain-English summary — for non-technical stakeholders
──────────────────────────────────────────────────────────
✨ CONVENTIONAL COMMIT MESSAGE
──────────────────────────────────────────────────────────
feat(parser): add null safety and safe_parse wrapper
──────────────────────────────────────────────────────────
📋 CHANGELOG ENTRY
──────────────────────────────────────────────────────────
## [Unreleased] — 2026-06-26
### Added
- feat(parser): add null safety checks and safe_parse fallback
──────────────────────────────────────────────────────────
🗣️ PLAIN ENGLISH SUMMARY
──────────────────────────────────────────────────────────
The parser now safely handles missing or null input instead of crashing.
Supported Inputs
| Input | Example |
|---|---|
| GitHub PR URL | git-to-doc https://github.com/org/repo/pull/123 |
| Raw diff URL | git-to-doc https://patch-diff.githubusercontent.com/raw/org/repo/pull/123.diff |
Local .diff file |
git-to-doc my_changes.diff |
| Folder of diffs | git-to-doc ./diffs/ |
Flags
| Flag | Description |
|---|---|
--output md |
Save markdown file (auto-named PR-123-changelog-DATE.md) |
--output json |
Save JSON file |
--output both |
Save both |
--model NAME |
Ollama model to use (default: gemma4) |
Built With
Built at AI-First Developer Efficiencies Hackathon · Track 1: The Automagic Documenter
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file git_to_doc-0.1.0.tar.gz.
File metadata
- Download URL: git_to_doc-0.1.0.tar.gz
- Upload date:
- Size: 9.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
078458b20d867e2bec08601ff52a89c9ab7f79f9fd0414124b2bec6199843939
|
|
| MD5 |
5c4fe9bf8c4f524d0c5c87a36e426c7c
|
|
| BLAKE2b-256 |
d7d2927681a3f8c0d1404ecebb692a9eb167ff29344ae83b7e0efd0fde4c06ca
|
File details
Details for the file git_to_doc-0.1.0-py3-none-any.whl.
File metadata
- Download URL: git_to_doc-0.1.0-py3-none-any.whl
- Upload date:
- Size: 11.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2dd8f71d3c8c57bd614db5376b1a521af66236447a0b289c44a76a74ca515d66
|
|
| MD5 |
6de4b9bb957907564ac87ef20ac50ca2
|
|
| BLAKE2b-256 |
eebe301d95a39caeba04c3ab95e04025cdf604bf4ddcc9accc665fac3bd29f0a
|