Skip to content
This repository was archived by the owner on Dec 19, 2025. It is now read-only.

Commit 336b39e

Browse files
committed
Add basic CLI docs
1 parent 146d52e commit 336b39e

File tree

4 files changed

+83
-0
lines changed

4 files changed

+83
-0
lines changed

docs/docs/cli/01-installation.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Installation
2+
3+
## npm
4+
5+
```shell
6+
npm install -g @github-version-checker/cli
7+
```
8+
9+
## Binary
10+
11+
Download a binary version from the [releases page](https://github.com/axelrindle/github-version-checker/releases).

docs/docs/cli/02-examples.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Usage Examples
2+
3+
## Basic
4+
5+
```shell
6+
$ github-version-checker \
7+
--owner axelrindle \
8+
--repository github-version-checker \
9+
--current-version 2.2.0
10+
```
11+
12+
```
13+
An update is available! v3.0.0
14+
You are on version 2.3.0!
15+
```
16+
17+
## With json output
18+
19+
```shell
20+
$ github-version-checker --json \
21+
--owner axelrindle \
22+
--repository github-version-checker \
23+
--current-version 2.2.0
24+
```
25+
26+
```json
27+
{
28+
"type": "outdated",
29+
"data": {
30+
"name": "v2.3.0",
31+
"tag": {
32+
"name": "2.3.0"
33+
},
34+
"isPrerelease": false,
35+
"isDraft": false,
36+
"publishedAt": "2022-03-18T15:22:03Z",
37+
"url": "https://github.com/axelrindle/github-version-checker/releases/tag/2.3.0"
38+
}
39+
}
40+
```

docs/docs/cli/_category_.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"label": "⌨️ Command Line Interface (CLI)",
3+
"position": 5,
4+
"link": {
5+
"type": "doc",
6+
"id": "cli/index"
7+
}
8+
}

docs/docs/cli/index.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Command Line Interface (CLI)
2+
3+
The CLI is planned to be releases with v3.0.0 and offers to perform a version check in non Node.js environments. It supports
4+
plain-text and JSON-formatted output.
5+
6+
## Usage
7+
8+
```
9+
10+
$ github-version-checker [options]
11+
12+
Options
13+
-o, --owner The repository owner. May be a username or organization name.
14+
-r, --repository The repository name.
15+
-c, --current-version The current application version.
16+
-t, --tags Fetches tags instead of releases.
17+
--no-pre-releases Excludes pre-releases. (default false)
18+
--token A PAT to use.
19+
--json Outputs the raw result data as JSON. (default false)
20+
--verbose Enables verbose logging. (default false)
21+
-v, --version Displays current version
22+
-h, --help Displays this message
23+
24+
```

0 commit comments

Comments
 (0)