Skip to content

MukundaKatta/ChangeLog

Repository files navigation

ChangeLog

CI Python License: MIT Code style: black

AI-generated changelogs from git commits. A Python CLI that parses git commit messages and generates formatted changelogs following the Keep a Changelog format.

Architecture

graph TD
    A[Git Repository] -->|git log| B[Commit Parser]
    B --> C[Commit Categorizer]
    C --> D{Output Format}
    D -->|Markdown| E[CHANGELOG.md]
    D -->|JSON| F[changelog.json]
    C --> G[Breaking Change Detector]
    C --> H[Stats Generator]

    subgraph ChangeLog CLI
        B
        C
        D
        G
        H
    end
Loading

Quickstart

Installation

pip install -e .

Usage

Generate a changelog from a list of conventional commits:

# Generate markdown changelog
changelog generate --version 1.0.0 --format markdown

# Generate JSON changelog
changelog generate --version 1.0.0 --format json

# Parse and categorize commits from stdin
echo "feat: add user authentication" | changelog parse

# Get commit statistics
changelog stats

As a Library

from changelog.core import ChangeLogGenerator

generator = ChangeLogGenerator()

commits = [
    "feat: add user authentication",
    "fix: resolve login timeout issue",
    "docs: update API reference",
    "feat!: redesign dashboard layout",
]

# Categorize commits
categorized = [generator.categorize_commit(c) for c in commits]

# Generate a full changelog
changelog = generator.generate_changelog(commits, version="1.0.0")

# Output as markdown
print(generator.format_markdown(changelog))

# Detect breaking changes
breaking = generator.detect_breaking_changes(commits)

Conventional Commits

ChangeLog follows the Conventional Commits specification:

Prefix Category Description
feat: Added A new feature
fix: Fixed A bug fix
docs: Docs Documentation changes
refactor: Changed Code refactoring
test: Tests Adding or updating tests
chore: Chore Maintenance tasks

Breaking changes are detected via ! suffix (e.g., feat!:) or BREAKING CHANGE: in the commit body.

Development

# Install dev dependencies
pip install -e ".[dev]"

# Run tests
make test

# Lint
make lint

# Format
make format

Inspired by

Inspired by automated changelog generation trends and tools like conventional-changelog and git-cliff.


Built by Officethree Technologies | Made with love and AI

About

AI-generated changelogs from git commits — conventional commit parsing, markdown/JSON export

Topics

Resources

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors