A command-line tool to easily bump the git tag version of your project using semantic versioning.
brew tap flaticols/appsbrew install flaticols/apps/bumpgo install github.com/flaticols/bump@latest# In your git repository
bump # Bumps patch version (e.g., v1.2.3 -> v1.2.4)
bump major # Bumps major version (e.g., v1.2.3 -> v2.0.0)
bump minor # Bumps minor version (e.g., v1.2.3 -> v1.3.0)
bump patch # Bumps patch version (e.g., v1.2.3 -> v1.2.4)
# Monorepo: specify package name as last argument
bump pkg/x # Bumps patch for pkg/x (e.g., pkg/x/v1.2.3 -> pkg/x/v1.2.4)
bump major pkg/x # Bumps major for pkg/x (e.g., pkg/x/v1.2.3 -> pkg/x/v2.0.0)
bump minor services/api # Works with any prefix structure
# Other commands
bump undo # Removes the latest semver git tag--repo, -r Path to the repository (if not current directory)
--verbose, -v Print verbose output
--local, -l If local is set, bump will not error if no remotes are found
--brave, -b If brave is set, bump will not ask any questions (default: false)
--no-color Disable colorful output (default: false)
--json Output a single JSON object to stdout
--prefix Tag prefix to use for monorepo support (e.g., 'pkg/x')
--version Print version information
bump [major|minor|patch]- Bump the version according to semantic versioningbump undo- Remove the latest semver git tag both locally and from the remote repository
$ bump
• on default branch: main
• no uncommitted changes
• no remote changes
• no unpushed changes
• no new remote tags
• bump tag v1.2.3 => v1.2.4
• tag v1.2.4 created
• tag v1.2.4 pushedWith brave mode:
$ bump --brave
• brave mode enabled, ignoring warnings and errors
• on default branch: main
• no uncommitted changes
• no remote changes
• no unpushed changes
• no new remote tags
• bump tag v1.2.3 => v1.2.4
• tag v1.2.4 created
• tag v1.2.4 pushedbump supports monorepos where each package has its own version tags with prefixes. Simply specify the package name as the last argument:
# Bump version for a specific package in a monorepo
bump pkg/x # Bumps patch version (e.g., pkg/x/v1.2.3 -> pkg/x/v1.2.4)
bump major pkg/x # Bumps major version (e.g., pkg/x/v1.2.3 -> pkg/x/v2.0.0)
bump minor pkg/x # Bumps minor version (e.g., pkg/x/v1.2.3 -> pkg/x/v1.3.0)
# Different packages in the same repo can have different versions
bump pkg/y # Works independently of pkg/x tags
bump services/api # Can use any prefix structure
bump major libs/utils # Works with all version parts
# You can also use the --prefix flag for backward compatibility
bump --prefix pkg/x # Same as: bump pkg/xThe package name is used exactly as provided - if you want pkg/x/foo/v1.0.0, use bump pkg/x/foo.
Example output:
$ bump major pkg/x
• on default branch: main
• no uncommitted changes
• no remote changes
• no unpushed changes
• no new remote tags
• bump tag pkg/x/v1.2.3 => pkg/x/v2.0.0
• tag pkg/x/v2.0.0 created
• tag pkg/x/v2.0.0 pushed- Automatically detects and increments from the latest git tag
- Validates that you're on a default branch (main, master, etc.)
- Checks for uncommitted local changes and ensures you're in sync with remote repository
- Detects and fetches new tags from the remote before bumping
- Creates and pushes git tags using semantic versioning
- Provides colorful terminal output with status indicators
- Support for brave mode to bypass warnings and continue operations
- Allows removing the latest tag with the
undocommand - Monorepo support with custom tag prefixes (e.g.,
pkg/name/vX.X.X)
