Skip to main content

chksum

CLI for comparing two checksums

Install

Requires Python >= 3.10

pip install chksum-cli

Features

  • User friendly non-specific argument order
  • Visual feedback comparing hashes
  • Exit code matches hash results
  • Can ignore dot files
  • Interactive mode
  • Hash only function
  • Can use md5, sha1, sha256, and sha512

Usage

CHKSUM [-?] [-i] [-d] position1 position2 [position3]

Calculate and compare the checksums of files or directories.
Can also compare against pasted strings.
ALGORITHMS = ['md5', 'sha1', 'sha256', 'sha512']

positional arguments:
  position1          Checksum, file, or algorithm
  position2          Checksum, file, or algorithm
  position3          Checksum, file, or algorithm

options:
  -?, --help         Show this help message and exit.
  -i, --interactive  Run in interactive mode.
  -d, --dots         Ignore '.' (dot) files from directories.

If the first 2 positional arguments are strings, the algorithm is not needed. Default is md5.
Likewise, passing only a single path will simply out the digest.

Arguments can be passed in any order. [Note: This issue]
E.g. the following are equivalent:
chksum <PathToFile> <PathToDir> sha256 -d
chksum -d <PathToDir> sha256 <PathToFile>

Interactive mode

Use -i to enter the interactive mode where arguments can be passed one at a time.
Note that -i is mutually exclusive.

$ chksum -i

      _     _
     | |   | |
  ___| |__ | | _____ _   _ _ __ ___
 / __| '_ \| |/ / __| | | | '_ ` _ \
| (__| | | |   <\__ \ |_| | | | | | |
 \___|_| |_|_|\_\___/\__,_|_| |_| |_|
 Copyright (c) 2022, espehon
 All rights reserved.

 ALGORITHMS = ['md5', 'sha1', 'sha256', 'sha512']

Enter Algorithm or path to File or Directory >

Inputs are checked after each entry and the prompt is updated accordingly

Enter Algorithm or path to File or Directory > ./
        Directory entered.
Enter Algorithm or path to File or Directory > ./
        Directory entered.
Enter Algorithm > md5
        Algorithm entered.
Do you want to include '.' (dot) files? [Y/n] > n
        include_dots = False

-------------[MD5]--------------
59198d6aad1674a0b372027ce275a9b6
59198d6aad1674a0b372027ce275a9b6
√ Hashes Match

Issues

Using -d in between positionals can causes an argparse error. (See Issue: #11)
Example:
$ chksum ./file ./file -d sha1

Author

Metadata

Release files for chksum-cli 1.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for chksum-cli 1.1.0
File Size Uploaded Provenance Actions
chksum-cli-1.1.0.tar.gz 21.3 kB Without provenance Details for chksum-cli-1.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for chksum-cli 1.1.0
File Interpreter ABI Platform Actions
chksum_cli-1.1.0-py3-none-any.whl Python 3 none any Details for chksum_cli-1.1.0-py3-none-any.whl

Total release size: 42.3 kB

Release files / chksum-cli-1.1.0.tar.gz

Download URL chksum-cli-1.1.0.tar.gz
Size 21.3 kB
Tags Source
SHA-256 checksum
How to use checksums
2c89ef5175f9a5de87a4b1b4b09fed8ccc937051f63692e6be797e13f3deb809
BLAKE2b-256 checksum
How to use checksums
b9ace256b57baa1ac84e7e229c3c9bf51f89a575976a5e80800459e3e0ad3a29
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.11.0

Release files / chksum_cli-1.1.0-py3-none-any.whl

Download URL chksum_cli-1.1.0-py3-none-any.whl
Size 20.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
63dc1099604f738bc33662d5fb20006a6955e62d9f1436205ebd6585918132c5
BLAKE2b-256 checksum
How to use checksums
1605dbac6d9ea980e5d73de6283ba355fc1b806488b0f3ae143a63773208f2fd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.11.0

Security for chksum-cli 1.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page