____ __ __ __ __ ____
( _ \( )( )( \/ )( _ \
) _ < )(__)( ) ( )___/
(____/(______)(_/\/\_)(__)
bump -> un-opinionated, dead-simple, automatic, versioning.
- Human readable
bump.toml, which can be modified - No regex, control your versions declaratively
- A version tracked
bump.tomlcan flex to the users needs. - DONE, 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/krakjn/bump/main/install/get_bump.sh | shWindows (PowerShell):
irm https://raw.githubusercontent.com/krakjn/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.
| v7 | v8 |
|---|---|
bump --major / --minor / --patch |
bump major / minor / patch |
bump --phase / bump --phase NAME |
bump phase / bump phase NAME |
bump --calendar |
bump calendar |
bump --prefix X / bump --suffix MODE |
bump meta --prefix X / bump meta --suffix MODE |
bump PATH --patch |
bump patch PATH |
bump gen -l LANG -o FILE |
bump emit LANG -o FILE |
init, tag, update, completion, bumpfile schema, and version assembly rules are unchanged in role.
All print variants write output without a trailing newline. Bare
bump(no subcommand) prints help.
# 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
# Conditional bump (monorepo): watches the directory containing BUMPFILE
bump patch --if-changed-from main lib/bump.toml
bump patch --if-changed-from HEAD~1 lib/bump.toml
# 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 metadata fields (extension point for future setters):
bump meta --prefix v2-
bump meta --suffix branch
bump meta --prefix v- --suffix git_sha- 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
# Language templates → files
bump emit c -o version.h [BUMPFILE]
bump emit go -o version.go [BUMPFILE]
bump emit java -o Version.java [BUMPFILE]
bump emit csharp -o Version.cs [BUMPFILE]
bump emit python -o version.py [BUMPFILE]
# Multiple files
bump emit c -o version.h -o include/version.h [BUMPFILE]
# Structured markup (json/toml/yaml): nested under version; --case ignored
bump emit json
bump emit toml -o version.toml
bump emit yaml
# Language/raw: --prefix and --case shape identifier names
bump emit c --prefix "MYLIB_" --case uppercase -o version.h
# → #define MYLIB_VERSION_STRING "…"
bump emit raw --prefix "app_" --case camel
# → app_versionString="…"Formats: raw, c, java, csharp, go, python, json, toml, yaml.
--case: snake | camel | pascal | uppercase (default) for language/raw identifiers; ignored for json/toml/yaml (always snake keys).
# 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: krakjn/bump@v8If your token differs from the default GITHUB_TOKEN:
- uses: krakjn/bump@v8
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