FerrFlow
Universal semantic versioning for monorepos and classic repos.
FerrFlow reads your commit history, determines the right version bump, updates your version files, generates a changelog, and creates a tagged release — for any language, any repo layout.
Why FerrFlow?
Most versioning tools are tied to a specific ecosystem (semantic-release for JS, cargo-release for Rust) or require a Node.js runtime. FerrFlow is a single compiled binary with no runtime dependencies.
| Tool | Monorepo | Multi-language | Runtime |
|---|---|---|---|
| semantic-release | plugins | JS only | Node.js |
| changesets | manual | JS only | Node.js |
| knope | limited | partial | none |
| FerrFlow | native | yes | none |
Supported version files
| Format | File | Ecosystem |
|---|---|---|
| TOML | Cargo.toml |
Rust |
| TOML | pyproject.toml |
Python |
| JSON | package.json |
Node.js |
| XML | pom.xml |
Java / Maven |
| CSProj | *.csproj |
.NET (C#, F#) |
| Gradle | build.gradle |
Java / Kotlin |
| Helm | Chart.yaml |
Kubernetes / Helm |
| Go | go.mod |
Go (tag-only, no file write) |
| Text | VERSION, VERSION.txt |
Any |
Installation
Cargo
npm
Docker
Pre-built binaries
Download from Releases.
Usage
# Preview what would be bumped
# Run a release
# Dry run
# Pre-release
# Scaffold a config file
# Scaffold a config file in a specific format
# Use a specific config file
# Or set via environment variable
FERRFLOW_CONFIG=path/to/ferrflow.toml
# Print current version
# Print last release tag
# JSON output (for scripting)
# Shell completions
Pre-generated completion scripts are also available as ferrflow-completions.tar.gz in each GitHub release.
Configuration
FerrFlow looks for a config file at the root of your repository, in this order:
ferrflow.jsonferrflow.json5ferrflow.toml.ferrflow(dotfile, JSON format)
If multiple config files exist, FerrFlow exits with an error listing the conflicting files. Use --config <path> (or FERRFLOW_CONFIG env var) to specify which one to use. If no config file is found, FerrFlow auto-detects common version files in the current directory.
Run ferrflow init to scaffold a config file interactively. Use --format to skip the format prompt:
JSON Schema
Add $schema to get autocompletion and validation in VS Code, WebStorm, and any JSON-aware editor:
JSON (default)
JSON5
{
workspace: {
remote: "origin",
branch: "main",
},
package: [
{
name: "my-app",
path: ".",
changelog: "CHANGELOG.md",
versioned_files: [
{ path: "package.json", format: "json" },
],
},
],
}
TOML
[]
= "origin"
= "main"
[[]]
= "my-app"
= "."
= "CHANGELOG.md"
[[]]
= "Cargo.toml"
= "toml"
Monorepo
[[]]
= "api"
= "services/api"
= "services/api/CHANGELOG.md"
= ["services/shared/"]
[[]]
= "services/api/Cargo.toml"
= "toml"
[[]]
= "frontend"
= "frontend"
= "frontend/CHANGELOG.md"
[[]]
= "frontend/package.json"
= "json"
Versioning Strategies
Each package can use its own versioning strategy. Set a default at the workspace level and override per package:
[]
= "semver" # default for all packages
[[]]
= "api"
= "packages/api"
# inherits semver from workspace
[[]]
= "site"
= "packages/site"
= "calver" # override: date-based
| Strategy | Format | Example | Description |
|---|---|---|---|
semver |
MAJOR.MINOR.PATCH |
1.4.2 |
Default, driven by conventional commits |
calver |
YYYY.M.D |
2025.3.28 |
Date-based, ignores commit types |
calver-short |
YY.M.D |
25.3.28 |
Compact date-based |
calver-seq |
YYYY.M.SEQ |
2025.3.3 |
Date + daily sequence counter |
sequential |
N |
42 |
Simple incrementing build number |
zerover |
0.MINOR.PATCH |
0.15.2 |
Permanently unstable, never hits 1.0 |
Tag Template
By default, FerrFlow tags single-repo releases as v1.2.3 and monorepo releases as api@v1.2.3. Customize with tag_template at the workspace or package level using {name} and {version} placeholders.
[]
= "v{version}" # all packages: v1.2.3
[[]]
= "api"
= "packages/api"
= "{name}/v{version}" # override: api/v1.2.3
| Layout | Default template | Example tag |
|---|---|---|
| Single repo | v{version} |
v1.2.3 |
| Monorepo | {name}@v{version} |
api@v1.2.3 |
| Custom | release-{version} |
release-1.2.3 |
Pre-release Channels
Publish pre-release versions (alpha, beta, rc, dev) using the --channel flag or branch-based configuration. Pre-release versions follow the format MAJOR.MINOR.PATCH-CHANNEL.IDENTIFIER.
CLI flag
Branch-based configuration
Map branches to channels automatically:
Branch names support glob patterns. The first match wins.
Identifier strategies
| Strategy | Example | Description |
|---|---|---|
increment |
-beta.3 |
Auto-incrementing counter (default) |
timestamp |
-dev.20250402T1430 |
UTC timestamp |
short-hash |
-dev.a1b2c3d |
Git short hash |
timestamp-hash |
-dev.20250402T1430-a1b2c3d |
Timestamp + hash |
Behavior
- Floating tags (e.g.
v1,v1.2) are never moved by pre-release versions - GitHub Releases are marked as pre-release
- Stable releases include all commits since the last stable tag (skipping pre-release tags)
- Hook environment includes
FERRFLOW_CHANNELandFERRFLOW_IS_PRERELEASE
Release Commit Mode
Controls how FerrFlow commits version bumps and changelog updates after a release.
[]
= "commit" # default
| Mode | Description |
|---|---|
commit |
Push a release commit directly to the branch |
pr |
Create a pull request with the release changes |
none |
Skip committing entirely (useful when another tool handles it) |
When using pr mode, auto_merge_releases controls whether the PR is automatically merged:
[]
= "pr"
= true # default
Skip CI
By default, release commits in commit mode include [skip ci] in the message to avoid triggering a CI loop. Override with skip_ci:
[]
= false # force CI to run on release commits
In pr mode, skip_ci defaults to false since the PR merge triggers CI naturally.
Floating Tags
Move abbreviated tags (e.g. v1, v1.2) to always point at the latest matching release:
[]
= ["major"] # creates/moves v1 when releasing v1.2.3
| Level | Tag | Points to |
|---|---|---|
major |
v1 |
Latest v1.x.x |
minor |
v1.2 |
Latest v1.2.x |
Floating tags are never moved by pre-release versions. Override per package:
[[]]
= "api"
= "packages/api"
= ["major", "minor"]
Orphaned Tag Strategy
After a rebase + force-push, existing tags may point to commits that no longer exist on the branch. orphaned_tag_strategy controls how FerrFlow handles this:
[]
= "warn" # default
| Strategy | Description |
|---|---|
warn |
Log a warning and skip the orphaned tag |
treeHash |
Attempt recovery by matching the commit's tree hash |
message |
Attempt recovery by matching the commit message |
Recover Missed Releases
In monorepos, a package can miss a release if its files changed but FerrFlow wasn't run. Enable recover_missed_releases to compare files against the last tag instead of just the last commit:
[]
= true # default: false
Package Dependencies
In a monorepo, use depends_on to automatically patch-bump a package when one of its dependencies is released:
When core is bumped, cli gets a patch bump even if it had no direct commits.
Hooks
Run shell commands at lifecycle points during a release. Hooks can be set at the workspace level (applies to all packages) or per package:
[]
= "echo 'about to bump'"
= "cargo check"
= "npm run build"
= "npm pack --dry-run"
= "notify-slack.sh"
= "abort" # or "continue"
| Hook | When |
|---|---|
pre_bump |
After bump calculation, before writing version files |
post_bump |
After writing version files, before changelog generation |
pre_commit |
After changelog generation, before git commit |
pre_publish |
After commit and tag, before push |
post_publish |
After push and release creation |
If a hook exits non-zero and on_failure is abort (default), the release is cancelled. Set on_failure to continue to ignore hook failures.
Hook commands receive environment variables: FERRFLOW_PACKAGE, FERRFLOW_VERSION, FERRFLOW_PREV_VERSION, FERRFLOW_CHANNEL, FERRFLOW_IS_PRERELEASE.
Conventional Commits
FerrFlow follows the Conventional Commits spec.
| Prefix | Bump |
|---|---|
fix:, perf:, refactor: |
patch |
feat: |
minor |
feat!:, BREAKING CHANGE |
major |
chore:, docs:, ci: |
none |
CI usage
GitLab CI
release:
image: ghcr.io/ferrflow/ferrflow:latest
script:
- ferrflow release
rules:
- if: '$CI_COMMIT_BRANCH == "main"'
GitHub Actions
- name: Release
run: ferrflow release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
License
MIT