@ferrflow/doc 7.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (170) hide show
  1. package/docs-en/ci/github-actions.md +120 -0
  2. package/docs-en/ci/gitlab-ci.md +90 -0
  3. package/docs-en/ci/hosted-bot.md +82 -0
  4. package/docs-en/ci/pipeline-triggers.md +287 -0
  5. package/docs-en/configuration/config-file.md +1259 -0
  6. package/docs-en/configuration/formats.md +220 -0
  7. package/docs-en/configuration/monorepo.md +390 -0
  8. package/docs-en/installation.md +56 -0
  9. package/docs-en/introduction.md +56 -0
  10. package/docs-en/quickstart.md +66 -0
  11. package/docs-en/reference/api.md +106 -0
  12. package/docs-en/reference/cli.md +483 -0
  13. package/docs-en/reference/conventional-commits.md +103 -0
  14. package/docs-en/reference/errors.md +508 -0
  15. package/docs-en/verifying-releases.md +97 -0
  16. package/docs-fr/ci/github-actions.md +109 -0
  17. package/docs-fr/ci/gitlab-ci.md +77 -0
  18. package/docs-fr/ci/hosted-bot.md +82 -0
  19. package/docs-fr/ci/pipeline-triggers.md +238 -0
  20. package/docs-fr/configuration/config-file.md +839 -0
  21. package/docs-fr/configuration/formats.md +163 -0
  22. package/docs-fr/configuration/monorepo.md +357 -0
  23. package/docs-fr/installation.md +56 -0
  24. package/docs-fr/introduction.md +54 -0
  25. package/docs-fr/quickstart.md +63 -0
  26. package/docs-fr/reference/api.md +106 -0
  27. package/docs-fr/reference/cli.md +407 -0
  28. package/docs-fr/reference/conventional-commits.md +103 -0
  29. package/docs-fr/reference/errors.md +378 -0
  30. package/docs-fr/verifying-releases.md +97 -0
  31. package/docs-fr-v4/ci/github-actions.md +106 -0
  32. package/docs-fr-v4/ci/gitlab-ci.md +77 -0
  33. package/docs-fr-v4/ci/pipeline-triggers.md +214 -0
  34. package/docs-fr-v4/configuration/config-file.md +769 -0
  35. package/docs-fr-v4/configuration/formats.md +128 -0
  36. package/docs-fr-v4/configuration/monorepo.md +324 -0
  37. package/docs-fr-v4/installation.md +48 -0
  38. package/docs-fr-v4/introduction.md +54 -0
  39. package/docs-fr-v4/legal/telemetry.md +65 -0
  40. package/docs-fr-v4/quickstart.md +63 -0
  41. package/docs-fr-v4/reference/cli.md +130 -0
  42. package/docs-fr-v4/reference/conventional-commits.md +67 -0
  43. package/docs-fr-v4/reference/errors.md +372 -0
  44. package/docs-fr-v5/ci/github-actions.md +109 -0
  45. package/docs-fr-v5/ci/gitlab-ci.md +77 -0
  46. package/docs-fr-v5/ci/hosted-bot.md +82 -0
  47. package/docs-fr-v5/ci/pipeline-triggers.md +238 -0
  48. package/docs-fr-v5/configuration/config-file.md +812 -0
  49. package/docs-fr-v5/configuration/formats.md +150 -0
  50. package/docs-fr-v5/configuration/monorepo.md +357 -0
  51. package/docs-fr-v5/installation.md +56 -0
  52. package/docs-fr-v5/introduction.md +54 -0
  53. package/docs-fr-v5/legal/telemetry.md +26 -0
  54. package/docs-fr-v5/quickstart.md +63 -0
  55. package/docs-fr-v5/reference/api.md +106 -0
  56. package/docs-fr-v5/reference/cli.md +356 -0
  57. package/docs-fr-v5/reference/conventional-commits.md +88 -0
  58. package/docs-fr-v5/reference/errors.md +378 -0
  59. package/docs-fr-v5/verifying-releases.md +97 -0
  60. package/docs-fr-v6/ci/github-actions.md +109 -0
  61. package/docs-fr-v6/ci/gitlab-ci.md +77 -0
  62. package/docs-fr-v6/ci/hosted-bot.md +82 -0
  63. package/docs-fr-v6/ci/pipeline-triggers.md +238 -0
  64. package/docs-fr-v6/configuration/config-file.md +813 -0
  65. package/docs-fr-v6/configuration/formats.md +150 -0
  66. package/docs-fr-v6/configuration/monorepo.md +357 -0
  67. package/docs-fr-v6/installation.md +56 -0
  68. package/docs-fr-v6/introduction.md +54 -0
  69. package/docs-fr-v6/quickstart.md +63 -0
  70. package/docs-fr-v6/reference/api.md +106 -0
  71. package/docs-fr-v6/reference/cli.md +356 -0
  72. package/docs-fr-v6/reference/conventional-commits.md +88 -0
  73. package/docs-fr-v6/reference/errors.md +378 -0
  74. package/docs-fr-v6/verifying-releases.md +97 -0
  75. package/docs-v0/ci/github-actions.md +77 -0
  76. package/docs-v0/ci/gitlab-ci.md +59 -0
  77. package/docs-v0/configuration/config-file.md +97 -0
  78. package/docs-v0/configuration/formats.md +86 -0
  79. package/docs-v0/configuration/monorepo.md +59 -0
  80. package/docs-v0/installation.md +48 -0
  81. package/docs-v0/introduction.md +34 -0
  82. package/docs-v0/legal/telemetry.md +63 -0
  83. package/docs-v0/quickstart.md +58 -0
  84. package/docs-v0/reference/cli.md +95 -0
  85. package/docs-v0/reference/conventional-commits.md +68 -0
  86. package/docs-v1/ci/github-actions.md +76 -0
  87. package/docs-v1/ci/gitlab-ci.md +58 -0
  88. package/docs-v1/configuration/config-file.md +515 -0
  89. package/docs-v1/configuration/formats.md +115 -0
  90. package/docs-v1/configuration/monorepo.md +246 -0
  91. package/docs-v1/installation.md +48 -0
  92. package/docs-v1/introduction.md +39 -0
  93. package/docs-v1/legal/telemetry.md +63 -0
  94. package/docs-v1/quickstart.md +62 -0
  95. package/docs-v1/reference/cli.md +128 -0
  96. package/docs-v1/reference/conventional-commits.md +67 -0
  97. package/docs-v2/ci/github-actions.md +117 -0
  98. package/docs-v2/ci/gitlab-ci.md +90 -0
  99. package/docs-v2/ci/pipeline-triggers.md +263 -0
  100. package/docs-v2/configuration/config-file.md +806 -0
  101. package/docs-v2/configuration/formats.md +98 -0
  102. package/docs-v2/configuration/monorepo.md +324 -0
  103. package/docs-v2/installation.md +48 -0
  104. package/docs-v2/introduction.md +40 -0
  105. package/docs-v2/legal/telemetry.md +66 -0
  106. package/docs-v2/quickstart.md +63 -0
  107. package/docs-v2/reference/cli.md +130 -0
  108. package/docs-v2/reference/conventional-commits.md +67 -0
  109. package/docs-v2/reference/errors.md +500 -0
  110. package/docs-v2/self-hosting.md +101 -0
  111. package/docs-v3/ci/github-actions.md +117 -0
  112. package/docs-v3/ci/gitlab-ci.md +90 -0
  113. package/docs-v3/ci/pipeline-triggers.md +263 -0
  114. package/docs-v3/configuration/config-file.md +806 -0
  115. package/docs-v3/configuration/formats.md +99 -0
  116. package/docs-v3/configuration/monorepo.md +324 -0
  117. package/docs-v3/installation.md +48 -0
  118. package/docs-v3/introduction.md +40 -0
  119. package/docs-v3/legal/telemetry.md +66 -0
  120. package/docs-v3/quickstart.md +66 -0
  121. package/docs-v3/reference/cli.md +161 -0
  122. package/docs-v3/reference/conventional-commits.md +67 -0
  123. package/docs-v3/reference/errors.md +502 -0
  124. package/docs-v3/self-hosting.md +137 -0
  125. package/docs-v4/ci/github-actions.md +117 -0
  126. package/docs-v4/ci/gitlab-ci.md +90 -0
  127. package/docs-v4/ci/pipeline-triggers.md +263 -0
  128. package/docs-v4/configuration/config-file.md +850 -0
  129. package/docs-v4/configuration/formats.md +182 -0
  130. package/docs-v4/configuration/monorepo.md +324 -0
  131. package/docs-v4/installation.md +48 -0
  132. package/docs-v4/introduction.md +56 -0
  133. package/docs-v4/legal/telemetry.md +65 -0
  134. package/docs-v4/quickstart.md +66 -0
  135. package/docs-v4/reference/cli.md +161 -0
  136. package/docs-v4/reference/conventional-commits.md +67 -0
  137. package/docs-v4/reference/errors.md +502 -0
  138. package/docs-v4/self-hosting.md +137 -0
  139. package/docs-v5/ci/github-actions.md +120 -0
  140. package/docs-v5/ci/gitlab-ci.md +90 -0
  141. package/docs-v5/ci/hosted-bot.md +82 -0
  142. package/docs-v5/ci/pipeline-triggers.md +287 -0
  143. package/docs-v5/configuration/config-file.md +1133 -0
  144. package/docs-v5/configuration/formats.md +206 -0
  145. package/docs-v5/configuration/monorepo.md +390 -0
  146. package/docs-v5/installation.md +56 -0
  147. package/docs-v5/introduction.md +56 -0
  148. package/docs-v5/legal/telemetry.md +26 -0
  149. package/docs-v5/quickstart.md +66 -0
  150. package/docs-v5/reference/api.md +106 -0
  151. package/docs-v5/reference/cli.md +431 -0
  152. package/docs-v5/reference/conventional-commits.md +88 -0
  153. package/docs-v5/reference/errors.md +508 -0
  154. package/docs-v5/verifying-releases.md +97 -0
  155. package/docs-v6/ci/github-actions.md +120 -0
  156. package/docs-v6/ci/gitlab-ci.md +90 -0
  157. package/docs-v6/ci/hosted-bot.md +82 -0
  158. package/docs-v6/ci/pipeline-triggers.md +287 -0
  159. package/docs-v6/configuration/config-file.md +1134 -0
  160. package/docs-v6/configuration/formats.md +206 -0
  161. package/docs-v6/configuration/monorepo.md +390 -0
  162. package/docs-v6/installation.md +56 -0
  163. package/docs-v6/introduction.md +56 -0
  164. package/docs-v6/quickstart.md +66 -0
  165. package/docs-v6/reference/api.md +106 -0
  166. package/docs-v6/reference/cli.md +431 -0
  167. package/docs-v6/reference/conventional-commits.md +88 -0
  168. package/docs-v6/reference/errors.md +508 -0
  169. package/docs-v6/verifying-releases.md +97 -0
  170. package/package.json +17 -0
