Scroll to navigation

DUNAMAI(1) Dunamai DUNAMAI(1)

NAME

dunamai

SYNOPSIS

dunamai [-h] {from,check} ...

DESCRIPTION

Generate dynamic versions

POSITIONAL ARGUMENTS

dunamai from

Generate version from a particular VCS

usage: dunamai from [-h]
{any,git,mercurial,darcs,subversion,bazaar,fossil,pijul}
...

Generate version from a particular VCS

dunamai from any

Generate version from any detected VCS

usage: dunamai from any [-h] [--metadata] [--no-metadata] [--dirty]
[--ignore-untracked] [--tagged-metadata]
[--pattern PATTERN] [--pattern-prefix PATTERN_PREFIX]
[--format FORMAT] [--style {pep440,semver,pvp}]
[--latest-tag] [--strict] [--path PATH] [--debug]
[--bump] [--full-commit]
[--commit-length COMMIT_LENGTH]
[--commit-prefix COMMIT_PREFIX]
[--escape-with ESCAPE_WITH] [--tag-branch TAG_BRANCH]
[--tag-dir TAG_DIR]

Generate version from any detected VCS

options:

Always include metadata. Ignored when --format is used

Never include metadata. Ignored when --format is used

Include dirty flag if applicable. Ignored when --format is used

Ignore untracked files when determining whether the repository is dirty (only: Git)

Include tagged metadata if applicable. Ignored when --format is used

Regular expression matched against the version source. This must contain one capture group named `base` corresponding to the release segment of the source. Optionally, it may contain another two groups named `stage` and `revision` corresponding to a prerelease type (such as 'alpha' or 'rc') and number (such as in 'alpha-2' or 'rc3'). It may also contain a group named `tagged_metadata` corresponding to extra metadata after the main part of the version (typically after a plus sign). There may also be a group named `epoch` for the PEP 440 concept. If the `base` group is not present, then instead this will be interpreted as a named preset, which may be one of the following: `default`, `default-unprefixed`

Insert this after the pattern's start anchor (`^`).

Custom output format. Available substitutions: {base}, {stage}, {revision}, {distance}, {commit}, {dirty}, {tagged_metadata}, {epoch}, {branch}, {branch_escaped}, {timestamp}, {major}, {minor}, {patch}

Preconfigured output format. Will default to PEP 440 if not set and no custom format given. If you specify both a style and a custom format, then the format will be validated against the style's rules

Only inspect the latest tag on the latest tagged commit for a pattern match

Elevate warnings to errors. When there are no tags, fail instead of falling back to 0.0.0

Directory to inspect, if not the current working directory

Display additional information on stderr for troubleshooting

Increment the last part of the version `base` by 1, unless the `stage` is set, in which case increment the `revision` by 1 or set it to a default of 2 if there was no `revision` Does nothing when on a commit with a version tag.

Get the full commit hash instead of the short form (only: Git, Mercurial)

Use this many characters from the start of the full commit hash

Add this prefix when serializing commit IDs

When escaping, replace with this substitution. The default is simply to remove invalid characters.

Branch on which to find tags, if different than the current branch (only: Git)

Location of tags relative to the root (only: Subversion)

dunamai from git

Generate version from Git

usage: dunamai from git [-h] [--metadata] [--no-metadata] [--dirty]
[--ignore-untracked] [--tagged-metadata]
[--pattern PATTERN] [--pattern-prefix PATTERN_PREFIX]
[--format FORMAT] [--style {pep440,semver,pvp}]
[--latest-tag] [--strict] [--path PATH] [--debug]
[--bump] [--full-commit]
[--commit-length COMMIT_LENGTH]
[--commit-prefix COMMIT_PREFIX]
[--escape-with ESCAPE_WITH] [--tag-branch TAG_BRANCH]

Generate version from Git

options:

Always include metadata. Ignored when --format is used

Never include metadata. Ignored when --format is used

Include dirty flag if applicable. Ignored when --format is used

Ignore untracked files when determining whether the repository is dirty (only: Git)

Include tagged metadata if applicable. Ignored when --format is used

Regular expression matched against the version source. This must contain one capture group named `base` corresponding to the release segment of the source. Optionally, it may contain another two groups named `stage` and `revision` corresponding to a prerelease type (such as 'alpha' or 'rc') and number (such as in 'alpha-2' or 'rc3'). It may also contain a group named `tagged_metadata` corresponding to extra metadata after the main part of the version (typically after a plus sign). There may also be a group named `epoch` for the PEP 440 concept. If the `base` group is not present, then instead this will be interpreted as a named preset, which may be one of the following: `default`, `default-unprefixed`

Insert this after the pattern's start anchor (`^`).

Custom output format. Available substitutions: {base}, {stage}, {revision}, {distance}, {commit}, {dirty}, {tagged_metadata}, {epoch}, {branch}, {branch_escaped}, {timestamp}, {major}, {minor}, {patch}

Preconfigured output format. Will default to PEP 440 if not set and no custom format given. If you specify both a style and a custom format, then the format will be validated against the style's rules

Only inspect the latest tag on the latest tagged commit for a pattern match

Elevate warnings to errors. When there are no tags, fail instead of falling back to 0.0.0

Directory to inspect, if not the current working directory

Display additional information on stderr for troubleshooting

Increment the last part of the version `base` by 1, unless the `stage` is set, in which case increment the `revision` by 1 or set it to a default of 2 if there was no `revision` Does nothing when on a commit with a version tag.

Get the full commit hash instead of the short form (only: Git, Mercurial)

Use this many characters from the start of the full commit hash

Add this prefix when serializing commit IDs

When escaping, replace with this substitution. The default is simply to remove invalid characters.

Branch on which to find tags, if different than the current branch (only: Git)

dunamai from mercurial

Generate version from Mercurial

usage: dunamai from mercurial [-h] [--metadata] [--no-metadata] [--dirty]
[--tagged-metadata] [--pattern PATTERN]
[--pattern-prefix PATTERN_PREFIX]
[--format FORMAT] [--style {pep440,semver,pvp}]
[--latest-tag] [--strict] [--path PATH]
[--debug] [--bump] [--full-commit]
[--commit-length COMMIT_LENGTH]
[--commit-prefix COMMIT_PREFIX]
[--escape-with ESCAPE_WITH]

Generate version from Mercurial

options:

Always include metadata. Ignored when --format is used

Never include metadata. Ignored when --format is used

Include dirty flag if applicable. Ignored when --format is used

Include tagged metadata if applicable. Ignored when --format is used

Regular expression matched against the version source. This must contain one capture group named `base` corresponding to the release segment of the source. Optionally, it may contain another two groups named `stage` and `revision` corresponding to a prerelease type (such as 'alpha' or 'rc') and number (such as in 'alpha-2' or 'rc3'). It may also contain a group named `tagged_metadata` corresponding to extra metadata after the main part of the version (typically after a plus sign). There may also be a group named `epoch` for the PEP 440 concept. If the `base` group is not present, then instead this will be interpreted as a named preset, which may be one of the following: `default`, `default-unprefixed`

Insert this after the pattern's start anchor (`^`).

Custom output format. Available substitutions: {base}, {stage}, {revision}, {distance}, {commit}, {dirty}, {tagged_metadata}, {epoch}, {branch}, {branch_escaped}, {timestamp}, {major}, {minor}, {patch}

Preconfigured output format. Will default to PEP 440 if not set and no custom format given. If you specify both a style and a custom format, then the format will be validated against the style's rules

Only inspect the latest tag on the latest tagged commit for a pattern match

Elevate warnings to errors. When there are no tags, fail instead of falling back to 0.0.0

Directory to inspect, if not the current working directory

Display additional information on stderr for troubleshooting

Increment the last part of the version `base` by 1, unless the `stage` is set, in which case increment the `revision` by 1 or set it to a default of 2 if there was no `revision` Does nothing when on a commit with a version tag.

Get the full commit hash instead of the short form (only: Git, Mercurial)

Use this many characters from the start of the full commit hash

Add this prefix when serializing commit IDs

When escaping, replace with this substitution. The default is simply to remove invalid characters.

dunamai from darcs

Generate version from Darcs

usage: dunamai from darcs [-h] [--metadata] [--no-metadata] [--dirty]
[--tagged-metadata] [--pattern PATTERN]
[--pattern-prefix PATTERN_PREFIX] [--format FORMAT]
[--style {pep440,semver,pvp}] [--latest-tag]
[--strict] [--path PATH] [--debug] [--bump]
[--commit-length COMMIT_LENGTH]
[--commit-prefix COMMIT_PREFIX]
[--escape-with ESCAPE_WITH]

Generate version from Darcs

options:

Always include metadata. Ignored when --format is used

Never include metadata. Ignored when --format is used

Include dirty flag if applicable. Ignored when --format is used

Include tagged metadata if applicable. Ignored when --format is used

Regular expression matched against the version source. This must contain one capture group named `base` corresponding to the release segment of the source. Optionally, it may contain another two groups named `stage` and `revision` corresponding to a prerelease type (such as 'alpha' or 'rc') and number (such as in 'alpha-2' or 'rc3'). It may also contain a group named `tagged_metadata` corresponding to extra metadata after the main part of the version (typically after a plus sign). There may also be a group named `epoch` for the PEP 440 concept. If the `base` group is not present, then instead this will be interpreted as a named preset, which may be one of the following: `default`, `default-unprefixed`

Insert this after the pattern's start anchor (`^`).

Custom output format. Available substitutions: {base}, {stage}, {revision}, {distance}, {commit}, {dirty}, {tagged_metadata}, {epoch}, {branch}, {branch_escaped}, {timestamp}, {major}, {minor}, {patch}

Preconfigured output format. Will default to PEP 440 if not set and no custom format given. If you specify both a style and a custom format, then the format will be validated against the style's rules

Only inspect the latest tag on the latest tagged commit for a pattern match

Elevate warnings to errors. When there are no tags, fail instead of falling back to 0.0.0

Directory to inspect, if not the current working directory

Display additional information on stderr for troubleshooting

Increment the last part of the version `base` by 1, unless the `stage` is set, in which case increment the `revision` by 1 or set it to a default of 2 if there was no `revision` Does nothing when on a commit with a version tag.

Use this many characters from the start of the full commit hash

Add this prefix when serializing commit IDs

When escaping, replace with this substitution. The default is simply to remove invalid characters.

dunamai from subversion

Generate version from Subversion

usage: dunamai from subversion [-h] [--metadata] [--no-metadata] [--dirty]
[--tagged-metadata] [--pattern PATTERN]
[--pattern-prefix PATTERN_PREFIX]
[--format FORMAT] [--style {pep440,semver,pvp}]
[--latest-tag] [--strict] [--path PATH]
[--debug] [--bump]
[--commit-length COMMIT_LENGTH]
[--commit-prefix COMMIT_PREFIX]
[--escape-with ESCAPE_WITH] [--tag-dir TAG_DIR]

Generate version from Subversion

options:

Always include metadata. Ignored when --format is used

Never include metadata. Ignored when --format is used

Include dirty flag if applicable. Ignored when --format is used

Include tagged metadata if applicable. Ignored when --format is used

Regular expression matched against the version source. This must contain one capture group named `base` corresponding to the release segment of the source. Optionally, it may contain another two groups named `stage` and `revision` corresponding to a prerelease type (such as 'alpha' or 'rc') and number (such as in 'alpha-2' or 'rc3'). It may also contain a group named `tagged_metadata` corresponding to extra metadata after the main part of the version (typically after a plus sign). There may also be a group named `epoch` for the PEP 440 concept. If the `base` group is not present, then instead this will be interpreted as a named preset, which may be one of the following: `default`, `default-unprefixed`

Insert this after the pattern's start anchor (`^`).

Custom output format. Available substitutions: {base}, {stage}, {revision}, {distance}, {commit}, {dirty}, {tagged_metadata}, {epoch}, {branch}, {branch_escaped}, {timestamp}, {major}, {minor}, {patch}

Preconfigured output format. Will default to PEP 440 if not set and no custom format given. If you specify both a style and a custom format, then the format will be validated against the style's rules

Only inspect the latest tag on the latest tagged commit for a pattern match

Elevate warnings to errors. When there are no tags, fail instead of falling back to 0.0.0

Directory to inspect, if not the current working directory

Display additional information on stderr for troubleshooting

Increment the last part of the version `base` by 1, unless the `stage` is set, in which case increment the `revision` by 1 or set it to a default of 2 if there was no `revision` Does nothing when on a commit with a version tag.

Use this many characters from the start of the full commit hash

Add this prefix when serializing commit IDs

When escaping, replace with this substitution. The default is simply to remove invalid characters.

Location of tags relative to the root (only: Subversion)

dunamai from bazaar

Generate version from Bazaar

usage: dunamai from bazaar [-h] [--metadata] [--no-metadata] [--dirty]
[--tagged-metadata] [--pattern PATTERN]
[--pattern-prefix PATTERN_PREFIX] [--format FORMAT]
[--style {pep440,semver,pvp}] [--latest-tag]
[--strict] [--path PATH] [--debug] [--bump]
[--commit-length COMMIT_LENGTH]
[--commit-prefix COMMIT_PREFIX]
[--escape-with ESCAPE_WITH]

Generate version from Bazaar

options:

Always include metadata. Ignored when --format is used

Never include metadata. Ignored when --format is used

Include dirty flag if applicable. Ignored when --format is used

Include tagged metadata if applicable. Ignored when --format is used

Regular expression matched against the version source. This must contain one capture group named `base` corresponding to the release segment of the source. Optionally, it may contain another two groups named `stage` and `revision` corresponding to a prerelease type (such as 'alpha' or 'rc') and number (such as in 'alpha-2' or 'rc3'). It may also contain a group named `tagged_metadata` corresponding to extra metadata after the main part of the version (typically after a plus sign). There may also be a group named `epoch` for the PEP 440 concept. If the `base` group is not present, then instead this will be interpreted as a named preset, which may be one of the following: `default`, `default-unprefixed`

Insert this after the pattern's start anchor (`^`).

Custom output format. Available substitutions: {base}, {stage}, {revision}, {distance}, {commit}, {dirty}, {tagged_metadata}, {epoch}, {branch}, {branch_escaped}, {timestamp}, {major}, {minor}, {patch}

Preconfigured output format. Will default to PEP 440 if not set and no custom format given. If you specify both a style and a custom format, then the format will be validated against the style's rules

Only inspect the latest tag on the latest tagged commit for a pattern match

Elevate warnings to errors. When there are no tags, fail instead of falling back to 0.0.0

Directory to inspect, if not the current working directory

Display additional information on stderr for troubleshooting

Increment the last part of the version `base` by 1, unless the `stage` is set, in which case increment the `revision` by 1 or set it to a default of 2 if there was no `revision` Does nothing when on a commit with a version tag.

Use this many characters from the start of the full commit hash

Add this prefix when serializing commit IDs

When escaping, replace with this substitution. The default is simply to remove invalid characters.

dunamai from fossil

Generate version from Fossil

usage: dunamai from fossil [-h] [--metadata] [--no-metadata] [--dirty]
[--tagged-metadata] [--pattern PATTERN]
[--pattern-prefix PATTERN_PREFIX] [--format FORMAT]
[--style {pep440,semver,pvp}] [--latest-tag]
[--strict] [--path PATH] [--debug] [--bump]
[--commit-length COMMIT_LENGTH]
[--commit-prefix COMMIT_PREFIX]
[--escape-with ESCAPE_WITH]

Generate version from Fossil

options:

Always include metadata. Ignored when --format is used

Never include metadata. Ignored when --format is used

Include dirty flag if applicable. Ignored when --format is used

Include tagged metadata if applicable. Ignored when --format is used

Regular expression matched against the version source. This must contain one capture group named `base` corresponding to the release segment of the source. Optionally, it may contain another two groups named `stage` and `revision` corresponding to a prerelease type (such as 'alpha' or 'rc') and number (such as in 'alpha-2' or 'rc3'). It may also contain a group named `tagged_metadata` corresponding to extra metadata after the main part of the version (typically after a plus sign). There may also be a group named `epoch` for the PEP 440 concept. If the `base` group is not present, then instead this will be interpreted as a named preset, which may be one of the following: `default`, `default-unprefixed`

Insert this after the pattern's start anchor (`^`).

Custom output format. Available substitutions: {base}, {stage}, {revision}, {distance}, {commit}, {dirty}, {tagged_metadata}, {epoch}, {branch}, {branch_escaped}, {timestamp}, {major}, {minor}, {patch}

Preconfigured output format. Will default to PEP 440 if not set and no custom format given. If you specify both a style and a custom format, then the format will be validated against the style's rules

Only inspect the latest tag on the latest tagged commit for a pattern match

Elevate warnings to errors. When there are no tags, fail instead of falling back to 0.0.0

Directory to inspect, if not the current working directory

Display additional information on stderr for troubleshooting

Increment the last part of the version `base` by 1, unless the `stage` is set, in which case increment the `revision` by 1 or set it to a default of 2 if there was no `revision` Does nothing when on a commit with a version tag.

Use this many characters from the start of the full commit hash

Add this prefix when serializing commit IDs

When escaping, replace with this substitution. The default is simply to remove invalid characters.

dunamai from pijul

Generate version from Pijul

usage: dunamai from pijul [-h] [--metadata] [--no-metadata] [--dirty]
[--tagged-metadata] [--pattern PATTERN]
[--pattern-prefix PATTERN_PREFIX] [--format FORMAT]
[--style {pep440,semver,pvp}] [--latest-tag]
[--strict] [--path PATH] [--debug] [--bump]
[--commit-length COMMIT_LENGTH]
[--commit-prefix COMMIT_PREFIX]
[--escape-with ESCAPE_WITH]

Generate version from Pijul

options:

Always include metadata. Ignored when --format is used

Never include metadata. Ignored when --format is used

Include dirty flag if applicable. Ignored when --format is used

Include tagged metadata if applicable. Ignored when --format is used

Regular expression matched against the version source. This must contain one capture group named `base` corresponding to the release segment of the source. Optionally, it may contain another two groups named `stage` and `revision` corresponding to a prerelease type (such as 'alpha' or 'rc') and number (such as in 'alpha-2' or 'rc3'). It may also contain a group named `tagged_metadata` corresponding to extra metadata after the main part of the version (typically after a plus sign). There may also be a group named `epoch` for the PEP 440 concept. If the `base` group is not present, then instead this will be interpreted as a named preset, which may be one of the following: `default`, `default-unprefixed`

Insert this after the pattern's start anchor (`^`).

Custom output format. Available substitutions: {base}, {stage}, {revision}, {distance}, {commit}, {dirty}, {tagged_metadata}, {epoch}, {branch}, {branch_escaped}, {timestamp}, {major}, {minor}, {patch}

Preconfigured output format. Will default to PEP 440 if not set and no custom format given. If you specify both a style and a custom format, then the format will be validated against the style's rules

Only inspect the latest tag on the latest tagged commit for a pattern match

Elevate warnings to errors. When there are no tags, fail instead of falling back to 0.0.0

Directory to inspect, if not the current working directory

Display additional information on stderr for troubleshooting

Increment the last part of the version `base` by 1, unless the `stage` is set, in which case increment the `revision` by 1 or set it to a default of 2 if there was no `revision` Does nothing when on a commit with a version tag.

Use this many characters from the start of the full commit hash

Add this prefix when serializing commit IDs

When escaping, replace with this substitution. The default is simply to remove invalid characters.

dunamai check

Check if a version is valid for a style

usage: dunamai check [-h] [--style {pep440,semver,pvp}] [version]

Check if a version is valid for a style

arguments:

Version to check; may be piped in

options:

Style against which to check

AUTHOR

Matthew T. Kennerly (mtkennerly)

DISTRIBUTION

The latest version of dunamai may be downloaded from https://github.com/mtkennerly/dunamai

2025-07-04 dunamai 1.25.0