verz
v0.7.2
Published
[](https://www.npmjs.com/package/verz)
Maintainers
Readme
verz
verz is a simple CLI tool for bumping the version of your Node.js project, committing the change, and creating a Git tag — all in one go.
🤓 Fun fact: verz uses itself to manage its own versions.
📦 Installation
Install verz globally or as a dev dependency:
# Using npm
npm install -D verz
# Using yarn
yarn add -D verz
# Using pnpm
pnpm add -D verzOr run it directly without installation using npx:
npx verz --<type>⚙️ Usage
Run verz in the root of your project:
Version Bumping
verz version --<type> [options]
# or simply
verz --<type> [options]<type> is the type of version bump (see semver)
Release Versioning
Bump the release number for the current version, with optional tenant prefix:
verz release [options]Tagging
Create a git tag for the current version without bumping:
verz tag [options]📑 Options
Version Options
| Option | Description | Default |
|------------------------|----------------------------------------------------------------------------------------------------------|---------------------|
| --patch | Bump the patch version (0.0.x) | false |
| --minor | Bump the minor version (0.x.0) | false |
| --major | Bump the major version (x.0.0) | false |
| --prerelease [preid] | Bump to prerelease version (e.g., 1.0.0 -> 1.0.1-rc.0). Optionally specify preid (alpha, beta, rc, etc.) | false |
| --version <version> | Set exact version (e.g., 1.2.3) | |
| --commit-message | Custom commit message. Use %v for version. | chore: release %v |
| --tag-name | Custom tag name. Use %v for version. | %v |
| --no-check-remote | Skip check if current branch is up-to-date with remote branch | false |
| -v, --verbose | Enable verbose debug logging. | false |
| --dry-run | Run without writing files or committing. | false |
Release Options
| Option | Description | Default |
|---------------------|-----------------------------------------------|---------------------|
| --prefix <prefix> | Optional prefix for release-specific versions | |
| --commit-message | Custom commit message. Use %v for version. | chore: release %v |
| --tag-name | Custom tag name. Use %v for version. | %v |
| -v, --verbose | Enable verbose debug logging. | false |
| --dry-run | Run without writing files or committing. | false |
Tag Options
| Option | Description | Default |
|-----------------|----------------------------------------|---------|
| --tag-name | Custom tag name. Use %v for version. | %v |
| -v, --verbose | Enable verbose debug logging. | false |
| --dry-run | Run without creating the tag. | false |
⚙️ Configuration
You can configure verz using a configuration file. Create one of the following files in your project root:
verz.config.jsverz.config.mjsverz.config.json
Configuration Options
| Option | Description | Default |
|----------------|-----------------------------------------------------------------------------|---------------------|
| commit | Commit configuration | { enabled: true, message: 'chore: release %v' } |
| tag | Tag configuration | { enabled: true, name: '%v' } |
| release | Release configuration | { prefix: '' } |
| dryRun | Run without making changes (for testing) | false |
| checkRemote | Check if branch is up-to-date with remote before versioning | true |
The configuration file structure:
{
"commit": {
"enabled": true,
"message": "chore: version %v"
},
"tag": {
"enabled": true,
"name": "%v"
},
"release": {
"prefix": ""
},
"dryRun": false,
"checkRemote": true
}✅ Examples
Version Bumping Examples
Bump the patch version:
verz --patch
# or
verz version --patchBump to a prerelease version (defaults to 'rc' preid):
verz --prerelease
# or
verz version --prereleaseBump to a specific prerelease type:
verz --prerelease beta
# or
verz version --prerelease betaSet an exact version:
verz --version 2.0.0
# or
verz version --version 2.0.0Release Examples
Bump release number for the current version:
verz release
# Example: 1.0.0 → 1.0.0-r1 → 1.0.0-r2Bump release number with a prefix:
verz release --prefix tenant
# Example: 1.0.0 → 1.0.0-tenant-r1 → 1.0.0-tenant-r2Tagging Examples
Create a tag for the current version:
verz tagCreate a tag with verbose output:
verz tag --verboseOther Examples
Bump the minor version with a custom commit message:
verz --minor --commit.message "release: bump to %v"Create a git tag for the current version without bumping:
verz --tag-onlyDry run (show what would happen without doing it):
verz --major --dry-runEnable verbose logging:
verz --patch -vRun without installing:
npx verz --patch📝 License
MIT License
