]> code.octet-stream.net Git - hashgood/blob - README.md
Apply more recent rustfmt rules
[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 ## Compiling
21
22 `hashgood` targets stable Rust. With a Rust toolchain installed, clone the repository and run:
23
24 ```
25 cargo build --release
26 ```
27
28 Take the compiled executable from `target/release/hashgood`.
29
30 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`
31
32 ```
33 cargo build --release --features paste
34 ```
35
36 ## Goals
37
38 * Be forgiving and deliver what the user wants with a minimum of fuss. They just want to check this hash, damnit.
39 * Don't let users be tricked - be explicit about checksum types and the sources of those checksums that are being compared.
40 * As much cross-platform support as is practical.
41
42 ## Non-goals
43
44 * Scriptability. This is an interactive tool.
45 * Support for any unusual scenarios that could compromise smooth operation. (e.g., text mode, uncommon hash types)
46
47 ## Future ideas
48
49 * Nominate a default (downloads) directory and auto-select the most recently created file in that directory as input.