bumpversion

Update every version string in your project, then commit and tag the change — one command, one config file. A fast, dependency-free Rust rewrite of bump-my-version that reads the config you already have.

bumpversion patch

build status test status crates.io docs.rs

Why#

A release touches the same number in a dozen places: the package manifest, a README install line, a constant in the source, a docs heading. Doing that by hand is how a release ships with one of them stale.

bumpversion reads the current version from one config file, works out the next one, rewrites every place you listed, and commits and tags the result — atomically, and with a --dry-run that shows you the exact diff first.

It is a drop-in rewrite of bump-my-version (formerly bumpversion / bump2version): the same .bumpversion.toml, pyproject.toml, and setup.cfg layouts, without a Python install in the loop.

No Python required

A single static binary from brew, cargo, or a release download — no global pip install, no virtualenv to activate before you can cut a release.

Your existing config

Reads .bumpversion.toml, pyproject.toml, .bumpversion.cfg, and setup.cfg — point it at a project you already have and it works.

Any version scheme

A parse regex and serialize patterns describe the scheme, so SemVer, pre-release ladders, and date-stamped builds are all just configuration.

Show before you commit

--dry-run --verbose prints the full diff of every file, the commit it would make, and the tag it would create — before anything is written.

Example#

# Install a prebuilt binary
brew install --cask romnn/tap/bumpversion

# What would the next version be?
bumpversion show-bump patch

# Show every change a patch release would make, without making it
bumpversion --dry-run --verbose patch

# Do it: rewrite the files, commit, tag
bumpversion patch

The whole configuration for a project whose version lives in Cargo.toml and the README:

.bumpversion.toml
[tool.bumpversion]
current_version = "1.4.2"
commit = true
tag = true

[[tool.bumpversion.files]]
filename = "Cargo.toml"

[[tool.bumpversion.files]]
filename = "README.md"

See it before you run it#

--dry-run --verbose prints the entire result of a bump — the diff of every file, the commit it would make, the tag it would create — without writing anything:

$ bumpversion --dry-run -vv bump patch
 
 [DRY-RUN] [current version]
 [DRY-RUN] 	1.4.2
 [DRY-RUN] 	major=1  minor=4  patch=2
 [DRY-RUN] [setup]
 [DRY-RUN] 	no setup hooks defined
 [DRY-RUN] [new version]
 [DRY-RUN] 	1.4.3
 [DRY-RUN] 	major=1  minor=4  patch=3
 [DRY-RUN] 
 [DRY-RUN] [./Cargo.toml]
 [DRY-RUN] 	replacing `{current_version}` (1.4.2) with `{new_version}` (1.4.3)
 [DRY-RUN] 
 [DRY-RUN] 	Differences (-before|+after):
 [DRY-RUN] 	 [package]
 [DRY-RUN] 	 name = "widget"
 [DRY-RUN] 	-version = "1.4.2"
 [DRY-RUN] 	+version = "1.4.3"
 [DRY-RUN] 	 edition = "2024"
 [DRY-RUN] 
 [DRY-RUN] [./README.md]
 [DRY-RUN] 	replacing `{current_version}` (1.4.2) with `{new_version}` (1.4.3)
 [DRY-RUN] 
 [DRY-RUN] 	Differences (-before|+after):
 [DRY-RUN] 	-# widget 1.4.2
 [DRY-RUN] 	+# widget 1.4.3
 [DRY-RUN] 
 [DRY-RUN] 	-Install with `cargo add widget@1.4.2`.
 [DRY-RUN] 	+Install with `cargo add widget@1.4.3`.
 [DRY-RUN] 
 [DRY-RUN] [./.bumpversion.toml]
 [DRY-RUN] 	replacing `{current_version}` (1.4.2) with `{new_version}` (1.4.3)
 [DRY-RUN] 
 [DRY-RUN] 	Differences (-before|+after):
 [DRY-RUN] 	 [tool.bumpversion]
 [DRY-RUN] 	-current_version = "1.4.2"
 [DRY-RUN] 	+current_version = "1.4.3"
 [DRY-RUN] 	 commit = true
 [DRY-RUN] 	 tag = true
 [DRY-RUN] 
 [DRY-RUN] 	 [[tool.bumpversion.files]]
 [DRY-RUN] [pre-commit]
 [DRY-RUN] 	no pre-commit hooks defined
 [DRY-RUN] [commit]
 [DRY-RUN] 	   add ./Cargo.toml
 [DRY-RUN] 	   add ./README.md
 [DRY-RUN] 	   add ./.bumpversion.toml
 [DRY-RUN] 	commit Bump version: 1.4.2 → 1.4.3
 [DRY-RUN] [tag]
 [DRY-RUN] 	tag = v1.4.3
 [DRY-RUN] 	message = Bump version: 1.4.2 → 1.4.3
 [DRY-RUN] 	sign = false
 [DRY-RUN] [post-commit]
 [DRY-RUN] 	no post-commit hooks defined

Documentation#