____ __ __ __ __ ____
( _ \( )( )( \/ )( _ \
) _ < )(__)( ) ( )___/
(____/(______)(_/\/\_)(__)
An un-opinionated command-line tool for SemVer and CalVer management with TOML-based configuration and multi-language code generation. No assumption is made β you
bumpwhen you want, how you want.
- A regex-less way to do versioning π
- Human/Machine readable
bump.toml - Flexible for your needs
- Then stop thinking about versioning!
I got tired of bespoke scripts and tons of regex parsing that differentiated slightly from repo to repo just to bump versions. So I created bump to be dead simple and without opinion. Everyone wants to version differently and that's okay β with a sprinkling of convention and a large helping of automation this tool allows you to never have to worry about versions again!
Linux, macOS, or WSL:
curl -fsSL https://raw.githubusercontent.com/launchfirestorm/bump/main/install/get_bump.sh | shWindows (PowerShell):
irm https://raw.githubusercontent.com/launchfirestorm/bump/main/install/get_bump.ps1 | iexbump initThis creates a BUMPFILE (default bump.toml) in your current directory with sensible defaults. You can rename it to whatever you like.
To use CalVer, set mode = "calver" under [base] in your bumpfile.
Often the hard part is getting the version into other tools. All
# Default print ([prefix][base][phase])
bump print [BUMPFILE]
bump p [BUMPFILE] # alias
# Print variants
bump print --only-prefix [BUMPFILE]
bump print --only-phase [BUMPFILE]
bump print --only-base [BUMPFILE]
bump print --no-prefix [BUMPFILE]
bump print --no-phase [BUMPFILE]
bump print --with-suffix [BUMPFILE]
bump print --with-timestamp [BUMPFILE]
bump print --with-label DEV [BUMPFILE]
bump print --full [BUMPFILE]
# Stackable (e.g. omit prefix and include suffix)
bump print --no-prefix --with-suffix [BUMPFILE]Suffix output (--with-suffix, --full) requires a git repository.
# Bump version numbers (updates BUMPFILE)
bump --major # 1.0.0 -> 2.0.0, clears phase
bump --minor # 1.0.0 -> 1.1.0, clears phase
bump --patch # 1.0.0 -> 1.0.1, clears phase
# Phase workflow
bump --phase alpha # 1.1.0 -> 1.1.0-alpha.1
bump --phase # increment phase distance, e.g. 1.1.0-alpha.2
bump --phase beta # switch phase, e.g. 1.1.0-beta.1# Set [base].mode = "calver" in BUMPFILE, then:
bump --calendar [BUMPFILE] # Updates to current date (e.g., 2026.02.25)
# Same-day bumps automatically increment phase distanceUpdate bumpfile fields without a formal version bump:
bump --prefix v2-
bump --suffix branch- If
mode = "semver"and keys likeyear/month/dayare found, bump prints a warning and rewrites keys asmajor/minor/patchon save. - If
mode = "calver"and keys likemajor/minor/patchare found, bump rewrites keys asyear/month/dayon save.
PRO TIP: Add generated version files to .gitignore to avoid "behind by one" issues
# Generate version files for different languages
bump gen --lang c --output version.h [BUMPFILE]
bump gen --lang go --output version.go [BUMPFILE]
bump gen --lang java --output Version.java [BUMPFILE]
bump gen --lang csharp --output Version.cs [BUMPFILE]
bump gen --lang python --output version.py [BUMPFILE]
# Generate multiple files at once
bump gen --lang c --output version.h --output include/version.h [BUMPFILE]
# Use custom bumpfile
bump gen --lang c --output version.h custom.toml
# SemVer generates: VERSION, VERSION_MAJOR, VERSION_MINOR, VERSION_PATCH, etc.
# CalVer generates: VERSION_STRING only (simplified for date-based versions)# Create a git annotated tag (git tag -a) for the current version (conventional commit message by default)
bump tag [BUMPFILE]
# Create a tag with custom message
bump tag -m "Custom message" [BUMPFILE]Currently supports
Cargo.tomlandpyproject.tomlβ send a PR for additional file format conventions!
bump update Cargo.toml [BUMPFILE]
bump update pyproject.toml [BUMPFILE]The composite action action.yml at the repo root installs bump for the job's OS/arch:
- uses: launchfirestorm/bump@v7If your token differs from the default GITHUB_TOKEN:
- uses: launchfirestorm/bump@v7
with:
token: ${{ secrets.YOUR_TOKEN_HERE }}you can inject bump everywhere
sed -i "s|REPLACE_ME|$(bump print --no-prefix)|g" somefile# CMakeLists.txt
execute_process(
COMMAND bump print --only-base
WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/
OUTPUT_VARIABLE VERSION)
project("your-app" VERSION ${VERSION} LANGUAGES CXX C)bump completion SHELL prints a completion script for the given shell. Regenerate after upgrading bump so completions stay in sync with new flags and subcommands.
Supported shells: bash, elvish, fish, powershell, zsh.
Bash:
bump completion bash >> ~/.bash_completion.d/bump
# or load once in the current session:
source <(bump completion bash)Zsh:
mkdir -p ~/.zsh/completions
bump completion zsh > ~/.zsh/completions/_bump
# add to ~/.zshrc if needed: fpath=(~/.zsh/completions $fpath); autoload -Uz compinit && compinitFish:
bump completion fish > ~/.config/fish/completions/bump.fishPowerShell:
bump completion powershell | Out-String | Invoke-Expression
# or append to your profile:
Add-Content $PROFILE 'bump completion powershell | Out-String | Invoke-Expression'- Configuration Reference β bumpfile schema, print flags, and mode behavior
- Workflow Guide β release pipelines, phases, labels, and CI examples
- Contributing Guide β build from source, run integration tests, and project layout