zerv flow is automated pre-release management: it generates meaningful versions from any
Git state without manual decisions. The version command gives you raw
control; flow layers opinionated, branch-driven logic on top of it.
Core principles
- Semantic state capture - Extract semantic meaning from ANY Git state (any branch, any commit, uncommitted changes)
- Multi-format output - Transform semantic meaning into various version formats with customizable format support
- semantic-release integration - Work with semantic release tools while providing fully automated pre-release versioning
- Build traceability - Include sufficient context to trace versions back to exact Git states
Version format
Full example:1.0.1-alpha.12345.post.3.dev.1729924622+feature.auth.1.f4a8b9c
Structure: <BASE>-<PRE_RELEASE>.<POST>[.<DEV>][+BUILD_CONTEXT]
1.0.1- Base version (semantic meaning from tags)alpha.12345- Pre-release type and branch identificationpost.3- Commits since reference point[.dev.timestamp]- Optional dev timestamp for uncommitted changes[+BUILD_CONTEXT]- Optional build context for traceability
<BASE>-<PRE_RELEASE>.<POST>[.<DEV>] contains all semantic
meaning needed to understand Git state. The build context [+BUILD_CONTEXT] is optional and
provides additional verbose information for easier interpretation and traceability.
Version variations:
- Tagged release:
1.0.1 - Tagged pre-release:
2.0.1-rc.1.post.2 - Branch from tagged release:
1.0.1-alpha.54321.post.1+feature.login.1.f4a8b9c - Branch from tagged pre-release:
2.0.1-alpha.98765.post.3+fix.auth.bug.1.c9d8e7f - Uncommitted changes:
2.0.1-alpha.98765.post.4.dev.1729924622+fix.auth.bug.1.c9d8e7f
Pre-release resolution
Default behavior: all branches start asalpha.<hash-id> (hash-based identification).
Configurable branch patterns: map specific branches to custom pre-release types (alpha,
beta, rc) with optional numbers:
- Example:
feature/user-authbranch →beta.12345(label only, uses hash-based number) - Example:
developbranch →beta.1(label and custom number for stable branches) - Any branch can be mapped to any pre-release type with hash-based or custom numbers
- Example:
release/1/feature-auth-fix→rc.1(extracts number from branch pattern) - Simplified GitFlow-inspired naming conventions
main, master → no pre-release (clean releases).
Post-release resolution
Configurable post representation with two options:- Tag distance (default): count commits from the last tag
- Commit distance: count commits from the branch creation point
post.0: exactly on reference point (no commits since)post.N: N commits since reference point- Consistent across all branch types (alpha, beta, rc, etc.)
Workflow examples
These diagrams show how flow behaves across branching strategies. To keep them readable, build context is omitted from version strings; dirty state (.dev.timestamp) is shown where
relevant.
A commit shown as 1.0.1-alpha.12345.post.3.dev.1729924622 here reads
1.0.1-alpha.12345.post.3.dev.1729924622+feature.user-auth.3.a1b2c3d with build context
enabled.
Trunk-based development
Complex trunk-based workflow with parallel features, nested branches, and synchronization. Scenario: development fromv1.0.0 with parallel feature branches, synchronization, and
nested development.
Key behaviors demonstrated:
- Parallel development:
feature-1andfeature-2get unique hash IDs (42954,68031) - Version progression: base version updates when syncing (
1.0.1→1.0.2) - Dirty state: uncommitted changes show
.dev.timestampsuffix - Nested branches:
feature-3branches fromfeature-2with independent versioning - Clean releases: main branch maintains semantic versions on merges
GitFlow
GitFlow methodology with proper pre-release type mapping and merge patterns. Scenario: main branch withv1.0.0, develop branch integration, feature development,
hotfix emergency flow, and release preparation.
Key behaviors demonstrated:
- Beta pre-releases: develop branch uses
betafor integration builds - Alpha pre-releases: feature branches use
alphawith hash-based identification - RC pre-releases: release branches use
rcfor release candidates - Clean releases: main branch maintains clean versions without pre-release suffixes
- Hotfix flow: emergency fixes from main with proper version propagation
- Branch synchronization: develop branch syncs with main releases
Complex release management
Release branch scenarios including branch abandonment and cascading release preparation. Scenario: main branch withv1.0.0, release branch preparation with critical issues
leading to abandonment, and selective branch creation for successful release.
Version progression details:
- release/1:
1.0.1-rc.1.post.1→1.0.1-rc.1.post.2→1.0.1-rc.1.post.3(abandoned) - release/2: created from
release/1’s second commit (1.0.1-rc.1.post.2), continues as1.0.1-rc.2.post.3→1.0.1-rc.2.post.4 - Main: clean progression
1.0.0→1.1.0(only from the successfulrelease/2merge)
- Branch isolation: each release branch maintains independent versioning regardless of parent/child relationships
- Selective branching: flow correctly handles branches created from specific historical commits
- Abandonment handling: unmerged branches don’t affect final release versions on main
- Cascade management: complex branching scenarios where releases feed into other releases are handled transparently
- Clean main branch: main only receives versions from successfully merged releases, maintaining clean semantic versioning
Where to go next
- Flow CLI - schema presets,
--branch-rules, and override flags - Schema system - what
core,extra_core, andbuildmean - Why zerv - how flow differs from release automation