Skip to main content

Command Reference

flopha last-version

Print the latest matching version.

flopha last-version [--pattern <pattern>] [--source <tag|branch>] [--checkout] [--format <text|json>]

Options:

  • --pattern, -p: Match a custom version format. {semver} expands to {major}.{minor}.{patch}.
  • --source, -s: Read versions from tags or branches. Default is tag.
  • --checkout: Check out the resolved version after printing it.
  • --format, -f: Output format — text (default) or json.

flopha next-version

Calculate the next version.

flopha next-version \
[--increment <major|minor|patch>] \
[--auto] \
[--rule <level:regex>] \
[--pre <channel>] \
[--pattern <pattern>] \
[--source <tag|branch>] \
[--create] \
[--tag-message <message>] \
[--push] \
[--format <text|json>]

Options:

  • --increment, -i: Explicit bump level. Default is patch.
  • --auto: Detect the bump from commit messages since the last version.
  • --rule: Replace the built-in auto-detection rules. Requires --auto.
  • --pre: Create a pre-release tag like -alpha.1 or -rc.1.
  • --pattern, -p: Match and generate a custom version format. {semver} expands to {major}.{minor}.{patch}.
  • --source, -s: Read versions from tags or branches. Default is tag.
  • --create: Create the new tag or branch after printing it.
  • --tag-message: Create an annotated tag with the given message. Requires --create and tag source.
  • --push: Push the created tag or branch to origin. Requires --create.
  • --format, -f: Output format — text (default) or json.

flopha log

Show matching versions newest first.

flopha log [--pattern <pattern>] [--source <tag|branch>] [--limit <number>] [--format <text|json>]

Options:

  • --pattern, -p: Match a custom version format. {semver} expands to {major}.{minor}.{patch}.
  • --source, -s: Read versions from tags or branches. Default is tag.
  • --limit, -n: Limit the number of rows.
  • --format, -f: Output format — text (default) or json.

flopha changelog

Generate a changelog from commits since the last (or a given) version.

flopha changelog \
[--from <tag>] \
[--to <tag>] \
[--pattern <pattern>] \
[--source <tag|branch>] \
[--group <TITLE:REGEX>] \
[--other <title>] \
[--title <template>] \
[--output <file>] \
[--overwrite] \
[--format <text|json>]

Options:

  • --from: Tag to start from. Defaults to the latest matching tag.
  • --to: Existing tag or ref to use as the upper bound for the changelog. The value must exist in Git because it limits which commits are included. It is exposed as {to} in --title.
  • --pattern, -p: Match a custom version format. {semver} expands to {major}.{minor}.{patch}.
  • --source, -s: Read versions from tags or branches. Default is tag.
  • --group: Custom group rule as TITLE:REGEX. Repeatable. When any --group flags are given they replace the built-in defaults entirely. Commits not matching any group are collected under the fallback group.
  • --other: Title for commits that match no group. Pass an empty string to suppress them entirely. Default: "Other Changes".
  • --title: Heading template. Use {from} for the starting tag and {to} when --to is supplied. Defaults to "Changes in {to}" when --to is given, otherwise "Changelog since {from}". Use --title directly when naming an upcoming version before its tag exists.
  • --output, -o: Write to a file instead of stdout. By default the new content is prepended to any existing file content.
  • --overwrite: Replace the output file instead of prepending.
  • --format, -f: Output format — text (default, Markdown) or json.

Default groups

When no --group flags are provided, commits are classified as:

SectionMatched commits
Breaking ChangesBREAKING CHANGE, BREAKING-CHANGE, or type!:
Featuresfeat: or feat(scope):
Bug Fixesfix: or fix(scope):
Other ChangesEverything else

JSON output schema

{
"title": "Changes in v1.2.0",
"from": "v1.1.0",
"to": "v1.2.0",
"groups": [
{
"title": "Features",
"entries": [
{ "subject": "add search command", "hash": "abc1234" }
]
}
]
}

to is only present when --to was supplied. Groups with no matching commits are omitted.

Global behavior

  • --verbose, -v enables debug logging.
  • The CLI fetches from the origin remote before resolving versions.
  • The default version pattern is v{major}.{minor}.{patch}. Use v{semver} as a shorter equivalent.