Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/thatisuday/file-checksum
A CLI tool to calculate the checksum of file's content using md5 or sha1 algorithms.
https://github.com/thatisuday/file-checksum
algorithm checksum cli md5 node-cli node-js node-module nodejs sha1
Last synced: 6 days ago
JSON representation
A CLI tool to calculate the checksum of file's content using md5 or sha1 algorithms.
- Host: GitHub
- URL: https://github.com/thatisuday/file-checksum
- Owner: thatisuday
- Created: 2019-08-23T17:41:06.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2022-12-30T18:28:47.000Z (almost 2 years ago)
- Last Synced: 2024-10-26T20:28:16.892Z (21 days ago)
- Topics: algorithm, checksum, cli, md5, node-cli, node-js, node-module, nodejs, sha1
- Language: JavaScript
- Homepage:
- Size: 325 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# File Checksum CLI
A CLI tool to calculate checksum of file's content using **md5** or **sha1** algorithms.[![build-status](https://img.shields.io/travis/thatisuday/file-checksum?style=flat-square)](https://travis-ci.org/thatisuday/file-checksum)
[![npm-version](https://img.shields.io/npm/v/file-checksum?style=flat-square)](https://www.npmjs.com/package/file-checksum)
[![dependencies](https://img.shields.io/david/thatisuday/file-checksum?style=flat-square)](https://www.npmjs.com/package/file-checksum)
[![downloads](https://img.shields.io/npm/dt/file-checksum?style=flat-square)](https://www.npmjs.com/package/file-checksum)
[![license](https://img.shields.io/npm/l/file-checksum?style=flat-square)](https://www.npmjs.com/package/file-checksum)![carbon](https://raw.githubusercontent.com/thatisuday/file-checksum/master/res/carbon.now.sh.png)
## Installation
```
$ npm install -g file-checksum
```## Help and Version
```
$ file-checksum -v
1.0.4$ file-checksum --help
Calculate checksum of a file.Usage: file-checksum [options]
Options:
-v, --version Print current CLI version.
-a, --algorithm Algorithm to be used for hashing (md5 or sha1) (default: "md5")
-h, --help output usage information
```## Calculate Checksum
Once this package is installed globally, you can use `file-checksum` command.
```
$ file-checksum
$ file-checksum -a sha1
$ file-checksum --algorithm sha1
```
> If `-a` or `--algorithm` flag is missing, by default **md5** algorithm is used.#### Example
```
$ file-checksum test/file.txt5e7c683623bdabaeae97f8157e80f85c
```---
To create your own CLI tool using node.js, follow my article on [**Medium**](https://itnext.io/making-cli-app-with-ease-using-commander-js-and-inquirer-js-f3bbd52977ac).