AI-generated changelogs from git commits. A Python CLI that parses git commit messages and generates formatted changelogs following the Keep a Changelog format.
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
pip install -e .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 statsfrom 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)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.
# Install dev dependencies
pip install -e ".[dev]"
# Run tests
make test
# Lint
make lint
# Format
make formatInspired by automated changelog generation trends and tools like conventional-changelog and git-cliff.
Built by Officethree Technologies | Made with love and AI