About

Bump is a lightweight command-line tool that helps you manage semantic versioning tags in Git repositories. It automates version increments following SemVer standards, making it easy to maintain proper versioning in your projects.

terminal
$ 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 pushed

Installation

Using Homebrew

brew tap flaticols/apps
brew install flaticols/apps/bump

Using Go

go install github.com/flaticols/bump@latest

Usage

Bump follows semantic versioning principles, allowing you to easily increment the major, minor, or patch version of your project.

bump          # Bumps patch version (e.g., 1.2.3 -> 1.2.4)
bump major    # Bumps major version (e.g., 1.2.3 -> 2.0.0)
bump minor    # Bumps minor version (e.g., 1.2.3 -> 1.3.0)
bump patch    # Bumps patch version (e.g., 1.2.3 -> 1.2.4)
bump undo     # Removes the last version tag

Options

--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)
--version        Print version information

Commands

Bump includes the following commands:

bump [major|minor|patch]   # Main command to increment version (defaults to patch)
bump undo                  # Removes the most recently created version tag

Features

Auto-Detection

Automatically detects and increments from the latest git tag.

Branch Validation

Validates that you're on a default branch (main, master, etc.).

Change Detection

Checks for uncommitted local changes and remote synchronization.

Automatic Pushing

Creates and pushes git tags using semantic versioning.

Version Rollback

Easily remove the most recent version tag when needed.

Colorful Output

Provides visually appealing and clear terminal feedback with status indicators.

Tag Sync

Automatically detects and fetches new tags from remote before performing operations.

Brave Mode

Bypass warnings and continue operations with the brave flag for advanced users.

Examples

Standard Version Bumping

Increment the patch version number:

$ 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 pushed

Major Version for Breaking Changes

Increment the major version for breaking changes:

$ bump major
• on default branch: main
• no uncommitted changes
• no remote changes
• no unpushed changes
• no new remote tags
• bump tag v1.2.3 => v2.0.0
• tag v2.0.0 created
• tag v2.0.0 pushed

Minor Version for New Features

Increment the minor version for new features:

$ bump minor
• on default branch: main
• no uncommitted changes
• no remote changes
• no unpushed changes
• no new remote tags
• bump tag v1.2.3 => v1.3.0
• tag v1.3.0 created
• tag v1.3.0 pushed

Using a Different Repository

Specify a different repository path:

$ bump --repo=/path/to/repo minor
• working directory: /path/to/repo
• on default branch: main
• no uncommitted changes
• no remote changes
• no unpushed changes
• no new remote tags
• bump tag v1.2.3 => v1.3.0
• tag v1.3.0 created
• tag v1.3.0 pushed

Undoing Last Version

Remove the most recently created version tag:

$ bump undo
Are you sure? [Y/n] Y
• removing tag v1.2.4
• local tag removed
• remote tag removed

Using Brave Mode

Skip all confirmation prompts with brave mode:

$ bump undo --brave
• brave mode enabled, ignoring warnings and errors
• removing tag v1.2.4
• local tag removed
• remote tag removed

Local Repository

Work with a repository without remotes:

$ bump --local
• on default branch: main
• no uncommitted changes
• no unpushed changes
• bump tag v1.2.3 => v1.2.4
• tag v1.2.4 created

Fetching New Remote Tags

Automatically fetch new tags from remote:

$ bump
• on default branch: main
• no uncommitted changes
• no remote changes
• no unpushed changes
• remote has new tags, fetching tags first
• tags fetched successfully
• bump tag v1.2.3 => v1.2.4
• tag v1.2.4 created
• tag v1.2.4 pushed

Changelog

Track the development progress of Bump. For a full changelog, visit CHANGELOG.md on GitHub.

v0.0.7 March 29, 2025
Added Implementation of full semver spec v2.
Fixed Improvement of latest semver teg detection (thanks to @emicklei)
v0.0.6 March 27, 2025
Added
  • Improved help documentation with examples and better descriptions
  • Version increment arguments (major, minor, patch) now visible in help text
  • Added CHANGELOG.md to track version history
  • Added Changelog section to documentation website
Changed
  • Better command usage descriptions in help text
  • Example commands now more clearly show their purpose
  • Updated undo command documentation with usage examples
v0.0.5 March 20, 2025
Added
  • New HasRemoteUnfetchedTags() function to detect and fetch new tags from remote repositories
  • Automatic tag fetching from remote before performing operations
  • "Brave mode" flag (--brave, -b) to bypass warnings and continue operations
  • Improved error handling with consistent exit behavior
Changed
  • Updated output format to use bullet points (•) instead of symbols (✓, ⚠, ✗)
  • Revised documentation with new output examples
  • Updated README and HTML documentation to reflect the new features and output format
  • Improved messaging for tag operations
Fixed
  • Better handling of repositories without remotes
  • Consistent error messaging
v0.0.4 March 15, 2025
Added
  • Initial public release
  • Basic semantic versioning command-line functionality
  • Support for major, minor, and patch version bumping
  • Tag creation and pushing to remote repositories
  • Undo command for removing the latest tag
  • Validation for repository state before operations