Format conversion
Templates
Render through a Tera template for custom output:Prefixes
Options
Where to go next
- Formats and templates - the template language reference
zerv check- validate instead of convert
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Parse a version string and render it. Format conversion between SemVer and PEP440, plus templates and prefixes.
zerv render [OPTIONS] <VERSION>
# Convert SemVer to PEP440
zerv render "1.2.3-alpha.1" --output-format pep440
# 1.2.3a1
# Convert PEP440 to SemVer
zerv render "1.2.3b2" --input-format pep440 --output-format semver
# 1.2.3-beta.2
# Auto-detect input format
zerv render "1.2.3a1" --output-format semver
# 1.2.3-alpha.1
# Custom format
zerv render "1.2.3" --output-template "v{{major}}.{{minor}}"
# v1.2
# With pre-release
zerv render "2.0.0-beta.2" --output-template "{{major}}.{{minor}}.{{patch}}-{{pre_release.label}}"
# 2.0.0-beta
zerv render "1.2.3" --output-prefix "v"
# v1.2.3
| Option | Description |
|---|---|
-f, --input-format <FORMAT> | auto (default), semver, pep440, or zerv |
--output-format <FORMAT> | Output format: semver, pep440, or zerv |
--output-template <TEMPLATE> | Tera template; conflicts with --output-prefix |
--output-prefix <PREFIX> | Prefix prepended to the rendered version |
zerv check - validate instead of convert