{"id":4462,"library":"bump-my-version","title":"Bump My Version","description":"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.","status":"active","version":"1.3.0","language":"en","source_language":"en","source_url":"https://github.com/callowayproject/bump-my-version","tags":["versioning","semantic versioning","cli","automation","pyproject.toml","git","mercurial"],"install":[{"cmd":"pip install bump-my-version","lang":"bash","label":"Install via pip"}],"dependencies":[],"imports":[],"quickstart":{"code":"# 1. Create a sample project structure and initialize a git repo\nmkdir my-project\ncd my-project\ngit init\necho '__version__ = \"0.1.0\"' > my_project/__init__.py\nmkdir my_project\n\n# 2. Generate a default configuration file (e.g., .bumpversion.toml)\nbump-my-version sample-config --no-prompt --destination .bumpversion.toml\n\n# 3. Inspect the generated config (optional)\ncat .bumpversion.toml\n\n# 4. Bump the 'minor' version (will update __init__.py and .bumpversion.toml)\nbump-my-version bump minor\n\n# 5. Verify the version has been bumped\ncat my_project/__init__.py\ncat .bumpversion.toml\n\n# You can also bump other parts like 'major' or 'patch'\n# bump-my-version bump major","lang":"bash","description":"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."},"warnings":[{"fix":"Update your scripts to use the new sub-command syntax, e.g., `bump-my-version bump minor` instead of `bump-my-version minor`.","message":"The command-line invocation changed significantly in version 0.6.0, splitting functionality into sub-commands (e.g., `bump-my-version bump <part>`). While older syntax might still be backward-compatible for now, it is discouraged and may be removed in a future 1.0 release.","severity":"breaking","affected_versions":">=0.6.0"},{"fix":"Always verify file changes after a bump, especially in automated workflows. Review your `.bumpversion.toml` or `pyproject.toml` `files` and `search` configurations carefully to ensure they match expected version strings.","message":"Unlike its predecessor `bump2version`, `bump-my-version` may silently succeed even if it fails to find and modify all configured files, potentially leading to desynchronized version strings across your project. Ensure your configuration's `search` and `replace` patterns accurately match your files.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Use `bump-my-version show` instead to get machine-readable output.","message":"The `--list` command-line option is deprecated.","severity":"deprecated","affected_versions":">=0.6.0"},{"fix":"If your workflow relies on shell metacharacters in hooks, you must explicitly set `allow_shell_hooks = true` in your configuration file.","message":"As of March 22, 2026, the `allow_shell_hooks` configuration is now `false` by default, disallowing shell metacharacters in hooks unless explicitly enabled. This is a security-related change.","severity":"gotcha","affected_versions":">=1.x.x (specifically around March 22, 2026 releases)"},{"fix":"Prefer using `pyproject.toml` or `.bumpversion.toml` for modern configurations and remove older `.bumpversion.cfg` or `setup.cfg` files to avoid ambiguity. Always explicitly specify your configuration file if there's any doubt.","message":"Configuration files are resolved in a specific order: `--config-file`, `BUMPVERSION_CONFIG_FILE` environment variable, `.bumpversion.cfg` (legacy), `.bumpversion.toml`, `setup.cfg` (legacy), `pyproject.toml`. Conflicting settings might lead to unexpected behavior if files are not ordered correctly or legacy configs are present.","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"last_verified":"2026-04-12T00:00:00.000Z","next_check":"2026-07-11T00:00:00.000Z"}