百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
S

semver-cli

> DevOps
开源

一个易于使用的 CLI 工具,可根据语义版本规范管理项目版本及其升级

100 stars0 点赞0 次浏览
访问官网GitHub

工具介绍

一个易于使用的 CLI 工具,可根据语义版本规范管理项目版本及其升级

Semantic Versioning Tool

An easy to use CLI tool to manage your projects current version and its upgrades according to the Semantic Versioning specification.

Getting Started

Install

If you already have golang installed you can install by running the command:

bash
go install github.com/maykonlsf/semver-cli/cmd/semver@latest

Homebrew (macOS/Linux)

You can also install via the Homebrew tap (maykonlsf/homebrew-semver-cli):

bash
brew tap maykonlsf/semver-cli
brew install --cask semver-cli

check install

Check if the semver was instaled running the command:

bash
semver 

Init semver

To start managing your project versions enter into the project folder, then run:

bash
semver init

This command will start the versioning based on release version v1.0.0. If you want to start with another version number you car run instead:

bash
semver init  \
    --release [base release version] \
    [ --alpha [curent alpha number] ] \
    [ --beta [current beta number] ] \
    [ --rc [current release candiate number] ] \
    [--force] # to override an already initialized semver in the current directory.

Usage

Get current version

Alpha

Returns the current alpha version (if none will return and "-alpha.0" version).

bash
$ semver get alpha
v1.0.0-alpha.6

Beta

Returns the current beta version (if none will return and "-beta.0" version).

bash
$ semver get beta
v1.0.0-beta.3

Release Candidate

Returns the current release candidate version (if none will return and "-rc.0" version).

bash
$ semver get rc
v1.0.0-rc.1

Release

Returns the current release version.

bash
$ semver get release
v1.0.0

Upgrade version

Alpha

Increment the current alpha version by 1. If none starts with 1.

bash
$ semver up alpha
v1.0.0-alpha.7

Beta

Increment the current beta version by 1. If none starts with 1.

bash
$ semver up beta
v1.0.0-beta.4

Release Candidate

Increment the current release candidate version by 1. If none starts with 1.

bash
$ semver up rc
v1.0.0-rc.2

Release

Upgrade an alpha, beta or rc to its final release version. Also increments the patch number by 1 to a release version:

bash
$ semver up release
v1.0.0

$ semver up release
v1.0.1

Minor

Increments release minor version number by 1 (useful when you start working on next release version) and clear alpha, beta, rc and patch number.

bash
$ semver up minor
v1.1.0

Before you upgrade the minor version the next versions will be generated based on this new minor version.

bash
$ semver up alpha
v1.1.0-alpha.1

$ semver up beta
v1.1.0-beta.1

$ semver up rc
v1.1.0-rc.1

Major

Upgrades the current version to the next major version (when you starts working on a new version with branking changes) and clear alpha, beta, rc, patch and minor number.

bash
$ semver up major
v2.0.0

Before them, your next versions will be generated based on this new version.

bash
$ semver up alpha
v2.0.0-alpha.1

$ semver up beta
v2.0.0-beta.1

$ semver up rc
v2.0.0-rc.1

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Goci-cdclidevops-pipelinego

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类DevOps
定价开源

> 相关工具

D
Docker
容器化平台,标准化应用交付
G
GitHub Actions
GitHub 原生 CI/CD 工作流
N
Nginx
高性能 Web 服务器与反向代理