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