philiprehberger-changelog-gen
Git-based changelog generator from conventional commits.
Installation
pip install philiprehberger-changelog-gen
Usage
Python API
from philiprehberger_changelog_gen import generate_changelog
changelog = generate_changelog(
repo_path=".",
from_tag="v0.1.0",
version="0.2.0",
)
# Print markdown
print(changelog.to_markdown())
# Write to file (prepend to existing)
changelog.write("CHANGELOG.md", mode="prepend")
CLI
# Print to stdout
changelog-gen
# From a specific tag
changelog-gen --from v0.1.0 --version 0.2.0
# Write to file
changelog-gen --output CHANGELOG.md --prepend
Filter by Scope
# Only include commits scoped to "api"
changelog = generate_changelog(scope="api", version="0.2.0")
changelog-gen --scope api --version 0.2.0
Conventional Commits
The generator parses conventional commit messages:
feat: add user authentication
fix(auth): handle expired tokens
feat!: redesign API (breaking change)
chore: update dependencies
Commits are grouped by type: Features, Bug Fixes, Performance, Refactoring, Documentation, Tests, Chores, CI/CD, Build, Style.
Output Example
## 0.2.0 (2026-03-10)
### Breaking Changes
- **api:** redesign authentication flow
### Features
- add user dashboard
- **auth:** add OAuth2 support
### Bug Fixes
- **db:** fix connection pool leak
API
| Function / Class | Description |
|---|---|
generate_changelog(repo_path, from_tag, to_ref, version, include_types, exclude_types, scope) |
Generate a changelog from git history between tags/refs |
Changelog |
Generated changelog content with to_markdown() and write(path, mode) methods |
CommitEntry |
A parsed conventional commit (hash, type, scope, message, breaking, date, author) |
main() |
CLI entrypoint for command-line usage |
Development
pip install -e .
python -m pytest tests/ -v
Support
If you find this project useful:
License
Metadata
Release files for philiprehberger-changelog-gen 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| philiprehberger_changelog_gen-0.2.0.tar.gz | 7.6 kB | Without provenance | Details for philiprehberger_changelog_gen-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| philiprehberger_changelog_gen-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for philiprehberger_changelog_gen-0.2.0-py3-none-any.whl |
Total release size: 14.2 kB
Release files / philiprehberger_changelog_gen-0.2.0.tar.gz
| Download URL | philiprehberger_changelog_gen-0.2.0.tar.gz |
|---|---|
| Size | 7.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f603b27e2515ce86a2a947190ac45592c6a134a87eb0725ee9bb256b37c273f2
|
|
BLAKE2b-256 checksum How to use checksums |
7ce9e7fbefa0e9f0fa18e83516efe48a4b61d6ca97cca172405aab7a7eaaf428
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.13
|
Release files / philiprehberger_changelog_gen-0.2.0-py3-none-any.whl
| Download URL | philiprehberger_changelog_gen-0.2.0-py3-none-any.whl |
|---|---|
| Size | 6.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
246a614dd1a74465f40fae6a741b6e963afea609223bc49d190955c2951a7a4b
|
|
BLAKE2b-256 checksum How to use checksums |
bf69faae768ca8da72ea7af5ab75fdb42b7e8243beb14a8eb87d573460370cb6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.13
|
Security for philiprehberger-changelog-gen 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.