> ## Documentation Index
> Fetch the complete documentation index at: https://zerv.wisl.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# zerv render

> Parse a version string and render it. Format conversion between SemVer and PEP440, plus templates and prefixes.

```bash theme={null}
zerv render [OPTIONS] <VERSION>
```

Parse an existing version string and render it. Useful for converting between formats,
normalizing, and reshaping versions produced by other tools.

## Format conversion

```bash theme={null}
# 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
```

## Templates

Render through a [Tera template](/concepts/formats-and-templates) for custom output:

```bash theme={null}
# 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
```

## Prefixes

```bash theme={null}
zerv render "1.2.3" --output-prefix "v"
# v1.2.3
```

## Options

| 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        |

## Where to go next

* [Formats and templates](/concepts/formats-and-templates) - the template language reference
* [`zerv check`](/cli/check) - validate instead of convert
