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 istag.--checkout: Check out the resolved version after printing it.--format,-f: Output format —text(default) orjson.
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 ispatch.--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.1or-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 istag.--create: Create the new tag or branch after printing it.--tag-message: Create an annotated tag with the given message. Requires--createand tag source.--push: Push the created tag or branch toorigin. Requires--create.--format,-f: Output format —text(default) orjson.
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 istag.--limit,-n: Limit the number of rows.--format,-f: Output format —text(default) orjson.
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 istag.--group: Custom group rule asTITLE:REGEX. Repeatable. When any--groupflags 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--tois supplied. Defaults to"Changes in {to}"when--tois given, otherwise"Changelog since {from}". Use--titledirectly 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) orjson.
Default groups
When no --group flags are provided, commits are classified as:
| Section | Matched commits |
|---|---|
| Breaking Changes | BREAKING CHANGE, BREAKING-CHANGE, or type!: |
| Features | feat: or feat(scope): |
| Bug Fixes | fix: or fix(scope): |
| Other Changes | Everything 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,-venables debug logging.- The CLI fetches from the
originremote before resolving versions. - The default version pattern is
v{major}.{minor}.{patch}. Usev{semver}as a shorter equivalent.