git-changelog

raw JSON →
2.9.3 verified Mon Apr 27 auth: no python

Automatic Changelog generator using Jinja2 templates. Version 2.9.3, released 2026-03-26. Active development, frequent releases.

pip install git-changelog
error ModuleNotFoundError: No module named 'git_changelog'
cause Package not installed.
fix
Run 'pip install git-changelog' to install.
error AttributeError: module 'git_changelog' has no attribute 'Changelog'
cause Wrong import path; direct top-level import does not expose Changelog.
fix
Use 'from git_changelog.changelog import Changelog' instead.
gotcha Provider token is required for private repositories or high rate limits; public repos may work without token but can hit GitHub API rate limits.
fix Set GIT_TOKEN environment variable with a personal access token.
gotcha The library expects to be run inside a Git repository; calling from_repository on a non-repo path raises an exception.
fix Ensure you run the script from within a Git repository, or pass a valid repo_path.
deprecated The gem log output format (gem) is deprecated in favor of the default `keepachangelog`-like template.
fix Switch to built-in templates or use --template CLI option.

Generate changelog from current Git repository (requires git executable in PATH).

import os
from git_changelog.changelog import Changelog
from git_changelog.provider import Provider

token = os.environ.get('GIT_TOKEN', '')
provider = Provider.GITHUB

cl = Changelog.from_repository(
    repo_path='.',
    provider=provider,
    token=token,
)
print(cl.generate())