]> code.octet-stream.net Git - hashgood/blob - README.md
Exit with non-zero exit code if a verification fails
[hashgood] / README.md
1 # hashgood
2 A CLI tool for easily verifying a downloaded file's checksum.
3
4 Wouldn't it be nice if your computer compared the hash for you?
5
6 ![](img/fail.png)
7 ![](img/maybe.png)
8
9 Read the MD5, SHA1 or SHA256 hash from:
10
11 * Command line argument
12 * SHASUMS-style check files (`-c`)
13 * Raw hash in a file/STDIN (`-c`)
14 * The clipboard (`-p`)
15
16 ...or just run `hashgood` against the input and receive all three at once.
17
18 This program arose from dissatisfaction with the [workarounds required for traditional tools](https://thomask.sdf.org/blog/2019/05/05/techniques-for-verifying-shasums-conveniently.html).
19
20 ## Installing
21
22 Pre-compiled binaries for common platforms can be downloaded [from the releases page](https://github.com/thombles/hashgood/releases). Otherwise you can build it yourself; see the next section.
23
24 ## Compiling
25
26 `hashgood` targets stable Rust. With a Rust toolchain installed, clone the repository and run:
27
28 ```
29 cargo build --release
30 ```
31
32 Take the compiled executable from `target/release/hashgood`.
33
34 To include support for pasting from the clipboard with `-p`, specify the extra feature. Note that on Linux this requires several extra libraries: `libxcb1-dev libxcb-xfixes0-dev libxcb-shape0-dev libxcb-render0-dev`
35
36 ```
37 cargo build --release --features paste
38 ```
39
40 ## Goals
41
42 * Be forgiving and deliver what the user wants with a minimum of fuss. They just want to check this hash, damnit.
43 * Don't let users be tricked - be explicit about checksum types and the sources of those checksums that are being compared.
44 * As much cross-platform support as is practical.
45
46 ## Non-goals
47
48 * Scriptability. This is an interactive tool.
49 * Support for any unusual scenarios that could compromise smooth operation. (e.g., text mode, uncommon hash types)
50
51 ## Future ideas
52
53 * Nominate a default (downloads) directory and auto-select the most recently created file in that directory as input.