A Python tool for automatically generating changelogs from Git commits using Jinja2 templates. Supports multiple output formats including Markdown, HTML, plain text, and JSON.
- Multiple Output Formats: Generate changelogs in Markdown, HTML, plain text, or JSON
- Jinja2 Templating: Fully customizable templates for different output formats
- Git Integration: Direct integration with Git repositories
- Flexible Configuration: Command-line options for format selection and output customization
- Beautiful HTML Output: Professional-looking HTML changelogs with CSS styling
- Clone the repository:
git clone <repository-url>
cd auto-changelog
- Install dependencies:
pip install -r requirements.txt
python main.py <repository-url> <branch-name>
# Generate HTML changelog
python main.py https://github.com/Spring-0/face-censor main -f html -o changelog.html
# Generate JSON output
python main.py https://github.com/Spring-0/face-censor development -f json -o changelog.json
# Use custom template directory
python main.py https://github.com/Spring-0/face-censor main -t custom_templates -f markdown
repo_url
: URL of the Git repositorybranch_name
: Branch to generate changelog for-o, --output
: Output file path (default: stdout)-f, --format
: Output format (markdown, html, text, json)-t, --template-dir
: Custom template directory (default: templates)
Clean, GitHub-compatible markdown format with commit details and metadata.
Professional HTML output with embedded CSS styling for web display.
Plain text format suitable for terminal output or simple documentation.
Structured JSON output for programmatic processing and API integration.
You can create custom Jinja2 templates by adding .j2
files to the templates directory. Templates have access to:
commits
: List of commit objects with the following properties:hex
: Full commit hashmessage
: Commit messageauthor
: Author namedate
: ISO format datedate_formatted
: Human-readable formatted date
generation_date
: Timestamp when the changelog was generated
- Python 3.7+
- GitPython
- Jinja2