@@ -0,0 +1,431 @@
1
+ ---
2
+ title: CLI commands
3
+ description: Full reference for all FerrFlow CLI commands and flags.
4
+ ---
5
+
6
+ ## `ferrflow release`
7
+
8
+ Run the full release pipeline: bump versions, update changelogs, commit, tag, push, and create a release.
9
+
10
+ ```bash
11
+ ferrflow release [OPTIONS]
12
+ ```
13
+
14
+ | Flag | Description |
15
+ | --------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |
16
+ | `--force` | Allow floating tags to move backward to a lower version |
17
+ | `--force-version <VERSION>` | Force a specific version, skipping commit analysis. Format: `VERSION` (single repo) or `NAME@VERSION` (monorepo) |
18
+ | `--channel <NAME>` | Pre-release channel override (e.g. `beta`, `rc`, `dev`) |
19
+ | `--draft` | Create releases as drafts (GitHub only). A later `ferrflow release` without `--draft` detects and publishes existing drafts automatically |
20
+ | `--force-unlock` | Break an existing `.git/ferrflow.lock` before acquiring it. Use only when no other `ferrflow release` is running — e.g. after a crash left the lockfile behind |
21
+
22
+ **What it does:**
23
+
24
+ 1. Scans commits since the last tag for each package
25
+ 2. Determines the version bump from Conventional Commits
26
+ 3. Updates all `versionedFiles` with the new version
27
+ 4. Appends the new section to `CHANGELOG.md`
28
+ 5. Creates a git commit, opens a PR, or skips (depending on `releaseCommitMode`)
29
+ 6. Creates and pushes the git tag
30
+ 7. Creates a GitHub/GitLab release with the changelog as notes
31
+
32
+ ### Which version is bumped from
33
+
34
+ Starting with FerrFlow **v3**, the baseline for every bump is **the highest semver-valid tag** for the package (e.g. `my-pkg@v2.4.1` or `v2.4.1`), not the value in the versioned file.
35
+
36
+ The versioned file stays the canonical write target so downstream consumers (`cargo publish`, Docker builds, etc.) always see a coherent version, but it is no longer the source of truth for the bump computation. This prevents two classes of silent failure:
37
+
38
+ - **Parallel release workflows**: two pull requests merging back-to-back used to spawn two release jobs that both read the pre-release version from the file. Both computed the same next version — the second push either collided or was silently skipped. Today the second workflow sees the first workflow's freshly-pushed tag and computes the correct next version on top of it.
39
+ - **File/tag drift**: a revert, a merge from an old branch, or a manual edit could leave the file behind the tags. Bumping from a stale file produced tags that collided with history and the release got silently skipped with `tag X already exists, skipping`. The tag now wins; the file only wins when it is genuinely ahead (human pre-bump).
40
+
41
+ Resolution order, per package:
42
+
43
+ | Tag | File | Baseline used |
44
+ | ------- | ------- | ------------------------------ |
45
+ | present | present | `max(tag, file)` by semver |
46
+ | present | absent | tag |
47
+ | absent | present | file |
48
+ | absent | absent | strategy bootstrap (see below) |
49
+
50
+ ### First release on a brand-new repo
51
+
52
+ When no tag exists yet _and_ the format has no version to read (notably `go.mod`, which stores the version in tags alone), FerrFlow bootstraps from the versioning strategy's zero value:
53
+
54
+ | Strategy | Bootstrap baseline |
55
+ | ------------------------ | ---------------------------------------- |
56
+ | `semver`, `zerover` | `0.0.0` |
57
+ | `sequential` | `0` |
58
+ | `calver-seq` | `0.0` |
59
+ | `calver`, `calver-short` | ignored — bump derives from today's date |
60
+
61
+ From there the first `feat:` commit bumps to `0.1.0` / `1` / today's date / … and the release flow creates the tag itself — no `git tag foo@v0.0.0` ceremony required before the first run.
62
+
63
+ ---
64
+
65
+ ## `ferrflow check`
66
+
67
+ Preview what `ferrflow release` would do without making any changes.
68
+
69
+ ```bash
70
+ ferrflow check [OPTIONS]
71
+ ```
72
+
73
+ | Flag | Description |
74
+ | ------------------ | ------------------------------------------------------- |
75
+ | `--json` | Output as JSON |
76
+ | `--channel <NAME>` | Pre-release channel override (e.g. `beta`, `rc`, `dev`) |
77
+ | `--comment` | Post a preview comment on the current PR/MR |
78
+
79
+ ---
80
+
81
+ ## `ferrflow publish`
82
+
83
+ Run the configured [publishers](/docs/configuration/config-file/#publishers) for the currently-released version of each package — without bumping, committing, or tagging. `ferrflow release` already runs your publishers at the end of a release; `ferrflow publish` is for when you'd rather run them in a **separate CI job** that has the build toolchain and registry auth the publishers need (docker buildx, helm, a built `dist/`, …) which your release job may not.
84
+
85
+ ```bash
86
+ ferrflow publish [PACKAGES...]
87
+ ```
88
+
89
+ | Argument / flag | Description |
90
+ | --------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
91
+ | `[PACKAGES...]` | Publish these packages by name (space-separated). Omit to auto-detect from the triggering tag (`GITHUB_REF` / `CI_COMMIT_TAG`), falling back to every package that declares publishers. |
92
+ | `--all`, `-a` | Publish every package, ignoring any triggering-tag scope. |
93
+
94
+ It reads each package's current version from its `versionedFiles` (or the latest matching tag for tag-only packages), so run it **after** `ferrflow release` has cut the version. Publishers are idempotent: anything already on the registry is skipped, so a re-run is safe. Use the global `--dry-run` to preview without publishing.
95
+
96
+ **Scope resolution.** With no arguments, if the run was triggered by a package tag (e.g. `api@v2.2.1`), only that package is published — so a single tag-triggered workflow publishes each package on its own tag, with no per-package wiring. Without a matching tag (for example the release job's own branch ref), every package is published, as before. Pass package names to target a subset explicitly, or `--all` to force every package even under a tag.
97
+
98
+ The GitHub Action exposes this as `mode: publish` — it installs the binary and runs `ferrflow publish` for you, scoping to the triggering tag automatically (or pass the `package` input to override). A tag-triggered job only has to set up the toolchain its publishers need:
99
+
100
+ ```yaml title=".github/workflows/publish.yml"
101
+ on:
102
+ push:
103
+ # `v*` for single-package repos; `*@v*` for monorepo per-package tags
104
+ tags: ['v*', '*@v*']
105
+ jobs:
106
+ publish:
107
+ runs-on: ubuntu-latest
108
+ permissions:
109
+ contents: read
110
+ packages: write
111
+ steps:
112
+ - uses: actions/checkout@v6
113
+ - uses: docker/setup-buildx-action@v4
114
+ - uses: docker/login-action@v4
115
+ with:
116
+ registry: ghcr.io
117
+ username: ${{ github.actor }}
118
+ password: ${{ secrets.GITHUB_TOKEN }}
119
+ - uses: FerrLabs/FerrFlow@v5
120
+ with:
121
+ mode: publish
122
+ ```
123
+
124
+ ---
125
+
126
+ ## `ferrflow changelog`
127
+
128
+ Generate or update `CHANGELOG.md` only, without bumping versions or creating tags.
129
+
130
+ ```bash
131
+ ferrflow changelog
132
+ ```
133
+
134
+ Takes no command-specific flags. Use the global `--dry-run` to print the entry without writing it.
135
+
136
+ ---
137
+
138
+ ## `ferrflow init`
139
+
140
+ Scaffold a config file for the current repository. Detects existing version files (`Cargo.toml`, `package.json`, etc.) and generates the appropriate config.
141
+
142
+ ```bash
143
+ ferrflow init [OPTIONS]
144
+ ```
145
+
146
+ | Flag | Description |
147
+ | ------------------- | ---------------------------------------------- |
148
+ | `--format <FORMAT>` | Config file format: `json`, `json5`, or `toml` |
149
+
150
+ ---
151
+
152
+ ## `ferrflow migrate`
153
+
154
+ Generate a FerrFlow config from an existing release tool's configuration. Point it at your repo and it writes the equivalent `ferrflow.json`.
155
+
156
+ ```bash
157
+ ferrflow migrate [OPTIONS]
158
+ ```
159
+
160
+ | Flag | Description |
161
+ | --------------- | --------------------------------------------------------------------------------------------------------- |
162
+ | `--from <TOOL>` | Source: `semantic-release`, `changesets`, `release-please`, `standard-version`. Auto-detected if omitted. |
163
+
164
+ ### Sources
165
+
166
+ | Tool | Reads | Highlights of what maps |
167
+ | ------------------ | ------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
168
+ | `semantic-release` | `.releaserc`, `.releaserc.json` | `tagFormat` → `tagTemplate`; `branches` → channels; `@semantic-release/exec` → `hooks`; `changelog` / `github` / `gitlab` plugins (see the plugin table below) |
169
+ | `release-please` | `release-please-config.json` | the `packages` map → FerrFlow packages (per-package `release-type` → the right version file/format); `include-component-in-tag` → `tagTemplate`; PR flow → `releaseCommitMode: pr` |
170
+ | `standard-version` | `.versionrc`, `.versionrc.json` | `tagPrefix` → `tagTemplate`; `bumpFiles` / `packageFiles` → `versionedFiles` |
171
+ | `changesets` | `.changeset/config.json` | `baseBranch` → `branch`; `linked` / `fixed` → version groups (see note) |
172
+
173
+ semantic-release plugin mapping:
174
+
175
+ | semantic-release | FerrFlow |
176
+ | ------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- |
177
+ | `tagFormat: "v${version}"` | `tagTemplate: "v{{version}}"` |
178
+ | `branches` | `branches` — `main`/`master` become the stable line, a `prerelease: true` (or named) branch becomes a channel |
179
+ | `@semantic-release/changelog` | the package's `changelog` path |
180
+ | `@semantic-release/exec` | `hooks` (`prepareCmd` → `preBump`, `publishCmd` → `postPublish`, `successCmd` → `onSuccess`, `failCmd` → `onError`, `verifyConditionsCmd` → `preRelease`) |
181
+ | `@semantic-release/github` / `gitlab` | `forge` |
182
+
183
+ Anything without a FerrFlow equivalent is **surfaced, never guessed**. Each run prints what it mapped, what it ignored, and what needs manual review — for example `@semantic-release/npm` (configure `publishers` by hand), custom `commit-analyzer` release rules (FerrFlow's bump rules are fixed), and `repositoryUrl` (FerrFlow derives the remote from git). It won't overwrite an existing FerrFlow config.
184
+
185
+ <aside class="ferr-aside ferr-aside--note"><div class="ferr-aside__body"><p><strong>changesets.</strong> changesets versions from hand-written <code>.changeset/*.md</code> files, while FerrFlow versions from conventional commits — after migrating you adopt Conventional Commits, and your existing changeset files aren't read. FerrFlow reads your workspace declaration (<code>workspaces</code> in <code>package.json</code>, or <code>pnpm-workspace.yaml</code>) and scaffolds one <code>package</code> entry per discovered package, so <code>linked</code>/<code>fixed</code> groups already reference real packages and the migrated config validates as-is. A repo with no workspace declaration gets a single root package.</p>
186
+ </div></aside>
187
+
188
+ ```bash
189
+ ferrflow migrate # auto-detect
190
+ ferrflow migrate --from release-please
191
+ ```
192
+
193
+ JSON, YAML, and JavaScript source configs all work — a JavaScript config (`.releaserc.js`, `release.config.js`, `.versionrc.js`) is evaluated with `node` (so it needs Node.js on PATH), and a YAML config (`.releaserc.yaml`, `.versionrc.yaml`) is parsed directly. After migrating, review the generated config, then run `ferrflow validate` and `ferrflow check`.
194
+
195
+ ---
196
+
197
+ ## `ferrflow status`
198
+
199
+ Show the current version of each package and whether a release would be triggered.
200
+
201
+ ```bash
202
+ ferrflow status [OPTIONS]
203
+ ```
204
+
205
+ | Flag | Description |
206
+ | ------------------- | ----------------------------------------- |
207
+ | `--output <FORMAT>` | Output format: `text` (default) or `json` |
208
+
209
+ Example output:
210
+
211
+ ```
212
+ api 1.2.3 minor bump pending (1 feat commit)
213
+ site 0.4.1 no release (only chore commits)
214
+ ```
215
+
216
+ ---
217
+
218
+ ## `ferrflow why`
219
+
220
+ Explain the release decision for a single package: whether it counts as touched, which commits were classified and how, what its dependencies are doing, and the bump that falls out of all of it. This is the command to reach for when a package did not release and it is not obvious why.
221
+
222
+ ```bash
223
+ ferrflow why [PACKAGE] [OPTIONS]
224
+ ```
225
+
226
+ | Argument / flag | Description |
227
+ | --------------------- | ---------------------------------------------------------------------------------------- |
228
+ | `[PACKAGE]` | Package name — required in a monorepo, optional (and inferred) in a single-package repo. |
229
+ | `--channel <CHANNEL>` | Explain the decision for a prerelease channel (`beta`, `rc`, …) instead of a stable run. |
230
+ | `--json` | Emit the explanation as a structured JSON object instead of the human view. |
231
+
232
+ ```
233
+ Package: web
234
+ Path: web
235
+ Strategy: semver
236
+ Version: 1.0.0
237
+
238
+ Last tag: web@v1.0.0 (7dcc20b, 3 days ago, reachable from HEAD)
239
+
240
+ Touch check (changed files at HEAD):
241
+ ✗ core/src/api.rs no match
242
+ → not touched
243
+
244
+ Dependencies:
245
+ core bumping (major) propagate: patch → patch
246
+
247
+ Decision: patch bump from the dependency cascade — 1.0.0 → 1.0.1, tag web@v1.0.1
248
+ ```
249
+
250
+ The report reads top to bottom as the decision is made:
251
+
252
+ - **Last tag** — the tag the range starts from, when it was cut, and whether its commit is still reachable from `HEAD`. A tag that is _not_ reachable (rebased away, force pushed) is why a package can look released and still replay its whole history.
253
+ - **Touch check** — the file set that decided whether the package is in scope, with the `path` or `sharedPaths` prefix each file matched. The set is `HEAD`'s changed files, or everything since the last tag when [`recoverMissedReleases`](/docs/configuration/config-file/) pulled the package back in.
254
+ - **Commits considered** — every commit back to the package's last tag with its individual bump. Bump classification is _not_ path-scoped, so a `feat!:` on a sibling package still counts here; this section is usually where an unexpected major comes from.
255
+ - **Dependencies** — each `dependsOn` entry, whether that upstream is moving this run, its `propagate` policy, and what the policy resolves to.
256
+ - **Decision** — the bump, the version range, the tag, and whether it came from the package's own commits or from the dependency cascade.
257
+
258
+ The verdict comes from the same planning code `ferrflow release` runs, so `why` and the next release cannot disagree.
259
+
260
+ ---
261
+
262
+ ## `ferrflow diff`
263
+
264
+ Compare two versions of a package: the commits that went in, each commit's bump, the files changed, and the changelog FerrFlow would generate for the range. Handy for auditing a release, checking why a version bumped the way it did, or writing release notes for a range after the fact.
265
+
266
+ ```bash
267
+ ferrflow diff [PACKAGE] <FROM>..<TO> [--json]
268
+ ```
269
+
270
+ | Argument / flag | Description |
271
+ | --------------- | --------------------------------------------------------------------------------------------- |
272
+ | `<FROM>..<TO>` | The version range. Each side is a tag or version — `v1.4.0`, or a full tag like `api@v1.6.0`. |
273
+ | `[PACKAGE]` | Package name — required in a monorepo, optional (and inferred) in a single-package repo. |
274
+ | `--json` | Emit the comparison as a structured JSON object instead of the human view. |
275
+
276
+ Each endpoint resolves by trying the string as a tag first (a real tag, or `v1.4.0` in a single-package repo), then as the package's tag for that version (`api@v1.4.0`).
277
+
278
+ ```bash
279
+ ferrflow diff v1.4.0..v1.6.0 # single-package repo
280
+ ferrflow diff api v1.4.0..v1.6.0 # monorepo — name the package
281
+ ```
282
+
283
+ The output lists every commit in the range with its individual bump (`major` / `minor` / `patch` / `none`), highlights breaking changes, summarises the changed files, and renders the changelog section for the range. In a monorepo the range is scoped to the named package: only commits touching its `path` or `sharedPaths` are considered.
284
+
285
+ ---
286
+
287
+ ## `ferrflow version`
288
+
289
+ Print the current version of one or all packages. Useful in CI scripts.
290
+
291
+ ```bash
292
+ ferrflow version [PACKAGE] [OPTIONS]
293
+ ```
294
+
295
+ | Flag | Description |
296
+ | -------- | -------------- |
297
+ | `--json` | Output as JSON |
298
+
299
+ Returns the version from the latest git tag matching the package's tag template.
300
+
301
+ ---
302
+
303
+ ## `ferrflow tag`
304
+
305
+ Print the latest tag for one or all packages.
306
+
307
+ ```bash
308
+ ferrflow tag [PACKAGE] [OPTIONS]
309
+ ```
310
+
311
+ | Flag | Description |
312
+ | -------- | -------------- |
313
+ | `--json` | Output as JSON |
314
+
315
+ ---
316
+
317
+ ## `ferrflow validate`
318
+
319
+ Validate the config and the versioned files it points at, without bumping anything. Pass `--repo` to validate a remote repository instead of the working tree.
320
+
321
+ ```bash
322
+ ferrflow validate [OPTIONS]
323
+ ```
324
+
325
+ | Flag | Description |
326
+ | --------------- | --------------------------------------------------------------------------------------- |
327
+ | `--json` | Output as JSON |
328
+ | `--repo <REPO>` | Remote repository to validate (e.g. `owner/repo` for GitHub, or `gitlab:group/project`) |
329
+ | `--ref <REF>` | Git ref for remote validation (branch, tag, or commit) |
330
+
331
+ ---
332
+
333
+ ## `ferrflow doctor`
334
+
335
+ Run read-only diagnostics on the repo, config, and forge setup and print a categorised report — the "is my setup sane?" command. Use it on a fresh checkout to see what's missing before the first release, or when a run behaves unexpectedly and you'd otherwise be staring at `--verbose` logs.
336
+
337
+ ```bash
338
+ ferrflow doctor [OPTIONS]
339
+ ```
340
+
341
+ | Flag | Description |
342
+ | ---------------- | --------------------------------------------------------------------- |
343
+ | `--format <FMT>` | `human` (default) or `json` |
344
+ | `--online` | Also probe the forge API (GitHub rate limit / auth); requires a token |
345
+
346
+ The report groups checks into five sections — **Repo** (git repository, commit history, clean working tree, remote, tags), **Config** (which config file wins, whether it parses, plus the full `ferrflow validate` check suite), **Versioning** (strategy and each package's on-disk version), **Forge** (detected forge and whether an auth token is present in the environment), and **CI** (workflow files, and whether a workflow pins the `FerrLabs/FerrFlow` action). Every check reports green, a warning, or an error.
347
+
348
+ The exit code is scriptable: `0` when everything is green, `1` if there are only warnings, `2` if any check errors. `--format json` has a stable shape — `{ status, exit_code, sections: [{ title, checks: [{ name, status, detail }] }] }` — so CI can assert on it.
349
+
350
+ ```bash
351
+ ferrflow doctor # human report
352
+ ferrflow doctor --format json # machine-readable, stable for CI
353
+ ferrflow doctor --online # also check the GitHub API rate limit
354
+ ```
355
+
356
+ ---
357
+
358
+ ## `ferrflow completions`
359
+
360
+ Generate a shell completion script and print it to stdout.
361
+
362
+ ```bash
363
+ ferrflow completions <SHELL>
364
+ ```
365
+
366
+ `<SHELL>` is one of `bash`, `elvish`, `fish`, `powershell`, or `zsh`.
367
+
368
+ ---
369
+
370
+ ## `ferrflow schema`
371
+
372
+ Print the JSON schema for the ferrflow config file. The schema is bundled into the binary, so this works offline — no network call to `ferrflow.com/schema/ferrflow.json`.
373
+
374
+ ```bash
375
+ ferrflow schema [OPTIONS]
376
+ ```
377
+
378
+ | Flag | Description |
379
+ | ----------------- | ----------------------------------------------------- |
380
+ | `--pretty` | Format the output instead of compact single-line JSON |
381
+ | `--output <FILE>` | Write to a file instead of stdout |
382
+
383
+ Use it to point an editor at a local copy, or to validate `.ferrflow.json` in a pre-commit hook with no internet access:
384
+
385
+ ```bash
386
+ ferrflow schema --pretty --output ferrflow.schema.json
387
+ ```
388
+
389
+ Then set `"$schema": "./ferrflow.schema.json"` in your config. The command parses the bundled schema before printing, so it exits non-zero if the build artefact is somehow corrupt.
390
+
391
+ ---
392
+
393
+ ## Global flags
394
+
395
+ These flags work with all commands:
396
+
397
+ | Flag | Description |
398
+ | ----------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
399
+ | `--dry-run` | Show what would happen without making any changes |
400
+ | `--verbose`, `-v` | Verbose output, including commit hashes and file diffs |
401
+ | `--log-format <FORMAT>` | Diagnostic output format on stderr: `human` (default, colored) or `json` (one structured event per line). Command **data** (`--json`, `version` / `tag` values) always stays on stdout. |
402
+ | `--config <PATH>` | Path to a custom config file (default: auto-detected). Also accepts the `FERRFLOW_CONFIG` env variable. |
403
+ | `--jobs <N>` | Max threads for CPU-parallel work (per-package planning). Default: all logical cores; `1` forces single-threaded. Also accepts the `FERRFLOW_JOBS` env variable. |
404
+ | `--version` | Print the FerrFlow version and exit |
405
+ | `--help`, `-h` | Print help |
406
+
407
+ ## Logging & output
408
+
409
+ FerrFlow separates **data** from **logs** across the two output streams:
410
+
411
+ - **stdout** carries data — the `--json` output of `check` / `release` / `status` / `validate`, and the value printed by `version` and `tag`. Capture it in scripts: `V=$(ferrflow version)`.
412
+ - **stderr** carries the human status report and every diagnostic event.
413
+
414
+ So you can capture the machine result and the run log independently:
415
+
416
+ ```bash
417
+ ferrflow check --json > result.json 2> run.log
418
+ ```
419
+
420
+ `--log-format json` renders each diagnostic as one structured JSON event per line on stderr, ready for Datadog / Loki / CloudWatch:
421
+
422
+ ```json
423
+ {
424
+ "timestamp": "2026-01-01T00:00:00Z",
425
+ "level": "INFO",
426
+ "fields": { "message": "✓ Updated CHANGELOG.md" },
427
+ "target": "ferrflow::changelog"
428
+ }
429
+ ```
430
+
431
+ `--verbose` (or a `RUST_LOG` filter such as `RUST_LOG=ferrflow::git=trace`) controls which levels are shown.
@@ -0,0 +1,88 @@
1
+ ---
2
+ title: Conventional Commits
3
+ description: How FerrFlow interprets commit messages to determine version bumps.
4
+ ---
5
+
6
+ FerrFlow follows the [Conventional Commits](https://www.conventionalcommits.org/) specification to determine how much to bump the version.
7
+
8
+ ## Bump rules
9
+
10
+ | Commit type | Version bump | Example |
11
+ | ----------------------------- | ------------ | ----------------------------------- |
12
+ | `feat:` | **minor** | `feat: add wallet subscriptions` |
13
+ | `fix:` | patch | `fix: correct pagination offset` |
14
+ | `perf:` | patch | `perf: cache user queries` |
15
+ | `refactor:` | patch | `refactor: extract auth middleware` |
16
+ | `feat!:` or `BREAKING CHANGE` | **major** | `feat!: remove deprecated endpoint` |
17
+ | `chore:` | none | `chore: update dependencies` |
18
+ | `docs:` | none | `docs: update README` |
19
+ | `ci:` | none | `ci: add linting step` |
20
+ | `style:` | none | `style: format code` |
21
+ | `test:` | none | `test: add unit tests` |
22
+
23
+ ## Breaking changes
24
+
25
+ A breaking change can be indicated in two ways:
26
+
27
+ **Exclamation mark suffix:**
28
+
29
+ ```
30
+ feat!: remove the /v1/users endpoint
31
+ fix!: change authentication header format
32
+ ```
33
+
34
+ **`BREAKING CHANGE` footer:**
35
+
36
+ ```
37
+ feat: redesign the API
38
+
39
+ BREAKING CHANGE: The /v1/users endpoint has been removed. Use /v2/users instead.
40
+ ```
41
+
42
+ Both produce a **major** version bump.
43
+
44
+ ### Accepted footer variants
45
+
46
+ FerrFlow recognises the common real-world spellings of the footer, not just the strict spec form:
47
+
48
+ | Footer | Detected |
49
+ | ------------------------------------------- | ---------------------- |
50
+ | `BREAKING CHANGE: …` | yes (spec) |
51
+ | `BREAKING-CHANGE: …` | yes (spec synonym) |
52
+ | `breaking-change: …` / `breaking change: …` | yes (case-insensitive) |
53
+ | `Breaking Change: …` | yes (case-insensitive) |
54
+
55
+ It also treats a `!` placed **inside** the scope — `feat(api!):`, a common typo for `feat(api)!:` — as a breaking marker. The footer may sit after any number of body paragraphs.
56
+
57
+ ### What is _not_ a breaking change
58
+
59
+ Detection stays strict, so a stray mention never triggers an accidental major bump:
60
+
61
+ - The footer must start a line, use a single space or hyphen (`BREAKING CHANGE` / `BREAKING-CHANGE`), and be followed by a colon **and a space**. `BREAKING CHANGE:no-space` and the plural `BREAKING CHANGES:` are ignored.
62
+ - A prose mention mid-line — "this fixes a breaking change in the parser" — is not a footer.
63
+ - A `!` that is not immediately before the closing paren — `feat(a!b):` — is not a marker.
64
+
65
+ ## Scope
66
+
67
+ Scopes are optional and ignored for bump calculation. They're useful for readability:
68
+
69
+ ```
70
+ feat(auth): add OAuth2 support → minor bump
71
+ fix(db): correct index on user table → patch bump
72
+ ```
73
+
74
+ ## No release
75
+
76
+ Commits with types `chore`, `docs`, `ci`, `style`, or `test` do not trigger a release. If all commits since the last tag are of these types, FerrFlow exits without creating a new version.
77
+
78
+ ## Multiple commits
79
+
80
+ When multiple commits are present since the last tag, FerrFlow takes the **highest** bump across all of them:
81
+
82
+ ```
83
+ fix: correct typo → patch
84
+ feat: add export button → minor ← wins
85
+ chore: lint → none
86
+ ```
87
+
88
+ Result: **minor** bump.