Skip to content

Commit a6bbdf2

Browse files
KyleTryonKyleTryon
authored andcommitted
feat: add install script
1 parent 2a46f32 commit a6bbdf2

File tree

2 files changed

+69
-9
lines changed

2 files changed

+69
-9
lines changed

README.md

Lines changed: 39 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@
88
<a href="https://github.com/sponsors/KyleTryon">
99
<img alt="GitHub Sponsors" src="https://img.shields.io/github/sponsors/KyleTryon">
1010
</a>
11-
<img alt="GitHub Workflow Status" src="https://img.shields.io/github/actions/workflow/status/uhs-cli/UltimateHomeServer/commitlint.yml">
11+
<a href="https://github.com/TechSquidTV/uhs-cli/actions/workflows/golangci-lint.yml">
12+
<img alt="GitHub Workflow Status" src="https://img.shields.io/github/actions/workflow/status/TechSquidTV/uhs-cli/golangci-lint.yml">
13+
</a>
1214
<a href="https://discord.gg/CTC9DVvYZz">
1315
<img alt="Discord" src="https://img.shields.io/discord/415249366840901643?style=plastic&logo=discord">
1416
</a>
@@ -23,32 +25,60 @@ An interactive CLI to assist in configuring services for the <a href="https://gi
2325
</p>
2426

2527

26-
**Pre-Alpha:** This CLI is currently in active development and is not ready for use.
28+
**Beta:** This CLI is currently in active development and is subject to change.
2729

2830

2931
# Getting Started
3032

3133
## Installation
3234

33-
### Go
35+
36+
### Binary
37+
38+
Utilize the install script to download the latest release for your platform.
3439

3540
```bash
36-
go install github.com/uhs-cli/uhs@latest
41+
wget https://raw.githubusercontent.com/TechSquidTV/uhs-cli/main/install.sh
3742
```
3843

39-
### Binary
44+
```bash
45+
chmod +x install.sh
46+
```
4047

41-
Visit the [releases]() section and download the latest release for your platform.
48+
```bash
49+
./install.sh
50+
```
51+
52+
### Go
4253

4354
```bash
55+
go install github.com/uhs-cli/uhs@latest
4456
```
4557

4658
## Usage
4759

4860
```bash
49-
uhs configure -o secrets.yaml
61+
Usage:
62+
uhs-cli [command]
63+
64+
Available Commands:
65+
configure Configure your UHS instance
66+
default Get the default configuration for UHS
67+
help Help about any command
68+
69+
Flags:
70+
-h, --help help for uhs-cli
71+
-t, --toggle Help message for toggle
72+
```
73+
74+
Generate configurations for individual services:
75+
76+
```bash
77+
uhs-cli configure <service> -o values.yaml
5078
```
5179

52-
### Screencast
80+
Generate a default configuration for all services:
5381

54-
[![asciicast](https://asciinema.org/a/R58ErthUiItMNwEmn06qpEKnU.svg)](https://asciinema.org/a/R58ErthUiItMNwEmn06qpEKnU)
82+
```bash
83+
uhs-cli default -o values.yaml
84+
```

install.sh

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
#!/bin/bash
2+
3+
# Get the latest version
4+
VERSION=$(curl -s https://api.github.com/repos/TechSquidTV/uhs-cli/releases/latest | grep tag_name | cut -d '"' -f 4)
5+
6+
# The operating system and architecture
7+
OS=$(uname | tr '[:upper:]' '[:lower:]')
8+
ARCH=$(uname -m)
9+
10+
# Check if the architecture is x86
11+
if [ "$ARCH" = "x86_64" ]; then
12+
ARCH="amd64"
13+
fi
14+
15+
# The URL of the release
16+
URL="https://github.com/TechSquidTV/uhs-cli/releases/download/v${VERSION}/uhs-cli_${VERSION}_${OS}_${ARCH}.tar.gz"
17+
18+
# Download and extract the binary
19+
wget $URL
20+
tar -xvzf uhs-cli_${VERSION}_${OS}_${ARCH}.tar.gz
21+
22+
# Move the binary to a location in your PATH
23+
sudo mv uhs-cli_${VERSION}_${OS}_${ARCH}/uhs-cli /usr/local/bin/uhs
24+
25+
# Clean up the downloaded file and the extracted directory
26+
rm uhs-cli_${VERSION}_${OS}_${ARCH}.tar.gz
27+
rm -rf uhs-cli_${VERSION}_${OS}_${ARCH}
28+
29+
echo "Installed uhs-cli version ${VERSION}"
30+
echo "Run 'uhs --help' to get started"

0 commit comments

Comments
 (0)