DUNAMAI(1)

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

✨ DUNAMAI ✨

okay so bestie, welcome to dunamai β€” the little tool that pulls version info straight out of git πŸ’– lowkey magic, highkey useful. this page is the dunamai from git subcommand, and yes, we're going through every single flag together. no skipping. grab a snack. πŸ“


🌸 NAME 🌸

dunamai β€” it's dunamai, and it comes from git. that's the whole vibe. πŸ¦‹


πŸŽ€ DESCRIPTION πŸŽ€

here's the usage, exactly as it lives:

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]
       [--highest-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. that's it. that's the job. πŸ‘‘


πŸ’… OPTIONS πŸ’…

🫢 options:

  • -h, --help β€” shows this help message and then dips out. bye bestie πŸ‘‹ (default behaviour: exit)
  • --metadata β€” always include metadata. it gets ignored when --format is used. (default: None)
  • --no-metadata β€” never include metadata. also ignored when --format is used. (default: None)
  • --dirty β€” include the dirty flag if it applies. ignored when --format is used. (default: False)
  • --ignore-untracked β€” when it's deciding whether the repo is dirty, just don't count untracked files, okay? (only: Git) (default: False)
  • --tagged-metadata β€” include tagged metadata if it applies. ignored when --format is used. (default: False)
  • --pattern PATTERN β€” a regular expression that gets matched against the version source. it must have one capture group named base, and that's the release segment of the source. optionally it can also have two more groups named stage and revision β€” those are the prerelease type (think 'alpha' or 'rc') and the number (like in 'alpha-2' or 'rc3'). it may also have a group named tagged_metadata for extra metadata that comes after the main part of the version (typically after a plus sign). and there may even be a group named epoch for the PEP 440 concept. 🧚 but listen β€” if the base group isn't there, then this whole thing gets read as a named preset instead, which can be one of: default, default-unprefixed. (default: (?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 β€” sticks this in right after the pattern's start anchor (^). (default: None)
  • --format FORMAT β€” your own custom output format, go off. 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 hand-build one. if you don't set it and you don't give a custom format either, it defaults to PEP 440. and heads up: if you give both a style and a custom format, then the format gets validated against that style's rules. (default: None)
  • --latest-tag β€” only looks at the latest tag on the latest tagged commit, checking for a pattern match. (default: False)
  • --highest-tag β€” only looks at the numerically highest tag across all the tagged commits, checking for a pattern match. (default: False)
  • --strict β€” elevates warnings into errors, dramatic much πŸ’€ and when there are no tags at all, it fails instead of falling back to 0.0.0. (default: False)
  • --path PATH β€” the directory to inspect, in case you're not vibing in the current working directory. (default: None)
  • --debug β€” dumps extra info on stderr for troubleshooting. (default: False)
  • --bump β€” increments the last part of the version base by 1, unless stage is set β€” in that case it increments revision by 1, or sets it to a default of 2 if there was no revision. does absolutely nothing when you're on a commit that has a version tag. (default: False)
  • --full-commit β€” grabs the full commit hash instead of the short form. (only: Git, Mercurial) (default: False)
  • --commit-length COMMIT_LENGTH β€” use this many characters from the start of the full commit hash. (default: None)
  • --commit-prefix COMMIT_PREFIX β€” adds this prefix when it's 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. (default: None)
  • --tag-branch TAG_BRANCH β€” the branch to go find tags on, if it's different from the current branch. (only: Git) (default: None)

and that's the whole page, bestie, you ate it 🫢 no cap, every flag accounted for. this was dunamai from git 1.26.2, from August 2026 β€” til next time, mwah πŸ’…βœ¨πŸŒΈ

πŸ“¦ where this page comes from