Skip to content

CLI Reference

bump-my-version

Version bump your Python project.

Usage:

bump-my-version [OPTIONS] COMMAND [ARGS]...

Options:

Name Type Description Default
--version boolean Show the version and exit. False
--help boolean Show this message and exit. False

Subcommands

bump-my-version bump

Change the version.

ARGS may contain any of the following:

VERSION_PART is the part of the version to increase, e.g. minor. Valid values include those given in the --serialize / --parse option.

FILES are additional file(s) to modify. If you want to rewrite only files specified on the command line, use with the --no-configured-files option.

Usage:

bump-my-version bump [OPTIONS] [ARGS]...

Options:

Name Type Description Default
--config-file path Config file to read most of the variables from. None
-v, --verbose integer range (0 and above) Print verbose logging to stderr. Can specify several times for more verbosity. 0
--allow-dirty / --no-allow-dirty boolean Don’t abort if working directory is dirty, or explicitly abort if dirty. None
--current-version text Version that needs to be updated None
--new-version text New version that should be in the files None
--parse text Regex parsing the version string None
--serialize text How to format what is parsed back to a version None
--search text Template for complete string to search None
--replace text Template for complete string to replace None
--regex / --no-regex boolean Treat the search parameter as a regular expression or explicitly do not treat it as a regular expression. None
--no-configured-files boolean Only replace the version in files specified on the command line, ignoring the files from the configuration file. False
--ignore-missing-files / --no-ignore-missing-files boolean Ignore any missing files when searching and replacing in files. None
--ignore-missing-version / --no-ignore-missing-version boolean Ignore any Version Not Found errors when searching and replacing in files. None
--dry-run, -n boolean Don’t write any files, just pretend. False
--commit / --no-commit boolean Commit to version control None
--tag / --no-tag boolean Create a tag in version control None
--sign-tags / --no-sign-tags boolean Sign tags if created None
--tag-name text Tag name (only works with –tag) None
--tag-message text Tag message None
-m, --message text Commit message None
--commit-args text Extra arguments to commit command None
--help boolean Show this message and exit. False

bump-my-version replace

Replace the version in files.

FILES are additional file(s) to modify. If you want to rewrite only files specified on the command line, use with the --no-configured-files option.

Usage:

bump-my-version replace [OPTIONS] [FILES]...

Options:

Name Type Description Default
--config-file path Config file to read most of the variables from. None
-v, --verbose integer range (0 and above) Print verbose logging to stderr. Can specify several times for more verbosity. 0
--allow-dirty / --no-allow-dirty boolean Don’t abort if working directory is dirty, or explicitly abort if dirty. None
--current-version text Version that needs to be updated None
--new-version text New version that should be in the files. If not specified, it will be None. None
--parse text Regex parsing the version string None
--serialize text How to format what is parsed back to a version None
--search text Template for complete string to search None
--replace text Template for complete string to replace None
--regex / --no-regex boolean Treat the search parameter as a regular expression or explicitly do not treat it as a regular expression. False
--no-configured-files boolean Only replace the version in files specified on the command line, ignoring the files from the configuration file. False
--ignore-missing-version boolean Ignore any Version Not Found errors when searching and replacing in files. False
--ignore-missing-files boolean Ignore any missing files when searching and replacing in files. False
--dry-run, -n boolean Don’t write any files, just pretend. False
--help boolean Show this message and exit. False

bump-my-version sample-config

Print a sample configuration file.

Usage:

bump-my-version sample-config [OPTIONS]

Options:

Name Type Description Default
--prompt / --no-prompt boolean Ask the user questions about the configuration. True
--destination choice (stdout | .bumpversion.toml | pyproject.toml) Where to write the sample configuration. stdout
--help boolean Show this message and exit. False

bump-my-version show

Show current configuration information.

ARGS may contain one or more configuration attributes. For example:

  • bump-my-version show current_version
  • bump-my-version show files.0.filename
  • bump-my-version show scm_info.branch_name
  • bump-my-version show current_version scm_info.distance_to_latest_tag

Usage:

bump-my-version show [OPTIONS] [ARGS]...

Options:

Name Type Description Default
--config-file path Config file to read most of the variables from. None
-f, --format choice (default | yaml | json) Specify the output format. default
-i, --increment text Increment the version component and add new_version to the configuration. None
--current-version text Version that needs to be updated None
--help boolean Show this message and exit. False

bump-my-version show-bump

Show the possible versions resulting from the bump subcommand.

Usage:

bump-my-version show-bump [OPTIONS] [VERSION]

Options:

Name Type Description Default
--config-file path Config file to read most of the variables from. None
--ascii boolean Use ASCII characters only. False
-v, --verbose integer range (0 and above) Print verbose logging to stderr. Can specify several times for more verbosity. 0
--help boolean Show this message and exit. False