Skip to main content

Bump Anything

Copyright 2019-2025 Caleb Evans
Released under the MIT license

tests Coverage Status

Bump Anything is a command-line utility for incrementing the version It serves as a more-flexible alternative to npm version and similar tools because Bump Anything can handle any arbitrary text file and has built-in support for different types of projects.

Features

  • Bump the version number in any arbitrary file
  • Supports most project types (if no paths are supplied, automatically detects package.json in Node, setup.py or pyproject.toml in Python, style.css for WordPress themes, etc.)

Installation

Bump Anything requires Python 3.9 or newer to run, so please ensure you have it installed.

pip3 install bump-anything

Usage

Bump Anything exposes to your shell a bump-anything command (also aliased to bump). The only required argument is a keyword indicating how you want to increment each version. It can be either major, minor, or patch.

bump major # 1.2.3 -> 2.0.0
bump minor # 1.2.3 -> 1.3.0
bump patch # 1.2.3 -> 1.2.4
bump prerelease # 1.2.3-beta.1 -> 1.2.3-beta.2
bump 2.3.4
bump v2.3.4 # same as `bump 2.3.4`

With this syntax, Bump Anything will do its best to find the relevant files to bump. However, Bump Anything can also accept an optional list of one or more file paths whose versions to bump. Only the first occurrence of the version field in each file will be updated.

bump minor subdir/myfile1.json subdir/myfile2.toml

Git Integration

The bump command will automatically create a tagged commit if the current directory is a Git repository. Only the files that have been modified by bump will be staged.

Custom commit message

You can explicitly specify the commit message with --commit-message or -m. The default is Prepare v<new_version> release. You can use the {new_version} placeholder to represent the new version (without any prefix).

bump --commit-message 'Release v{new_version}' major
bump -m 'Release v{new_version}' major

Custom tag name

You can explicitly specify the tag name with --tag-name or -t (default: v<new_version>). You can use the {new_version} placeholder to represent the new version (without any prefix).

bump --tag-name 'release/{new_version}' patch
bump -t 'release/{new_version}' patch

Disabling committing and/or tagging

If you do not wish for bump to automatically create a commit and tag, you can pass the --no-commit flag (alias: -n):

bump --no-commit minor
bump -n minor

Disabling tagging only

If you wish to disable the automatic tag creation but still create a commit, you can pass the --no-tag flag:

bump --no-tag patch

Auto-Detected Files

  • package.json (Node)
  • package-lock.json (Node)
  • setup.py (Python)
  • setup.cfg (Python)
  • pyproject.toml (Python)
  • style.css (WordPress Theme)
  • Cargo.toml (Rust package manifest)
  • <cwd name>.php (WordPress Plugin)

Metadata

Release files for bump-anything 2.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for bump-anything 2.3.0
File Size Uploaded
bump_anything-2.3.0.tar.gz 5.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for bump-anything 2.3.0
File Interpreter ABI Platform
bump_anything-2.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 11.5 kB

Release files / bump_anything-2.3.0.tar.gz

Download URL bump_anything-2.3.0.tar.gz
Size 5.1 kB
Tags Source
SHA-256 checksum
How to use checksums
840d6eaebffbea01f037c52dc719837fb7758f4371a9f6e06deb21e8e8b8dd7b
BLAKE2b-256 checksum
How to use checksums
f269fff8fc751226f560f5bed5b7824d376099039498f462a4ce1778daf8cc33
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.8.14

Release files / bump_anything-2.3.0-py3-none-any.whl

Download URL bump_anything-2.3.0-py3-none-any.whl
Size 6.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
576e83e6805cb3aaffa4d9196bf6f31d37416080138da455211828463f9b1949
BLAKE2b-256 checksum
How to use checksums
395532673018be31cdd9b5c6797f217e71422a738073619a70d3ba861d3d5e8d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.8.14
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page