Registry / devops / hatch-regex-commit

hatch-regex-commit

JSON →
library0.0.4pypypiunverified

A Hatch plugin that automatically creates a Git commit and tag when bumping the project version using the `hatch version` command. It uses a regex to determine the version string. Version 0.0.4, last released in December 2021; the project appears to be in maintenance mode with no recent updates.

pip install hatch-regex-commit
INSTALL
IMPORT
SIG · HATCH-REGEX-COMMIT
H
hatch-regex-commit
devopspythonv0.0.4
Install
2.0s avg
Import
Disk
19MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.0.4 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 20.5MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 2.0s · import 0.000s · 21MB
19MB installed
● package 19MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

HatchRegexCommitPlugin
from hatch_regex_commit import HatchRegexCommitPlugin
from hatch_regex_commit.plugin import HatchRegexCommitPlugin

Configure hatch-regex-commit in pyproject.toml and use `hatch version <bump>` to commit and tag automatically.

# pyproject.toml [build-system] requires = ["hatchling", "hatch-regex-commit"] build-backend = "hatchling.build" [tool.hatch.envs.default] [tool.hatch.version] source = "regex" path = "src/my_package/__init__.py" pattern = "__version__ = ['\"](?P<version>[^'\"]+)['\"]" # Run: hatch version patch # This will bump the version, commit, and tag.
Debug
Known issues
breakingThis plugin requires Hatch >=1.0.0. Older Hatch versions (pre-1.0) have a different plugin API and will not work.
fix
Upgrade Hatch to >=1.0.0 with `pip install --upgrade hatch`.
affects: hatch <1.0.0
gotchaThe regex pattern MUST contain a named group `(?P<version>...)`; otherwise, the plugin will fail to extract the version.
fix
Ensure your pattern includes `(?P<version>...)` exactly as shown in the quickstart.
affects: all
gotchaThe plugin automatically commits and tags. It does not ask for confirmation. Running `hatch version` in a dirty working tree will commit all staged and unstaged changes.
fix
Always ensure your working tree is clean or use `git stash` before bumping.
affects: all
Upgrade
Version history
0.0.4latest on PyPI · released Sep 29, 2025
Audit
Dependencies
hatchrequiredRequired plugin host; must be installed separately (version >=1.0.0)
GitrequiredRequires git to be installed and available in PATH
Agent activity
12 hits · last 30 days
node
12
Resources
hatch-regex-commit — pip install hatch-regex-commit · libregistry