1111 </a>
1212</p >
1313
14- ** HTTPS Wrench** is a Golang CLI program to make HTTPS requests based on a YAML configuration file.
15- ** HTTPS Wrench** was born from the desire of a disposable Bash script to become a reliable tool
16- for mechanics of the World Wide Web.
17- ` https-wrench ` will, one day, take the place of ` curl ` in the hearts and the eyes of whoever is about
18- to migrate a DNS record from a webserver to a load balancer, reverse proxy, Ingress Gateway,
19- CloudFront distribution.
14+ ** HTTPS Wrench** is a CLI program to make Yaml defined HTTPS requests and to
15+ inspect x.509 certificates and keys.\
16+ ** HTTPS Wrench** was born from the desire of a disposable Bash script to become
17+ a reliable tool for mechanics of the World Wide Web.\
18+ ` https-wrench ` will, one day, take the place of ` curl ` in the hearts and the
19+ eyes of whoever is about to migrate a DNS record from a webserver to a load
20+ balancer, reverse proxy, Ingress Gateway, CloudFront distribution.
2021
2122## How to use
2223
2324Check the help:
2425
2526``` bash
2627❯ https-wrench -h
27- HTTPS Wrench, a tool to make HTTPS requests based on a YAML configuration file
28+
29+ HTTPS Wrench is a tool to make HTTPS requests according to a Yaml configuration file and to inspect x.509 certificates and keys.
30+
31+ https-wrench has two subcommands: requests and certinfo.
32+
33+ requests is the subcommand that does HTTPS requests according to the configuration provided
34+ by the --config flag.
35+
36+ certinfo is a subcommand that reads information from PEM encoded x.509 certificates and keys. The certificates
37+ can be read from local files or TLS enabled endpoints.
38+
39+ certinfo can compare public keys extracted from certificates and private keys to check if they match.
40+
41+ HTTPS Wrench is distributed with an open source license and available at the following address:
42+ https://github.com/xenOs76/https-wrench
2843
2944Usage:
3045 https-wrench [flags]
3146 https-wrench [command]
3247
3348Available Commands:
34- certinfo Show info about PEM certificates and keys
49+ certinfo Shows information about x.509 certificates and keys
3550 completion Generate the autocompletion script for the specified shell
3651 help Help about any command
3752 requests Make HTTPS requests defined in the YAML configuration file
@@ -45,8 +60,9 @@ Use "https-wrench [command] --help" for more information about a command.
4560` ` `
4661
4762Generate a sample config file:
63+
4864` ` ` bash
49- https-wrench requests --show-sample-config > sample -wrench.yaml
65+ https-wrench requests --show-sample-config > https -wrench-sample-config .yaml
5066` ` `
5167
5268< details>
@@ -99,53 +115,69 @@ requests:
99115
100116< /details>
101117
102-
103118Make the HTTPS requests defined in the YAML file:
119+
104120` ` ` bash
105- https-wrench requests --config sample -wrench.yaml
121+ https-wrench requests --config https -wrench-sample-config .yaml
106122` ` `
107123
108- <details >
109- <summary >Output of the commands</summary >
110-
111- The output should look like this:
124+ Sample output of the commands:
112125
113- ![ HTTPS Wrench - sample output] ( ./assets/img/https-wrench-demo-sample-conf.gif " HTTPS Wrench - sample config output ")
126+ < details>
127+ < summary> HTTPS Wrench requests, (long) sample configuration output< /summary>
128+ ! [HTTPS Wrench requests - sample config output](/assets/img/https-wrench_requests_sample-config.png " HTTPS Wrench - sample config output" )
129+ < /details>
114130
115- Or like this, if you customize one of the files in the [ examples] ( ./assets/examples/https-wrench-k3s.yaml ) folder:
131+ < details>
132+ < summary> HTTPS Wrench requests, sample requests against a K3s cluster< /summary>
133+ ! [HTTPS Wrench - k3s output](/assets/img/https-wrench_requests_k3s.png " HTTPS Wrench - K3s requests output" )
134+ < /details>
116135
117- ![ HTTPS Wrench - k3s output] ( ./assets/img/https-wrench-demo-k3s-example.gif " HTTPS Wrench - K3s requests output ")
136+ < details>
137+ < summary> HTTPS Wrench certinfo, certificate and key< /summary>
138+ ! [HTTPS Wrench certinfo - certificate and key](/assets/img/https-wrench_certinfo_cert_and_key.png " HTTPS Wrench certinfo - certificate and key" )
139+ < /details>
118140
141+ < details>
142+ < summary> HTTPS Wrench certinfo, TLS Endpoint< /summary>
143+ ! [HTTPS Wrench certinfo - TLS Endpoint](/assets/img/https-wrench_certinfo_tls_endpoint.png " HTTPS Wrench certinfo - TLS Endpoint" )
119144< /details>
120145
121146# # How to install
122147
123148# ## Go install
124149
125- HTTPS Wrench is "go gettable", so it can be installed with the following command when having a proper ` go ` setup:
150+ HTTPS Wrench is " go gettable" , so it can be installed with the following command
151+ when having a proper ` go` setup:
152+
126153` ` ` bash
127154go install github.com/xenos76/https-wrench@latest
128155` ` `
129156
130157# ## Manual download
131158
132- Release binaries and DEB, RPM, APK packages can be downloaded from the [ repo's releases section] ( https://github.com/xenOs76/https-wrench/releases ) .
133- Binaries and packages are built for Linux and MacOS, ` amd64 ` and ` arm64 ` .
159+ Release binaries and DEB, RPM, APK packages can be downloaded from the
160+ [repo' s releases section](https://github.com/xenOs76/https-wrench/releases).\
161+ Binaries and packages are built for Linux and MacOS, `amd64` and `arm64`.
134162
135163### APT
136164
137165Configure the repo the following way:
166+
138167```bash
139168echo "deb [trusted=yes] https://repo.os76.xyz/apt stable main" | sudo tee /etc/apt/sources.list.d/os76.list
140169```
141- then:
170+
171+ then:
172+
142173```bash
143174sudo apt-get update && sudo apt-get install -y https-wrench
144175```
145176
146177### YUM
147178
148179Configure the repo the following way:
180+
149181```bash
150182echo ' [os76]
151183name= OS76 Yum Repo
@@ -154,54 +186,67 @@ enabled=1
154186gpgcheck= 0
155187repo_gpgcheck= 0' | sudo tee /etc/yum.repos.d/os76.repo
156188```
157- then:
189+
190+ then:
191+
158192```bash
159193sudo yum install https-wrench
160194```
161195
162196### Docker image
163197
164- Generate the config:
198+ Generate the config:
199+
165200```bash
166201docker run --rm ghcr.io/xenos76/https-wrench:latest -h
167202
168203docker run --rm ghcr.io/xenos76/https-wrench:latest --show-sample-config > sample-wrench.yaml
169204```
170205
171- Run the ` requests ` command:
206+ Run the `requests` command:
207+
172208```bash
173209docker run -v $(pwd)/sample-wrench.yaml:/https-wrench.yaml --rm ghcr.io/xenos76/https-wrench:latest --config /https-wrench.yaml requests
174210```
175211
176- ### Homebrew
212+ ### Homebrew
213+
214+ Add Os76 Homebrew repository:
177215
178- Add Os76 Homebrew repository:
179216```bash
180217brew tap xenos76/tap
181218```
182219
183- Install ` https-wrench ` :
220+ Install `https-wrench`:
221+
184222```bash
185223brew install --casks https-wrench
186224```
187225
188226### Nix/NUR
189227
190- Nix users can use the following Nur repository to access ` https-wrench ` : [ https://github.com/xenOs76/nur-packages ] ( https://github.com/xenOs76/nur-packages ) .
191- The repository is not listed yet in the general [ Nix User Repository] ( https://github.com/nix-community/NUR ) so the following methods can be used to install the package.
228+ Nix users can use the following Nur repository to access `https-wrench`:
229+ [https://github.com/xenOs76/nur-packages](https://github.com/xenOs76/nur-packages).\
230+ The repository is not listed yet in the general
231+ [Nix User Repository](https://github.com/nix-community/NUR) so the following
232+ methods can be used to install the package.
233+
234+ Set a Nix channel:
192235
193- Set a Nix channel:
194236```bash
195237nix-channel --add https://github.com/xenos76/nur-packages/archive/main.tar.gz nur-os76
196238nix-channel --update
197239```
198240
199- and add the package to a Nix shell:
241+ and add the package to a Nix shell:
242+
200243```bash
201244nix-shell -p ' (import < nur-os76> { pkgs = import < nixpkgs> {}; }).https-wrench'
202245```
203246
204- Or use a ` flake.nix ` like the one from the [ nix-shell] ( /assets/examples/nix-shell ) example to achieve a similar result:
247+ Or use a `flake.nix` like the one from the
248+ [nix-shell](/assets/examples/nix-shell) example to achieve a similar result:
249+
205250```nix
206251{
207252 description = "Flake to fetch https-wrench from xenos76' s NUR repo" ;
@@ -243,4 +288,6 @@ Or use a `flake.nix` like the one from the [nix-shell](/assets/examples/nix-shel
243288}
244289` ` `
245290
246- NixOS users could use a [ flake like this] ( https://raw.githubusercontent.com/xenOs76/nixos-configs/refs/heads/main/flake.nix ) to fetch the package.
291+ NixOS users could use a
292+ [flake like this](https://raw.githubusercontent.com/xenOs76/nixos-configs/refs/heads/main/flake.nix)
293+ to fetch the package.
0 commit comments