Skip to content

hashdir

TypeScriptv0.1.0MIT

Walks a directory tree and computes SHA256 hashes for every file, producing a sorted manifest of hashes and paths. Useful for verifying file integrity across backups, detecting changes in directory snapshots, or generating checksum manifests for release archives. Outputs in text or JSON format.

SecurityFilesystemHashingCLI

Features

  • Recursive SHA256 hashing of all files in a directory
  • Sorted output manifest with hash per file
  • JSON output for machine consumption
  • Output to file or stdout

Flags

LongShortDescription
--version-VShow version and license
--path-pDirectory to hash (default .)
--output-oOutput file (default stdout)
--json-jOutput as JSON

Usage

terminal
$ hashdir -p ./src
$
$ hashdir -p ./backup -o manifest.txt
$
$ hashdir -p ./release --json

Dependencies

Bun runtime — uses built-in crypto module for SHA256

Install
$ curl -LO https://labs.stech-sol.com/downloads/hashdir/0.1.0/hashdir_linux_amd64
$ chmod +x hashdir_linux_amd64
$ # Requires Bun runtime: bun run ./hashdir_linux_amd64
About
Language
TypeScript
Versionv0.1.0
LicenseMIT
RepositoryGitHub