Binary distribution for semverctl
Project description
semverctl
CLI for bumping and setting SemVer values in JSON/YAML files
Features
- ✨ Semantic Versioning - Strict SemVer 2.0.0 compliance with prerelease and build metadata support
- 📁 Multiple Formats - JSON and YAML file support
- 🎯 Path Navigation - Dot-notation paths for nested version fields (e.g.,
.app.version) - 🔢 Numeric Bumping - Bump individual numeric fields for object-style versions
- 🧪 Dry-Run Mode - Preview changes with unified diff output
- 🌐 Cross-Platform - Linux, macOS, and Windows support (CGO-free)
- ⚡ Zero Dependencies - Pure Go implementation with no runtime dependencies
- 📦 Multiple Distribution Channels - Go install, npm, uv/PyPI, and GitHub Releases
Installation
Go
go install github.com/metalagman/semverctl/cmd/semverctl@latest
npm (Node.js)
npx @metalagman/semverctl version
# Or install globally
npm install -g @metalagman/semverctl
semverctl version
uv/Pip (Python)
uvx semverctl version
# Or install
uv pip install semverctl
semverctl version
Pre-built Binaries
Download pre-built binaries from GitHub Releases:
# Linux/macOS
curl -L https://github.com/metalagman/semverctl/releases/latest/download/semverctl-linux-amd64 -o semverctl
chmod +x semverctl
sudo mv semverctl /usr/local/bin/
# Verify checksum (recommended)
curl -L https://github.com/metalagman/semverctl/releases/latest/download/checksums.txt -o checksums.txt
sha256sum -c checksums.txt
Usage
Bump Version
Bump the semantic version at the specified path in JSON or YAML files:
# Bump patch version in package.json (default target)
semverctl bump
# Bump specific version component in package.json
semverctl bump --minor
semverctl bump --major
semverctl bump --patch
# Bump version in a specific file at a custom path
semverctl bump --file config.yaml --path .app.version
# Bump all matching files in current directory tree
semverctl bump --glob "**/*.json"
# Preview changes without modifying files
semverctl bump --dry-run
Set Version
Set an explicit version value:
# Set version to 1.2.3 in package.json (default target)
semverctl set 1.2.3
# Set version in a specific file at a custom path
semverctl set 2.0.0 --file config.yaml --path .app.version
# Set version in all matching files under current directory
semverctl set 2.0.0 --glob "**/*.json"
# Preview changes
semverctl set 1.0.0 --dry-run
Numeric Bump
For object-style version fields (e.g., { "Major": 1, "Minor": 2, "Patch": 3 }),
you can bump numeric scalar values:
semverctl bump --numeric --path .version.Patch --file config.json
This increments the numeric value at the specified path by 1.
Path Syntax
Paths use dot notation to navigate nested structures:
.version- Top-level version field.app.version- Nested version field.package.version- Deeply nested field
The leading dot is optional: version and .version are equivalent.
File Formats
Supported formats:
- JSON (
.json) - YAML (
.yaml,.yml)
Strict SemVer
semverctl follows the Semantic Versioning 2.0.0 specification:
- Versions must be in format
MAJOR.MINOR.PATCH - Prerelease and build metadata are supported:
1.0.0-alpha+build.123 - Leading zeros are not allowed in numeric components
- When bumping, prerelease and build metadata are cleared
Dry-Run Mode
Use --dry-run to preview changes without modifying files:
semverctl bump --dry-run package.json
This outputs a unified diff showing what would change.
Exit Codes
0- Success1- Error (invalid arguments, file not found, parse error, etc.)
License
MIT License - see LICENSE file for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file semverctl-0.0.8-py3-none-win_amd64.whl.
File metadata
- Download URL: semverctl-0.0.8-py3-none-win_amd64.whl
- Upload date:
- Size: 3.6 MB
- Tags: Python 3, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.6 {"installer":{"name":"uv","version":"0.10.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
19002c5869bf8df2e48659a15e20410c2395bbd1ba6a9064e70f47cc0d9e8880
|
|
| MD5 |
0e55011ba6e1531e5cb724cd9ac72199
|
|
| BLAKE2b-256 |
f58bccaa8d5a9a9ecc218107144d482beb05ba943febe2544b96ad36c354a99f
|
File details
Details for the file semverctl-0.0.8-py3-none-manylinux2014_x86_64.whl.
File metadata
- Download URL: semverctl-0.0.8-py3-none-manylinux2014_x86_64.whl
- Upload date:
- Size: 3.4 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.6 {"installer":{"name":"uv","version":"0.10.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b7d0206cd46efbb36b0bfa40c164b2f7a8afd301d50fc3aac23e6b9908813d29
|
|
| MD5 |
0692a38deaec3890e05d696ac3760cf7
|
|
| BLAKE2b-256 |
5de1f8b7f9331fc179ab6c8475ab182c54f293ae017cb2f4c9ac421bd0cb349e
|
File details
Details for the file semverctl-0.0.8-py3-none-manylinux2014_aarch64.whl.
File metadata
- Download URL: semverctl-0.0.8-py3-none-manylinux2014_aarch64.whl
- Upload date:
- Size: 3.3 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.6 {"installer":{"name":"uv","version":"0.10.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ce920dec3808156cbd05adb7c9afa00a59482e5ab5a310d19b1a139a1a7f8fe2
|
|
| MD5 |
6a66b617535575945f516ecd23aeb2bb
|
|
| BLAKE2b-256 |
20a195a58f1f89ba26081df73a83b3509051c8d287af91e978dbf35f43f6a1c8
|
File details
Details for the file semverctl-0.0.8-py3-none-macosx_11_0_arm64.whl.
File metadata
- Download URL: semverctl-0.0.8-py3-none-macosx_11_0_arm64.whl
- Upload date:
- Size: 3.4 MB
- Tags: Python 3, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.6 {"installer":{"name":"uv","version":"0.10.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
13c2d494bfb0bcb5ffafa461287820abfd2c2f22a74261a7cf73c35a64164140
|
|
| MD5 |
5de6238fcfcd601d96469a4edf7b781b
|
|
| BLAKE2b-256 |
5ec91a6136d73a435f99494fdccc8bd67aa58745685a41874fc887ad58670c29
|
File details
Details for the file semverctl-0.0.8-py3-none-macosx_10_13_x86_64.whl.
File metadata
- Download URL: semverctl-0.0.8-py3-none-macosx_10_13_x86_64.whl
- Upload date:
- Size: 3.5 MB
- Tags: Python 3, macOS 10.13+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.6 {"installer":{"name":"uv","version":"0.10.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cc8f750005004812915afccceb178b6e358929863bc4524bfa75c3a2ed922e57
|
|
| MD5 |
8753ba4d644e2b93364ec78c4112b654
|
|
| BLAKE2b-256 |
1a8be2ece7c80bf0e18849126239a791daec0a7c411d1695ea0e6572087a13db
|