File integrity CLI and Node.js library
Calculate SHA-256, compare exact files and check whole folders locally. Use CheckThisFile from your terminal or from JavaScript and TypeScript.
Calculate your first SHA-256
With Node.js 22 or later, run these commands in a new empty directory. They create a five-byte example file, so you can try the CLI without using your own documents.
npm install checkthisfile@0.1.4
printf '%s' 'hello' > checkthisfile-example.txt
./node_modules/.bin/checkthisfile hash checkthisfile-example.txtThe command prints JSON with a size of 5 bytes and a SHA-256 starting with 2cf24dba. Installation can use the network; execution has no network calls or telemetry. The package is MIT licensed and includes source, documentation and TypeScript declarations.
Website text in version 0.1.4
The npm release includes offline HTML extraction, text fingerprints and signed website evidence verification through checkthisfile/web-text.
Website text integrationOne check, a structured result
import { compareFiles, createFolderManifest, verifyFolderManifest }
from 'checkthisfile';
const result = await compareFiles('./approved.pdf', './received.pdf');
if (!result.matches) throw new Error('Different file bytes');
const manifest = await createFolderManifest('./delivery');
const check = await verifyFolderManifest(manifest, './received-delivery');
// check.matches, changed, missing, unexpectedSuitable for delivery checks, document intake, build artifacts and local agent workflows. Folder manifests use the same format as our web tool.
Try the folder toolAn open, documented format
SHA-256, relative paths and exact byte sizes. Strict validation, explicit resource bounds and JSON CLI results. Original files are never rewritten. The MIT licence keeps attribution in redistributed code; it does not require a logo in your documents.
Limits and reference trust
Version 0.1.4. Folder checks: 100 files, 50 MiB each and 250 MiB total. Manifests are unsigned and must come from a trusted source. A matching checksum checks bytes, not authorship or content safety. Concurrent hostile filesystem mutation requires OS isolation or immutable copies. Offline signed-receipt verification is a separate Python tool, not part of this library release.
Need shared records and version status?
The hosted CheckThisFile service provides registration links, version history and scoped integrations. Choose it when your workflow needs those features. The local library stays independent.
Explore the integrity API