syntatis/version-cli 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

syntatis/version-cli

最新稳定版本:v0.2.0

Composer 安装命令:

composer require syntatis/version-cli

包简介

A simple PHP CLI tool for working with SemVer version strings

README 文档

README

CI

This is a simple command-line tool built with PHP that helps you work with SemVer (Semantic Versioning) strings. You can use it to check if a version string is valid, compare two versions to see which one is greater, or increase a version by major, minor, or patch levels.

Requirements

  • PHP 7.4 or higher
  • Composer

Installation

You can install it globally or locally using Composer:

composer global require syntatis/version-cli

Or, use as a development dependency in your project:

composer require --dev syntatis/version-cli

Usage

If you run it globally, you can use the version command directly in your terminal:

version --help

If you installed it locally in your project, run it using the vendor binary:

vendor/bin/version --help

The command provides several options to work with version strings:

Command Description Usage
validate Validates the given version string against the SemVer specification. version validate 1.0.0
increment Increments the version string by major, minor, or patch. version increment 1.0.0
gt Compares two version strings to see if the first is greater than the second. version gt 1.0.0 0.9.0
lt Compares two version strings to see if the first is less than the second. version lt 1.0.0 0.9.0
eq Compares two version strings to see if they are equal. version eq 1.0.0 1.0.0

The command supports both patterns with or without the v prefix, so you can use 1.0.0 or v1.0.0. For more details on each command, you can run:

version list

统计信息

  • 总下载量: 560
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 3
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 3
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-07-30