Navigation: Documentation Index · Failure Matrix · Configuration Reference
Complete reference for all Versionings CLI commands, flags, and output formats.
These flags are available on every command.
| Flag | Type | Default | Description |
|---|---|---|---|
--json |
boolean | false |
Output in JSON format |
--verbose |
boolean | false |
Enable verbose output |
--ci |
boolean | false |
Run in CI mode (non-interactive, no prompts) |
--non-interactive |
boolean | false |
Disable interactive prompts |
--yes / -y |
boolean | false |
Auto-confirm all prompts |
--strict |
boolean | false |
Treat unknown config fields as errors |
--print-config |
boolean | false |
Print resolved config with provenance and exit |
Generate a configuration file.
versionings init [--format=<json|yaml>]| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--format |
string | No | — | Output format for the config file. Choices: json, yaml |
Local development — interactive config wizard:
versionings initGenerate a YAML config file:
versionings init --format=yamlCI — generate JSON config non-interactively:
versionings init --format=json --non-interactiveValidate configuration and environment. This command does not modify the repository.
versionings validateNo command-specific parameters. Use global flags as needed.
Local development — check config and git setup:
versionings validateCI — JSON output for automated checks:
versionings validate --jsonCI — fail on unknown config fields:
versionings validate --strictShow execution plan without making changes (dry-run). This command does not modify the repository.
versionings plan --semver=<type> --branch=<name> [options]| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--semver |
string | Yes | — | Semantic version type. Choices: patch, prepatch, minor, preminor, premajor, prerelease, major, auto |
--branch |
string | Yes | — | Branch comment / description |
--push |
boolean | No | false |
Include push step in plan |
--preid |
string | No | — | Prerelease identifier |
--pr-mode |
string | No | auto |
PR creation mode. Choices: auto, api, url |
--no-pr |
boolean | No | false |
Skip PR/MR creation |
Local development — preview a patch release:
versionings plan --semver=patch --branch=fix-loginCI — JSON plan for automated processing:
versionings plan --semver=minor --branch=new-feature --jsonExecute the versioning workflow. This command modifies the repository (creates branches, tags, bumps version).
versionings release --semver=<type> --branch=<name> [options]| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--semver |
string | Yes | — | Semantic version type. Choices: patch, prepatch, minor, preminor, premajor, prerelease, major, auto |
--branch |
string | Yes | — | Branch comment / description |
--push |
boolean | No | false |
Push branch and tags to remote |
--preid |
string | No | — | Prerelease identifier |
--dry-run |
boolean | No | false |
Show plan without executing (equivalent to plan) |
--pr-mode |
string | No | auto |
PR creation mode. Choices: auto, api, url |
--no-pr |
boolean | No | false |
Skip PR/MR creation |
Local development — interactive patch release:
versionings release --semver=patch --branch=fix-loginPush and auto-confirm — minor release without prompts:
versionings release --semver=minor --branch=feat --push --yesCI — fully non-interactive release:
versionings release --semver=patch --branch=fix --ciRollback the last versioning operation. Reverses completed mutation steps in LIFO order.
versionings rollback [--from=<path>]| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--from |
string | No | — | Path to a specific operation log file |
Local development — rollback the most recent operation:
versionings rollbackAuto-confirm rollback without prompts:
versionings rollback --yesRollback a specific operation by log file:
versionings rollback --from=.versionings/operations/2025-01-15.jsonDiagnose environment and configuration. This command does not modify the repository.
versionings doctorNo command-specific parameters. Use global flags as needed.
Local development — run all diagnostics:
versionings doctorCI — JSON diagnostics for automated processing:
versionings doctor --jsonGenerate changelog from commit history. This command does not modify the repository unless --output is specified.
versionings changelog [options]| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
--from |
string | No | — | Start tag or commit SHA |
--to |
string | No | HEAD |
End tag or commit SHA |
--output |
string | No | — | Write changelog to file |
--format |
string | No | markdown |
Output format. Choices: markdown, plain |
Generate changelog to stdout:
versionings changelogWrite changelog to a file:
versionings changelog --output=CHANGELOG.mdGenerate changelog for a specific range:
versionings changelog --from=v1.0.0 --to=v2.0.0CI — structured JSON output:
versionings changelog --jsonFor backward compatibility, invoking versionings without a subcommand but with --semver and --branch flags is equivalent to versionings release:
# Legacy syntax (still supported)
versionings --semver=patch --branch=fix-login
# Equivalent modern syntax
versionings release --semver=patch --branch=fix-loginThe CLI automatically prepends the release subcommand when --semver and --branch are present without a recognized subcommand.
Versionings supports two interaction modes that control how prompts and confirmations are handled.
When running in a terminal (TTY), Versionings operates in interactive mode by default. In this mode:
- Confirmation prompts are displayed before mutation operations (release, rollback)
- The
initcommand runs an interactive configuration wizard - Progress output is displayed with formatting
Non-interactive mode disables all prompts and is activated by any of the following flags:
--ci— designed for CI/CD pipelines; implies non-interactive behavior and suppresses all prompts--non-interactive— explicitly disables interactive prompts--yes/-y— auto-confirms all prompts (operations proceed without user confirmation)
In non-interactive mode, operations that require confirmation proceed automatically. Combine with --json for machine-readable output in CI pipelines:
versionings release --semver=patch --branch=fix --ci --json| Code | Name | Category | Description |
|---|---|---|---|
| 0 | SUCCESS | Success | Successful completion |
| 1 | CONFIG_ERROR | User/Config | Configuration error |
| 2 | DIRTY_TREE | User/Config | Uncommitted changes in working tree |
| 3 | INVALID_ARGS | User/Config | Invalid CLI arguments |
| 4 | ARTIFACT_CONFLICT | User/Config | Branch or tag already exists |
| 5 | COMMAND_FAILED | Runtime | Git/npm command failed |
| 6 | NETWORK_ERROR | Runtime | Network error |
| 7 | INCOMPLETE_ROLLBACK | Runtime | Rollback could not complete all steps |
| 8 | NO_OPERATION | User/Config | Nothing to rollback |
| 9 | USER_CANCELLED | User/Config | User cancelled the operation |
| 10 | POLICY_VIOLATION | User/Config | Branch protection policy violated |
| 11 | NO_CONVENTIONAL_COMMITS | User/Config | No conventional commits found for auto-bump |
For detailed causes and remediation steps, see the Failure Matrix.
When --json is passed, Versionings outputs a single JSON object. No ANSI codes or progress text are included, making it safe for CI script consumption.
{
"ok": true,
"code": 0,
"message": "Release completed successfully",
"data": {
"version": "1.2.3",
"branch": "version/patch/1.2.3/fix-login",
"tag": "1.2.3--fix-login",
"semver": "patch",
"pushed": false
}
}{
"ok": false,
"code": 2,
"message": "Working tree has uncommitted changes",
"errors": [
{
"field": "git.status",
"message": "Uncommitted changes detected: 3 modified files"
}
]
}