GitVersioned¶
Opinionated compliance-first versioning automation for Git repositories. Enforces CI/User authority and generates rich metadata. Supports Python, Rust (Maturin), Docker/OCI, and multi-file version synchronization via declarative overrides. Powered by a flexible CLI, programmatic API, and native build backend integrations.
Overview¶
What's Included¶
Getting Started
Installation guide, quick start tutorial, and common workflow walkthroughs.
Guides
Step-by-step guides for common tasks, integrations, and configuration patterns.
Security
Our security policy, responsible disclosure process, and supported versions.
Quick Install¶
GitVersioned supports multiple integration paths. Select your preferred method to get started:
```toml
[build-system]
requires = ["hatchling", "gitversioned"]
build-backend = "hatchling.build"
[tool.hatch.version]
source = "gitversioned"
```
```toml
[build-system]
requires = ["setuptools>=64.0", "gitversioned"]
build-backend = "setuptools.build_meta"
[project]
dynamic = ["version"]
```
```toml
[build-system]
requires = ["maturin>=1.0,<2.0", "gitversioned"]
build-backend = "gitversioned.plugins.maturin_plugin"
[project]
dynamic = ["version"]
```
```bash
pip install gitversioned
# Preview version string
gitversioned calculate
# Write version and all overrides in-place
gitversioned write
```
```toml
# pyproject.toml
[tool.gitversioned]
output = "src/package/version.py"
[tool.gitversioned.overrides.cargo]
output = "Cargo.toml"
output_strategies = { type = "regex", pattern = 'version = "(?P<version>.*?)"' }
[tool.gitversioned.overrides.docker]
output = "Dockerfile"
output_strategies = { type = "regex", pattern = 'ARG VERSION="(?P<version>.*?)"' }
```
For advanced options, archive support, and step-by-step onboarding, see the Installation Guide and the Quick Start Guide.