A simple tool to automate Python project version bumping and git tagging using uv.
This tool provides a streamlined workflow for:
- Checking if your git repository is clean
- Bumping your project version (major, minor, or patch)
- Updating your dependency lock file
- Committing changes
- Creating git tags automatically
- uv - The blazingly fast Python package installer and resolver (minimum version
0.7.0) - Git
- A relatively modern Python project with a
pyproject.tomlfile that uses itsversionconfiguration option to store the project version
-
Copy the
justfilefrom this repository into your Python project root -
No need to install
justseparately! Thanks to the magic ofuv, you can run it directly with:uvx --from just-bin just
# Run commands using uv to execute just
uvx --from just-bin just bump-patch # Bump patch version (0.1.0 -> 0.1.1)
uvx --from just-bin just bump-minor # Bump minor version (0.1.1 -> 0.2.0)
uvx --from just-bin just bump-major # Bump major version (0.2.0 -> 1.0.0)
uvx --from just-bin just version # Check current version
uvx --from just-bin just push-all # Push commit and tag to remoteThe workflow:
- Verifies your git repository is clean (no uncommitted changes)
- Records your current version
- Bumps the version in pyproject.toml
- Runs
uv syncto update the lock file - Commits all changes in a single commit
- Creates an annotated git tag
This tool exists to bridge a gap until uv implements its own task management system. The incredible team behind uv is working on a comprehensive task manager - when that's released, this justfile will no longer be needed, and we'll all benefit from uv's superior performance and integrated workflow. Thanks to uv's uvx command, you don't even need to install just separately - another example of how uv is streamlining Python developer workflows!
This tool is intentionally dead simple, focusing only on version bumping and git tagging. Users needing more advanced release management with features like changelog generation, release notes, or complex CI/CD integration should consider other existing tools such as:
When uv's task management system is implemented, this project will be updated with instructions on how to migrate from the justfile approach to native uv tasks. Stay tuned for updates!
MIT
Contributions welcome! Please feel free to submit a Pull Request.