skillfed

hatch-regex-commit

Hatch plugin to create a commit and tag when bumping version

hatch-regex-commit v0.0.4 91.3K downloads/30d#13,525 on PyPI11
Permissive license MIT AGING released

What it is and what it does

hatch-regex-commit is a Hatch build-system plugin that extends Hatch's version-bumping workflow to automatically create Git commits and tags. It inherits from Hatch's built-in regex version source, allowing you to bump versions stored in source files (like `__about__.py`) while simultaneously creating corresponding Git artifacts. The plugin runs during the version-bump operation and can be configured to customize commit messages, tag names, tag signing, and other Git options.

You install it as a build-system dependency in `pyproject.toml`, configure it in your Hatch version settings, and then use standard Hatch version commands (e.g., `hatch version patch`). The plugin checks for uncommitted changes by default, creates a commit with a templated message, and optionally signs and tags the commit—all in one operation. It's designed for teams that want version control and release artifacts to stay in sync without manual Git commands.

Use it for:

  • Automate release workflows where version bumps must be immediately committed and tagged in Git.
  • Enforce clean repository state before version changes to prevent accidental partial commits.
  • Customize commit and tag messages with project-specific templates or emoji conventions.
  • Sign Git tags automatically during version bumps for cryptographic release verification.
  • Integrate version management into CI/CD pipelines that rely on Git tags for deployment triggers.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

A Hatch plugin that automatically creates Git commits and tags when you bump your project's version using regex-based version sources.

Yes, if you use Hatch and want to eliminate manual Git commits and tags during version bumps. The plugin is stable enough for production (Beta status, no known vulnerabilities), has low install friction, and solves a real workflow problem. The aging maintenance status (319 days since last release) is a minor concern but not a blocker—the repository is not archived and the plugin's scope is narrow. Install it if your release process would benefit from automated Git integration; skip it if you prefer manual control or use a different version-management approach.

Install

hatch-regex-commit on PyPI

pip

pip install hatch-regex-commit

uv

uv add hatch-regex-commit

poetry

poetry add hatch-regex-commit

Installing hatch-regex-commit

Before you install

Low install friction; depends only on hatchling. Maintenance status is aging—last release was 319 days ago, though the repository remains active and the project is in Beta development status.

License in practice

MIT license permits unrestricted use, modification, and distribution with minimal obligations—suitable for both open-source and commercial projects.

Quickstart

# Add to pyproject.toml
[build-system]
requires = ["hatchling", "hatch-regex-commit"]
build-backend = "hatchling.build"

[tool.hatch.version]
source = "regex_commit"
path = "my_library/__about__.py"

# Then run: hatch version patch

Requires Git to be installed and your project to be in a Git repository; the plugin will abort if the repository has uncommitted changes (configurable via check_dirty option).

Verify before relying

  • Whether the plugin works with all Hatch versions or has specific version constraints beyond what the fact sheet indicates.
  • Performance impact or any known issues when used with large repositories or frequent version bumps.
  • Compatibility with CI/CD systems and whether GPG signing of tags works reliably across different environments.

Package facts

License MIT (permissive)
Python support supports the current Python release (>=3.7)
Install friction low — pure-Python wheel
Runtime dependencies 1 — hatchling
Maintenance aging — 319 days since the last release
Last repo commit
First released
Downloads 91,309/month — #13,525 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: hatch_regex_commit-0.0.4-py3-none-any.whl

Development Status :: 4 - BetaFramework :: HatchProgramming Language :: PythonProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPy

Tags

hatch version bump git commitautomatic git tagging on releasehatch plugin version controlgit commit tag automationversion bumping with git integrationhatch build system pluginrelease automation hatch
hatch-pluginrelease-automationgit-integration

More Build Tools packages