Skip to content

Commit 796320a

Browse files
committed
Update description
1 parent 64c4043 commit 796320a

2 files changed

Lines changed: 68 additions & 2 deletions

File tree

README.md

Lines changed: 67 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,69 @@
11
# 1️⃣ version-cli-php
22

3-
Increment, compare SemVer-compliant version number with CLI.
3+
A simple PHP CLI tool for working with [SemVer](https://semver.org/) version strings.
4+
5+
## Features
6+
7+
* Increment version by major, minor, or patch
8+
* Compare two version strings
9+
* Validates SemVer-compliant version strings
10+
11+
## Requirements
12+
13+
* PHP 7.0 or higher
14+
* Composer
15+
16+
## 📦 Installation
17+
18+
You can install it globally or locally using Composer:
19+
20+
```bash
21+
composer global require syntatis/version-cli-php
22+
23+
Or to use as a development dependency in your project:
24+
25+
composer require --dev syntatis/version-cli-php
26+
27+
🚀 Usage
28+
29+
Run the CLI using:
30+
31+
version
32+
33+
If installed locally:
34+
35+
vendor/bin/version
36+
37+
🔼 Increment a version
38+
39+
version bump 1.2.3 patch
40+
# Output: 1.2.4
41+
42+
version bump 1.2.3 minor
43+
# Output: 1.3.0
44+
45+
version bump 1.2.3 major
46+
# Output: 2.0.0
47+
48+
⚖️ Compare versions
49+
50+
version compare 1.2.3 1.2.4
51+
# Output: -1 (meaning 1.2.3 < 1.2.4)
52+
53+
version compare 2.0.0 1.9.9
54+
# Output: 1 (meaning 2.0.0 > 1.9.9)
55+
56+
version compare 1.2.3 1.2.3
57+
# Output: 0 (meaning both are equal)
58+
59+
🧪 Testing
60+
61+
Run tests using PHPUnit:
62+
63+
composer test
64+
65+
📄 License
66+
67+
MIT © Syntatis
68+
69+
Let me know if this tool supports pre-releases (`1.0.0-beta.1`) or build metadata (`+001`), so I can include that in the README too.

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22

33
"name": "syntatis/version-cli",
4-
"description": "Validate, increment, and compare SemVer-compliant version number with CLI",
4+
"description": "A simple PHP CLI tool for working with SemVer version strings",
55
"keywords": [
66
"version",
77
"cli",

0 commit comments

Comments
 (0)