Project Version Manager. A tool for bumping python project versions following SemVer 2.0.0
Project description
PVM — Project Version Manager
PVM is a CLI tool for managing Python project versions using Semantic Versioning 2.0.0. It automates version bumps, changelog generation, and Git tagging, all driven by your pyproject.toml.
Content
Features
- Semantic Versioning: Bump major, minor, patch, prerelease, and build versions.
- Git Integration: Commit and tag version changes, with optional push.
- Changelog Generation: Automated changelog creation and updating.
- Flexible CLI: Powered by Typer, with rich options.
- Preserves Formatting: Updates
pyproject.tomlwithout breaking formatting.
Installation
pip install pvm
# or, with uv
uv pip install pvm
Usage
Show the Current Version
pvm show current
Predict the Next Version
pvm show next
Bump the Version
# Bump patch version (e.g., 1.2.3 → 1.2.4)
pvm bump patch
# Bump minor version and add prerelease
pvm bump minor --prerelease --prerelease-token rc
# Bump to a specific version
pvm bump 2.0.0
# Add build metadata
pvm bump patch --build --build-token build.5
# Bump and tag in Git (with prefix)
pvm bump patch --tag --tag-prefix v
# Bump and generate changelog
pvm bump patch --changelog --changelog-file CHANGELOG.md
Generate a Changelog
pvm changelog --file CHANGELOG.md
CLI Reference
| Command | Description |
|---|---|
pvm --version |
Show PVM CLI version |
pvm show current |
Show current project version |
pvm show next |
Predict next version |
pvm bump [target] |
Bump version (target: major, minor, patch, etc.) |
pvm changelog |
Generate or update changelog |
Common Options for bump:
--final: Force a final version (no prerelease/build)--prerelease, -p: Add a prerelease (e.g., alpha, beta, rc)--prerelease-token: Set prerelease token (e.g., rc, alpha)--build, -b: Add build metadata--build-token: Set build metadata token--tag, -t: Create a Git tag for the new version--tag-prefix: Prefix for tag (default:v)--changelog, -c: Generate changelog after bump--changelog-file: Path to changelog file
Example Workflows
Bump patch, tag, and update changelog:
pvm bump patch --tag --changelog --changelog-file CHANGELOG.md
Show next prerelease version:
pvm show next --prerelease
Development
Install Dev & Test Dependencies
uv sync --group dev --group test
Run Tests
pytest
# or, for all environments:
tox
Format, Lint, and Type-Check
uv run ruff format .
uv run ruff check --fix --exit-zero
uv run pre-commit run --all-files
uv run mypy .
Configuration
PVM reads and writes the version from your pyproject.toml.
You can configure changelog file location and other options in your pyproject.toml.
Links
License
MIT License © Malvin Ndip
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 project_version_manager-0.1.0.tar.gz.
File metadata
- Download URL: project_version_manager-0.1.0.tar.gz
- Upload date:
- Size: 17.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b0281a7df22e82e9eddd918b0bc8d7f7697c2bf83452e90d8e537a3fee25028f
|
|
| MD5 |
6e06706be117187356841ff112ed21ae
|
|
| BLAKE2b-256 |
4d75566ada185a9b7e293d93a49b3fc9936116eaa50a6e45ba274329203dc866
|
File details
Details for the file project_version_manager-0.1.0-py3-none-any.whl.
File metadata
- Download URL: project_version_manager-0.1.0-py3-none-any.whl
- Upload date:
- Size: 21.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ebbe914dc3be5cea0db88c24406abbf1297a6b70e36b1f906d4fc735e5b87211
|
|
| MD5 |
f7bd498d11e82705bf108e36da242aa8
|
|
| BLAKE2b-256 |
c92f07d916d50286876a54e75581f3d20cc5a92d5786620af98b8cabd78deba2
|