hash
fialr hash <file> [file ...] [options]Compute content hashes for one or more files. BLAKE3 is the primary canonical identifier. SHA256 is the secondary hash for cross-tool compatibility. No files are modified.
Arguments
Section titled “Arguments”| Argument | Description |
|---|---|
file | One or more files to hash (required) |
Options
Section titled “Options”| Option | Description |
|---|---|
--algorithm ALGO | Hash algorithm: blake3, sha256, or all (default: all) |
--json | Output as JSON to stdout |
What it does
Section titled “What it does”hash computes content hashes for each specified file. By default, both BLAKE3 and SHA256 are computed. Use --algorithm to restrict to a single algorithm.
Files that do not exist or are directories produce an error message and are skipped. The exit code is 0 as long as at least one file is hashed successfully.
BLAKE3
Section titled “BLAKE3”BLAKE3 is the primary hash algorithm used throughout fialr. It serves as the canonical file identifier in XATTRs, SQLite, and all deduplication logic. BLAKE3 is faster than SHA256 while providing equivalent security properties.
SHA256
Section titled “SHA256”SHA256 is the secondary hash. It provides cross-tool verification — SHA256 hashes can be checked against other archival tools, operating system utilities, and verification workflows that do not support BLAKE3.
Output
Section titled “Output”Human-readable (default):
hash ~/Documents/contract.pdf
HASH ~/Documents/contract.pdf blake3 a1b2c3d4e5f6... sha256 f7e8d9c0b1a2...JSON (--json):
[ { "file": "contract.pdf", "blake3": "a1b2c3d4e5f6...", "sha256": "f7e8d9c0b1a2..." }]JSON output goes to stdout. Human-readable output goes to stderr. This means --json output can be piped to other tools without interference from status messages.
Examples
Section titled “Examples”# Hash a single file (both algorithms)fialr hash ~/Documents/contract.pdf
# Hash multiple filesfialr hash *.pdf
# BLAKE3 onlyfialr hash file.txt --algorithm blake3
# SHA256 onlyfialr hash file.txt --algorithm sha256
# JSON output, pipe to jqfialr hash contract.pdf --json | jq '.[0].blake3'See also
Section titled “See also”- Content Hash as Identity — why BLAKE3 is the canonical identifier
- scan — hash all files in a directory
- validate — verify hashes against the database