hatch-vcs
Hatch plugin for versioning with your preferred VCS
Decision gist · record as of 2026-08-14
Yes, if you use Hatch as your build backend and want VCS-based versioning. The plugin is stable, low-friction to install, and solves a real problem for projects that prefer tag-driven versioning. The 444-day release gap suggests it's mature rather than actively developed, but that's appropriate for a narrowly-scoped plugin. No known security issues.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires a Git or Mercurial repository with version tags; version detection will fail if no tags exist and no fallback-version is configured.
- Low install friction with only two runtime dependencies (hatchling and setuptools-scm).
- Last release was 444 days ago; maintenance status is aging but the package remains functional for its narrow purpose.
License · maintenance · safety
MIT (permissive) — MIT license permits commercial and private use with minimal restrictions—standard permissive terms suitable for most projects.
last release 2025-05-27 (444 days)
0 known vulnerabilities (OSV.dev, 2026-08-14) · 22,261,246 downloads/mo, #980 on PyPI
Alternatives
Verify before relying
# In pyproject.toml:
[build-system]
requires = ["hatchling", "hatch-vcs"]
build-backend = "hatchling.build"
[tool.hatch.version]
source = "vcs"
# Then use:
# hatch version (prints detected version)
# hatch build --hooks-only (writes version to file)- Whether the 444-day gap since last release indicates active maintenance or stable dormancy for a mature plugin.
- Compatibility with the latest Hatch versions and whether any breaking changes have occurred in setuptools-scm.
What it is and what it does
hatch-vcs is a Hatch build plugin that reads version information directly from your version control system (Git or Mercurial) instead of requiring manual version strings in your code. It integrates setuptools-scm as a version source and build hook, allowing you to define versions via VCS tags and automatically inject them into your package metadata and generated version files during build or install.
The plugin provides three integration points: a version source that reads tags to determine the current version, a build hook that generates a version file in your package, and a metadata hook (Git-only) that can inject commit hashes into package URLs. It's designed for projects already using Hatch as their build backend and eliminates the need to keep version strings synchronized across multiple files.
Use it for
- Automatically bump package version based on Git tags without editing pyproject.toml or version files.
- Generate a _version.py file during build containing the detected version for runtime introspection.
- Inject commit hash into package metadata URLs for traceability in release artifacts.
- Migrate from setuptools with setuptools_scm to Hatch while keeping VCS-based versioning.
- Ensure development builds have unique version strings that reflect commits since the last tag.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you use Hatch as your build backend and want VCS-based versioning.
The plugin is stable, low-friction to install, and solves a real problem for projects that prefer tag-driven versioning. The 444-day release gap suggests it's mature rather than actively developed, but that's appropriate for a narrowly-scoped plugin. No known security issues.
Install
hatch-vcs on PyPI
Before you install
Low install friction with only two runtime dependencies (hatchling and setuptools-scm). Last release was 444 days ago; maintenance status is aging but the package remains functional for its narrow purpose.
Requires a Git or Mercurial repository with version tags; version detection will fail if no tags exist and no fallback-version is configured.
License in practice
MIT license permits commercial and private use with minimal restrictions—standard permissive terms suitable for most projects.
Quickstart
# In pyproject.toml:
[build-system]
requires = ["hatchling", "hatch-vcs"]
build-backend = "hatchling.build"
[tool.hatch.version]
source = "vcs"
# Then use:
# hatch version (prints detected version)
# hatch build --hooks-only (writes version to file)
Verify before relying
- Whether the 444-day gap since last release indicates active maintenance or stable dormancy for a mature plugin.
- Compatibility with the latest Hatch versions and whether any breaking changes have occurred in setuptools-scm.
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.9 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 2 packageshatchlingsetuptools-scm |
| Maintenance | Aging 444 days since the last release |
| First released | |
| Downloads | 22,261,246 / month, #980 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 4 - BetaProgramming Language :: PythonProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPy |
Evidence: hatch_vcs-0.5.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “hatch version control plugin”
- hatch-vcsA Hatch plugin that automatically determines your project's version…
- hatch-regex-commitA Hatch plugin that automatically creates Git commits and tags when…
- versioningitAutomatically determines your Python package's version from Git or…
Give your agent the search over MCP, or paste the wish link into any chat.
More Build Tools packages
Provides reusable utilities for Python packaging interoperability, including version handling, specifiers, markers, requirements, tags, and metadata parsing according to standards like PEP 440 and PEP 425.
Wraps any iterable to display a real-time progress bar in the terminal or Jupyter notebook, showing iteration count, elapsed time, and estimated time remaining.
pip is the standard installer for Python packages, enabling you to download and install packages from the Python Package Index and other indexes into your Python environment.
Hatchling is a standards-compliant Python build backend that handles packaging, metadata, and distribution of Python projects when configured in a project's pyproject.toml file.
Generates Python gRPC service stubs and message classes from Protocol Buffer definitions, enabling developers to build gRPC clients and servers.
pre-commit is a framework for installing and running git hooks written in any language before commits are made, automating code quality and validation checks across multi-language projects.
Install it if your team needs consistent, automated validation at commit time.
See also hatch-nodejs-version · hatch-regex-commit · msgspec-click · uv-dynamic-versioning · vcs-versioning · versioningit · setuptools-scm-git-archive · hatch · Incremental · hatch_build_scripts