Automated version bumping and changelog management using conventional commits
Project description
🌱 Pezin
A tool that handles versioning with care — it can be used manually or integrated as a pre-commit hook to automate version bumps and changelog generation based on conventional commits.
Features
- 🔄 Automatic version bumping based on conventional commits
- 🌍 Universal language support - Python, Node.js, C/C++, Rust, PHP, Go, Java, .NET, and any custom patterns
- 📁 Multi-file version management - Update multiple version files simultaneously
- 🎨 Advanced pattern system - Component-level version control with rich template formatting
- 📝 Automated changelog generation with comparison links
- 🎣 Git pre-commit hook integration with reliable amend detection
- ⚡ CLI tool for manual version management
- 🏷️ Pre-release version support (alpha, beta, rc)
- 🔧 Flexible version formats - Support any prefix/suffix pattern (v1.2.3, 1.2.3v, release-1.2.3)
Quick Start
Installation
Install from PyPI:
pip install pezin
Or install the latest development version:
pip install git+https://github.com/tatus9/pezin.git
Setup Git Hook
Add to your .pre-commit-config.yaml:
repos:
- repo: https://github.com/tatus9/pezin
rev: v0.1.2 # Use the latest version
hooks:
- id: pezin
Install the hooks:
pip install pre-commit pezin
pre-commit install --hook-type commit-msg
Start Using
Just commit with conventional commit format:
git commit -m "feat: add user authentication" # 1.0.0 → 1.1.0
git commit -m "fix: resolve login bug" # 1.1.0 → 1.1.1
git commit -m "feat!: redesign API" # 1.1.1 → 2.0.0
Your version files will be automatically updated!
Conventional Commits
| Type | Version Bump | Example |
|---|---|---|
feat: |
Minor (1.0.0 → 1.1.0) | feat: add user dashboard |
fix: |
Patch (1.0.0 → 1.0.1) | fix: resolve login issue |
feat!: |
Major (1.0.0 → 2.0.0) | feat!: redesign API |
docs:, chore:, etc. |
No bump | docs: update readme |
Special tokens:
[skip-bump]- Skip version bump[force-major]- Force major bump[pre-release=beta]- Add pre-release label
CLI Usage
# Check versions
pezin -v # Shows current project + pezin versions
pezin version # Same as above
# Manual version bumping
pezin minor # Bump minor version
pezin patch --dry-run # Preview changes
pezin major --pre-release rc # Pre-release version
# Custom configuration
pezin patch --config package.json
pezin minor --skip-changelog
# Multi-language project example
# Updates pyproject.toml, package.json, version.h simultaneously
git commit -m "feat: add multi-platform support"
Python API
from pezin import Version, ConventionalCommit, ChangelogManager
# Parse and bump version
version = Version.parse("1.2.3")
new_version = version.bump("minor")
print(str(new_version)) # "1.3.0"
# Parse commit message
commit = ConventionalCommit.parse(
"feat(api)!: add new endpoint\n\nBREAKING CHANGE: new auth"
)
print(commit.breaking) # True
# Update changelog
config = ChangelogConfig(repo_url="https://github.com/tatus9/pezin.git")
manager = ChangelogManager(config)
manager.update_changelog(
Path("CHANGELOG.md"),
str(new_version),
[commit]
)
Conventional Commits Guide
Pezin follows the Conventional Commits specification:
Basic Format
<type>[optional scope]: <description>
[optional body]
[optional footer(s)]
Version Bump Rules
feat: Minor version bump (1.0.0 → 1.1.0) - New featuresfix: Patch version bump (1.0.0 → 1.0.1) - Bug fixes!orBREAKING CHANGE: Major version bump (1.0.0 → 2.0.0) - Breaking changes
Other Commit Types (no version bump)
docs: Documentation changesstyle: Code style/formatting changesrefactor: Code refactoring without functional changesperf: Performance improvementstest: Adding or updating testschore: Maintenance tasks, dependency updatesci: CI/CD configuration changesbuild: Build system changes
Special Footer Tokens
Control version bumping behavior with footer tokens:
# Skip version bump entirely
git commit -m "feat: new feature
[skip-bump]"
# Force specific bump type
git commit -m "docs: update readme
[force-patch]"
# Add pre-release label
git commit -m "feat: beta feature
[pre-release=beta]"
Available tokens:
[skip-bump]: Skip version bump[force-major]: Force major bump (1.0.0 → 2.0.0)[force-minor]: Force minor bump (1.0.0 → 1.1.0)[force-patch]: Force patch bump (1.0.0 → 1.0.1)[pre-release=label]: Add pre-release label (alpha, beta, rc)
Documentation
- 📖 Quick Start Guide - Get started in minutes
- 📖 Installation Guide - Detailed setup instructions
- 🌍 Multi-Language Support - Python, Node.js, C++, Rust, and more
- 🎨 Advanced Patterns - Custom version formats and templates
- 📋 Conventional Commits - Complete commit format guide
- ⚙️ Configuration - Customize Pezin behavior
- 💻 CLI Usage - Manual version management
- 🐍 Python API - Programmatic usage
- 🔧 Troubleshooting - Common issues and solutions
Examples
- 🌍 Multi-Language Examples - Complete project setups
Contributing
We welcome contributions!
License
MIT License - feel free to use this project for any purpose.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pezin-0.3.1.tar.gz.
File metadata
- Download URL: pezin-0.3.1.tar.gz
- Upload date:
- Size: 35.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c03324581dc2d86ff88f41fa63be6f0d33f2819f36cec4640c6b5ec8085e6999
|
|
| MD5 |
b722cb3b5f7f239f22538820ee98fc8c
|
|
| BLAKE2b-256 |
d573566f24e189b91897c6d192bb6d5f48cc03f85fa38c4e8e6a9ce793eed230
|
Provenance
The following attestation bundles were made for pezin-0.3.1.tar.gz:
Publisher:
release.yml on tatus9/pezin
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pezin-0.3.1.tar.gz -
Subject digest:
c03324581dc2d86ff88f41fa63be6f0d33f2819f36cec4640c6b5ec8085e6999 - Sigstore transparency entry: 778681860
- Sigstore integration time:
-
Permalink:
tatus9/pezin@ce010f2ffb52c82e44c7c89009a11e7c04e5aadb -
Branch / Tag:
refs/tags/v0.3.1 - Owner: https://github.com/tatus9
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@ce010f2ffb52c82e44c7c89009a11e7c04e5aadb -
Trigger Event:
push
-
Statement type:
File details
Details for the file pezin-0.3.1-py3-none-any.whl.
File metadata
- Download URL: pezin-0.3.1-py3-none-any.whl
- Upload date:
- Size: 41.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
876b855a975bb361e27b5f545ba81cda45be05f494d9f7cd9b58c3bb111e3bf5
|
|
| MD5 |
a5be7c7dbdbfade95abad31cf79a1866
|
|
| BLAKE2b-256 |
6408fa8023014ba40f81a960ba2d4a32267807baf38578fc862c3c0316e035ae
|
Provenance
The following attestation bundles were made for pezin-0.3.1-py3-none-any.whl:
Publisher:
release.yml on tatus9/pezin
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pezin-0.3.1-py3-none-any.whl -
Subject digest:
876b855a975bb361e27b5f545ba81cda45be05f494d9f7cd9b58c3bb111e3bf5 - Sigstore transparency entry: 778681863
- Sigstore integration time:
-
Permalink:
tatus9/pezin@ce010f2ffb52c82e44c7c89009a11e7c04e5aadb -
Branch / Tag:
refs/tags/v0.3.1 - Owner: https://github.com/tatus9
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@ce010f2ffb52c82e44c7c89009a11e7c04e5aadb -
Trigger Event:
push
-
Statement type: