DUNAMAI(1)

πŸ“¦
version 1.26.2 Β· 5 versions
, in fedora 43, fedora 44

πŸ’– NAME πŸ’–

dunamai β€” but make it mercurial 🧚 like, the dunamai from mercurial subcommand, bestie, and yes it slaps


✨ DESCRIPTION ✨

okay so here's the whole vibe upfront, the usage line, and I'm giving it to you exactly as it is because copy-paste energy is sacred:

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] [--highest-tag] [--strict]
              [--path PATH] [--debug] [--bump] [--full-commit] [--commit-length
              COMMIT_LENGTH] [--commit-prefix COMMIT_PREFIX] [--escape-with
              ESCAPE_WITH]

And what does it do?? Generate version from Mercurial πŸ’… that's the whole plot. It reads your Mercurial repo and hands you a version string, and it's giving ✨build-tooling main character✨


πŸŽ€ options πŸŽ€

the good part. every single one. no skips, no skimming, periodt 🫢

  • -h, --help β€” shows this help message and then dips out, like it should πŸ‘‘
  • --metadata β€” always include metadata, no questions asked. lowkey ignored when --format is used (default: None)
  • --no-metadata β€” never include metadata. opposite girl energy. also ignored when --format is used (default: None)
  • --tagged-metadata β€” include tagged metadata if it applies to your situation. and yeah, ignored when --format is used (default: False)
  • --dirty β€” include the dirty flag if applicable. ignored when --format is used (default: False)
  • --pattern PATTERN β€” a regular expression that gets matched against the version source. it MUST contain one capture group named base β€” that's the release segment of the source, no exceptions. optionally it can have two more groups named stage and revision, which map to a prerelease type (think 'alpha' or 'rc') and a number (think stuff like 'alpha-2' or 'rc3'). it may also contain a group named tagged_metadata for extra metadata sitting after the main part of the version (typically after a plus sign). there may <em>also</em> be a group named epoch for the PEP 440 concept. and here's the twist πŸŒ€ if the base group is not present, then the whole thing gets interpreted as a named preset instead, which may be one of: default, default-unprefixed. the default value is this whole beast right here:
(?x) (?# ignore whitespace)
^v((?P<epoch>\d+)!)?(?P<base>\d+(\.\d+)*) (?# v1.2.3 or v1!2000.1.2)
([-._]?((?P<stage>[a-zA-Z]+)[-._]?(?P<revision>\d+)?))? (?# b0)
(\+(?P<tagged_metadata>.+))?$ (?# +linux)
  • --pattern-prefix PATTERN_PREFIX β€” inserts this right after the pattern's start anchor (^). so it slots in at the very beginning of the match ✨ (default: None)
  • --format FORMAT β€” your custom output format, do whatever you want with it. available substitutions: {base}, {stage}, {revision}, {distance}, {commit}, {dirty}, {tagged_metadata}, {epoch}, {branch}, {branch_escaped}, {timestamp}, {major}, {minor}, {patch} (default: None)
  • --style {pep440,semver,pvp} β€” a preconfigured output format, so you don't have to do the work yourself. it defaults to PEP 440 if you don't set it <em>and</em> you don't give a custom format. and heads up if you specify both a style <em>and</em> a custom format, then your format gets validated against that style's rules πŸ‘€ (default: None)
  • --latest-tag β€” only inspects the latest tag on the latest tagged commit, looking for a pattern match. just that one. tunnel vision fr (default: False)
  • --highest-tag β€” only inspects the numerically highest tag across <em>all</em> tagged commits for a pattern match. big number wins πŸ† (default: False)
  • --strict β€” elevates warnings to errors, which is terrifying but valid. when there are no tags, it fails instead of falling back to 0.0.0 (default: False)
  • --path PATH β€” the directory to inspect, if it's not the current working directory. go look somewhere else bestie (default: None)
  • --debug β€” displays additional information on stderr for troubleshooting πŸ” (default: False)
  • --bump β€” increments the last part of the version base by 1... <em>unless</em> the stage is set, in which case it increments the revision by 1, or sets it to a default of 2 if there was no revision. and it does nothing when you're on a commit with a version tag. so basically, don't expect anything there πŸ’€ (default: False)
  • --full-commit β€” gets the full commit hash instead of the short form. only works on: Git, Mercurial (default: False)
  • --commit-length COMMIT_LENGTH β€” uses this many characters from the start of the full commit hash (default: None)
  • --commit-prefix COMMIT_PREFIX β€” adds this prefix when serializing commit IDs (default: None)
  • --escape-with ESCAPE_WITH β€” when escaping, replace with this substitution instead. the default is just to remove invalid characters entirely, no replacement (default: None)

reminder bestie: any option marked as ignored when --format is used means exactly that. your flag is not being heard. it's not you, it's the --format πŸ’”

and that's the whole page πŸ¦‹ dunamai from mercurial, version 1.26.2, dropped in August 2026 β€” go generate some versions, you absolute icon, ily πŸ’–πŸŒΈπŸŽ€

πŸ“¦ where this page comes from