Bump My Version

1.3.0 · active · verified Sun Apr 12

Bump My Version is a command-line tool designed to simplify software releases by automatically updating version strings across project files, optionally committing changes, and creating Git tags. It is a maintained refactor of the `bump2version` fork of `bumpversion`, offering enhanced features like `pyproject.toml` configuration support, a modern CLI built with `click` and `rich`, and robust configuration validation using `Pydantic`. It supports various versioning schemes including Semantic Versioning (SemVer) and Calendar Versioning (CalVer). The current version is 1.3.0, and it has an active development and release cadence.

Warnings

Install

Quickstart

This quickstart demonstrates how to set up `bump-my-version` for a new project and perform a basic version bump. It starts by creating a dummy project and then initializes a `.bumpversion.toml` configuration file. Finally, it uses the `bump` subcommand to increment the 'minor' version component, updating both the source file and the configuration itself. By default, it will look for version strings defined in `pyproject.toml` or `__init__.py` files based on the generated config.

# 1. Create a sample project structure and initialize a git repo
mkdir my-project
cd my-project
git init
echo '__version__ = "0.1.0"' > my_project/__init__.py
mkdir my_project

# 2. Generate a default configuration file (e.g., .bumpversion.toml)
bump-my-version sample-config --no-prompt --destination .bumpversion.toml

# 3. Inspect the generated config (optional)
cat .bumpversion.toml

# 4. Bump the 'minor' version (will update __init__.py and .bumpversion.toml)
bump-my-version bump minor

# 5. Verify the version has been bumped
cat my_project/__init__.py
cat .bumpversion.toml

# You can also bump other parts like 'major' or 'patch'
# bump-my-version bump major

view raw JSON →