flopha is a CLI for semantic versioning and Git release workflows. It helps teams calculate the next version, manage Git tags and release branches, generate pre-release versions, and automate version bumps from conventional commits.
Use flopha when you want a lightweight release management tool for Git repositories without wiring up a larger release pipeline.
Use flopha as a GitHub Action to auto-tag the next semantic version and optionally create a GitHub Release. No setup required.
- uses: sjquant/flopha@v1See Full action docs: inputs, outputs, and examples.
Shell (Mac, Linux):
curl -fsSL https://raw.githubusercontent.com/sjquant/flopha/main/scripts/install.sh | sh
- Official docs: https://flopha.solaqua.dev
- Website source:
website/ - Local preview:
pnpm docs:start - Production build:
pnpm docs:build
- Semantic versioning CLI for Git tags and release branches
- Conventional commit auto-detection for major, minor, and patch bumps
- Pre-release channel support for
alpha,beta, andrcstyle versions - Custom version patterns for app releases, desktop builds, and monorepo naming
- Version history output for release auditing and changelog workflows
Run commands inside a Git repository with release tags such as v1.2.3.
Check the latest version:
flopha last-versionCalculate the next patch version:
flopha next-versionLet commit messages decide the bump:
flopha next-version --autoCreate the next version in Git:
flopha next-version --createShow recent release history:
flopha log --limit 10For custom tag names like mobile@1.2.3, use a pattern such as mobile@{semver}. See the command reference below or the official docs for release branches, changelogs, pre-releases, and CI examples.
Calculates and displays the next version based on the latest matching tag or branch.
Aliases: nv
-
-i,--increment <major|minor|patch>: Explicit bump level. Default:patch. -
--auto: Auto-detect the bump level from commit messages since the last version. Built-in conventional commit behavior is:BREAKING CHANGEorBREAKING-CHANGE->major<type>!:or<type>(<scope>)!:->majorfeat:orfeat(scope):->minor- anything else ->
patch
-
--rule <LEVEL:PATTERN>: Define custom bump rules used with--auto. Repeatable. When any--ruleflags are provided, they replace the built-in conventional commit rules entirely. -
-p,--pattern <PATTERN>: Specify a custom pattern for version matching and generation. Use placeholders{major},{minor}, and{patch}, or{semver}as shorthand for{major}.{minor}.{patch}. Example patterns:v{major}.{minor}.{patch}mobile@{semver}release-{major}.{minor}.{patch}
-
--pre <CHANNEL>: Format the next version as a pre-release on the given channel. Example:--pre alphaproducesv1.2.3-alpha.1. -
-s,--source <tag|branch>: Read versions from tags or branches. Default:tag. -
-c,--create: Create the next tag or branch in Git. -
--tag-message <MESSAGE>: Create an annotated tag with the given message. Requires--createand tag source. -
--push: Push the created tag or branch toorigin. Requires--create. -
-f,--format <text|json>: Output format. Default:text.
Retrieves and displays the most recent version tag or branch in the repository that matches a specified pattern.
Aliases: lv
-
-p,--pattern <PATTERN>: Get the last version based on a given pattern (e.g.,v{major}.{minor}.{patch}orv{semver}). -
-s,--source <tag|branch>: Read versions from tags or branches. Default:tag. -
-c,--checkout: Check out the last matching version. -
-f,--format <text|json>: Output format. Default:text.
Shows matching versions. In tag mode, it also includes tag dates and the number of commits between releases.
Aliases: lg
-
-p,--pattern <PATTERN>: Filter versions by a pattern such asv{major}.{minor}.{patch}orv{semver}. -
-s,--source <tag|branch>: Read versions from tags or branches. Default:tag.Tag mode provides full timeline metadata. Branch mode still lists matching versions, but tag dates and commit counts are not available.
-
-n,--limit <LIMIT>: Limit the number of versions shown. -
-f,--format <text|json>: Output format. Default:text.
Generates a changelog from commits since the last matching version or a specific starting tag.
Aliases: cl
-
--from <TAG>: Tag to start from. Defaults to the latest version matching--pattern. -
--to <VERSION>: Upper bound for the changelog. The tag must exist when limiting commit history. Also available as{to}in--title. -
-p,--pattern <PATTERN>: Match a custom version format.{semver}expands to{major}.{minor}.{patch}. -
-s,--source <tag|branch>: Read versions from tags or branches when resolving the default--from. Default:tag. -
--group <TITLE:PATTERN>: Custom changelog group rule. Repeatable. When any group is provided, it replaces the built-in defaults. -
--other <TITLE>: Title for commits that match no group. Pass an empty string to suppress unmatched commits. Default:Other Changes. -
--title <TEMPLATE>: Heading template. Use{from}and{to}placeholders. -
-o,--output <FILE>: Write to a file instead of stdout. Existing content is prepended by default. -
--overwrite: Replace the output file instead of prepending. -
-f,--format <text|json>: Output format. Default:text.
Default changelog groups:
| 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 |
Runs the full release pipeline in one command, driven by a checked-in flopha.toml: compute the version bump, sync it into manifest files (Cargo.toml, package.json, pyproject.toml, or arbitrary regex targets), commit, create an annotated tag, push, generate a changelog, and create a GitHub Release.
Aliases: rel
-
-c,--config <FILE>: Path to the config file. Default:flopha.toml. -
--dry-run: Print the release plan (bump, manifest files that would be touched, changelog preview) without making any changes. -
-f,--format <text|json>: Output format for--dry-run. Default:text.
[version]
pattern = "v{major}.{minor}.{patch}" # default
auto = true # detect bump level from conventional commits (default)
# increment = "patch" # used instead of auto-detection when auto = false
# rules = ["major:BREAKING CHANGE", "minor:^feat"]
# pre = "beta" # pre-release channel, e.g. v1.2.3-beta.1
# tag_message = "Release {tag}" # annotated tag message; supports {tag} and {version}
[changelog]
enabled = true
# groups = ["Breaking Changes:BREAKING CHANGE", "Features:^feat"]
# other = "Other Changes"
# title = "Changes in {to}"
[release]
create = true
draft = false
# title = "{tag}" # supports {tag} and {version}
# body = "..." # falls back to the generated changelog, then generate_notes
# generate_notes = false
# repo = "owner/repo" # defaults to parsing the `origin` remote
[[manifest]]
path = "Cargo.toml"
type = "cargo" # sets [package].version (or [workspace.package].version) and Cargo.lock
[[manifest]]
path = "package.json"
type = "npm" # sets the top-level "version" field
[[manifest]]
path = "pyproject.toml"
type = "pyproject" # sets [project].version, falling back to [tool.poetry].version
[[manifest]]
path = "docs/VERSION"
type = "regex"
pattern = "(?m)^version=.*$"
replacement = "version={version}" # {version} is substituted with the new version- Safe to re-run: on a commit that is already tagged,
releasefinishes that release (pushes the tag, creates a missing GitHub Release) instead of cutting a new one, and with no new commits it does nothing. - With
[[manifest]]targets, the working tree must be clean and the branch up to date withorigin. If pushing the release commit fails, the local commit and tag are undone. release.createneeds a GitHub token inGH_TOKENorGITHUB_TOKEN. Locally, an existinggh auth loginalso works.version.source = "branch"is not supported. For branch-based versioning, useflopha next-version --source branch --create.
See Release Workflows for running release in CI.
-v,--verbose: Enable verbose output for detailed information.
- The CLI fetches from the
originremote before resolving versions. - The default version pattern is
v{major}.{minor}.{patch}. Usev{semver}as a shorter equivalent.
Install dev tools and activate git hooks after cloning:
cargo install prek
prek install
prek install --hook-type commit-msgHooks enforce formatting, linting, secret detection, and gitmoji commit messages.
flopha is released under the MIT License.