|
| 1 | +--- |
| 2 | +id: command-reference |
| 3 | +title: Command Reference |
| 4 | +--- |
| 5 | + |
| 6 | +# Command Reference |
| 7 | + |
| 8 | +## `flopha last-version` |
| 9 | + |
| 10 | +Print the latest matching version. |
| 11 | + |
| 12 | +```bash |
| 13 | +flopha last-version [--pattern <pattern>] [--source <tag|branch>] [--checkout] |
| 14 | +``` |
| 15 | + |
| 16 | +Options: |
| 17 | + |
| 18 | +- `--pattern`, `-p`: Match a custom version format. |
| 19 | +- `--source`, `-s`: Read versions from tags or branches. Default is `tag`. |
| 20 | +- `--checkout`: Check out the resolved version after printing it. |
| 21 | + |
| 22 | +## `flopha next-version` |
| 23 | + |
| 24 | +Calculate the next version. |
| 25 | + |
| 26 | +```bash |
| 27 | +flopha next-version \ |
| 28 | + [--increment <major|minor|patch>] \ |
| 29 | + [--auto] \ |
| 30 | + [--rule <level:regex>] \ |
| 31 | + [--pre <channel>] \ |
| 32 | + [--pattern <pattern>] \ |
| 33 | + [--source <tag|branch>] \ |
| 34 | + [--create] |
| 35 | +``` |
| 36 | + |
| 37 | +Options: |
| 38 | + |
| 39 | +- `--increment`, `-i`: Explicit bump level. Default is `patch`. |
| 40 | +- `--auto`: Detect the bump from commit messages since the last version. |
| 41 | +- `--rule`: Replace the built-in auto-detection rules. Requires `--auto`. |
| 42 | +- `--pre`: Create a pre-release tag like `-alpha.1` or `-rc.1`. |
| 43 | +- `--pattern`, `-p`: Match and generate a custom version format. |
| 44 | +- `--source`, `-s`: Read versions from tags or branches. Default is `tag`. |
| 45 | +- `--create`: Create the new tag or branch after printing it. |
| 46 | + |
| 47 | +## `flopha log` |
| 48 | + |
| 49 | +Show matching versions newest first. |
| 50 | + |
| 51 | +```bash |
| 52 | +flopha log [--pattern <pattern>] [--source <tag|branch>] [--limit <number>] |
| 53 | +``` |
| 54 | + |
| 55 | +Options: |
| 56 | + |
| 57 | +- `--pattern`, `-p`: Match a custom version format. |
| 58 | +- `--source`, `-s`: Read versions from tags or branches. Default is `tag`. |
| 59 | +- `--limit`, `-n`: Limit the number of rows. |
| 60 | + |
| 61 | +## Global behavior |
| 62 | + |
| 63 | +- `--verbose`, `-v` enables debug logging. |
| 64 | +- The CLI fetches from the `origin` remote before resolving versions. |
| 65 | +- The default version pattern is `v{major}.{minor}.{patch}`. |
0 commit comments