Skip to main content

Version+

Python tests

The + / ++ / +++ release tool. Version+ keeps version strings in sync and can commit, tag, and push a release—all with one short command.

$ version +       # 1.2.3 -> 1.2.4
$ version ++      # 1.2.3 -> 1.3.0
$ version +++     # 1.2.3 -> 2.0.0

Get started in four commands:

$ uv tool install version-plus
$ version init
$ version ++ --dry
$ version ++

version init detects common project metadata and creates .version.yml. --dry previews the complete release without modifying files, creating commits or tags, or pushing anything.

Why Version+?

Version+ is designed for projects that store their version in more than one place and want a simple, explicit local release workflow.

  • Update any number of files using named regular expressions and glob patterns.
  • Verify that all configured files contain the same version before releasing.
  • Set an exact version or increment patch, minor, or major with + notation.
  • Optionally update changelogs from Git commits.
  • Commit, tag, and push from the same command.
  • Preview everything safely with --dry.

It is intentionally Git-focused and configuration-driven. There is no required commit convention, plugin system, or hosted service unless you enable optional changelog generation.

If you want... Version+ gives you...
A memorable release command + for patch, ++ for minor, +++ for major
One version across different stacks Regex and glob matching for any text file
A safe local workflow Consistency checks, dirty-tree protection, and --dry
Git release automation Optional commit, annotated tag, and push

Installation

Install Version+ as an isolated command-line tool:

$ uv tool install version-plus

or:

$ pipx install version-plus

The distribution is named version-plus; the command remains the pleasantly short version. The version distribution on PyPI belongs to an unrelated project.

To install the latest development version directly from GitHub:

$ uv tool install git+https://github.com/Salamek/version.git

You can also install it from the project package repositories.

Debian and derivatives

$ wget -O- https://repository.salamek.cz/deb/salamek.gpg.key | sudo apt-key add -
$ echo "deb https://repository.salamek.cz/deb/pub all main" | sudo tee /etc/apt/sources.list.d/salamek.cz.list
$ sudo apt update
$ sudo apt install version

Arch Linux

Add the repository to /etc/pacman.conf:

[salamek]
Server = https://repository.salamek.cz/arch/pub
SigLevel = Optional

Then install Version+:

$ sudo pacman -Sy version

Quick start

From the root of your project, detect common version files and create .version.yml:

$ version init
Created /path/to/project/.version.yml
Review it, then preview your first release with `version + --dry`.

Version+ recognizes version fields in pyproject.toml, Cargo.toml, package.json, setup.py, and Chart.yaml, plus Python __version__ assignments in conventional version modules. It will stop if the discovered files contain different versions, and it never replaces an existing configuration unless you pass --force.

The generated configuration commits and tags releases but leaves automatic pushing disabled. Review it before your first release:

GIT:
  AUTO_COMMIT: true
  AUTO_TAG: true
  AUTO_PUSH: false
  COMMIT_MESSAGE: "Release {version}"

REGEXPS:
  python: '__version__\s*=\s*"(?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)"'
  package: 'pkgver\s*=\s*(?P<version>.*)'

VERSION_FILES:
  version/__init__.py: python
  archlinux/PKGBUILD: package

You can also create this file manually. Only REGEXPS and VERSION_FILES are required. For backward compatibility, omitted Git actions default to enabled; generated configurations set AUTO_PUSH to false explicitly.

Check that all configured files agree:

$ version
Current version is 1.2.3

Preview and release a minor version:

$ version ++ --dry
$ version ++

Version+ displays the planned version and enabled Git actions before asking for confirmation.

Commands

Show the current project version:

$ version
$ version status

Set an exact version:

$ version 2.1.0
$ version mark 2.1.0

Increment a version component:

Command Result from 1.2.3
version + 1.2.4
version ++ 1.3.0
version +++ 2.0.0
version +10 1.2.13
version ++2 1.4.0
version +++2 3.0.0

Useful options:

Option Purpose
init Detect common version files and create .version.yml
--dry Preview without changing files or Git state
-y, --all_yes Skip the confirmation prompt
-f, --force Allow a dirty worktree or a non-increasing version
-p DIR, --project_dir=DIR Operate on another project directory
-c FILE, --config_file=FILE Use another configuration file

Run version --help for the complete CLI reference.

Configuration reference

GIT:
  # Add version and changelog files to a release commit.
  AUTO_COMMIT: true

  # Create an annotated tag named after the new version.
  AUTO_TAG: true

  # Push the commit and tag. Use false to disable, true for origin,
  # or a remote name such as upstream.
  AUTO_PUSH: true

  COMMIT_MESSAGE: "New version {version}"

  # Required only when CHANGE_LOGS is configured.
  COMMIT_PARSER: "version.commit_parser.Sematic:Sematic"

REGEXPS:
  python: '__version__\s*=\s*"(?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)"'
  package: 'pkgver\s*=\s*(?P<version>.*)'

VERSION_FILES:
  version/__init__.py: python
  archlinux/PKGBUILD: package

CHANGE_LOGS:
  CHANGELOG.md:
    generator: version.change_log.Debian
    types: [fix, feat]
    arguments:
      project_name: example-project
      stability: unstable
      urgency: medium

Each regular expression must expose either:

  • a version named group containing the complete version; or
  • major, minor, and optional patch, prerelease, and prerelease_num named groups.

VERSION_FILES maps file paths or recursive glob patterns to regular-expression names.

Changelog generation

Changelog generation is optional. When configured, Version+ parses Git commits between releases and passes them to the selected generator.

$ version changelog info
$ version changelog generate 1.2.3 1.3.0 --dry

Development

Run the tests with:

$ python -m pip install . pytest
$ python -m pytest

Build distributable packages with:

$ python -m pip install build
$ python -m build

Mirrors

The project is also mirrored at https://gitlab.com/Salamek/version.

Version+ is licensed under GPL-3.0.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

version_plus-1.7.1.tar.gz (34.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

version_plus-1.7.1-py3-none-any.whl (33.9 kB view details)

Uploaded Python 3

File details

Details for the file version_plus-1.7.1.tar.gz.

File metadata

  • Download URL: version_plus-1.7.1.tar.gz
  • Upload date:
  • Size: 34.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for version_plus-1.7.1.tar.gz
Algorithm Hash digest
SHA256 7b9eff6a252ebaf508aa8a216db21e676dd395a0d5bb8dfd01efc6d1b87ce517
MD5 a15b66ac9bc4c6a081f258379362e0fd
BLAKE2b-256 ca14fdf839aee0aeee06a568dfe43a93fd20c7a0fa6afc685b6b886876c6329c

See more details on using hashes here.

Provenance

The following attestation bundles were made for version_plus-1.7.1.tar.gz:

Publisher: release.yml on Salamek/version-plus

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file version_plus-1.7.1-py3-none-any.whl.

File metadata

  • Download URL: version_plus-1.7.1-py3-none-any.whl
  • Upload date:
  • Size: 33.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for version_plus-1.7.1-py3-none-any.whl
Algorithm Hash digest
SHA256 27ea9045684c15196ce640a46f1a3059eab6a4fdcf106eefd4c6f910ef425dda
MD5 618defc0987fa1673501125069537248
BLAKE2b-256 097da1191eb0c2a902c3045f66f23e48943e05d853fed0dea68c29193eeac570

See more details on using hashes here.

Provenance

The following attestation bundles were made for version_plus-1.7.1-py3-none-any.whl:

Publisher: release.yml on Salamek/version-plus

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page