bun-pm-hash
Generate and print the lockfile hash
TLDR
SYNOPSIS
bun pm hash | hash-string | hash-print
DESCRIPTION
bun pm hash generates and displays a hash of the current lockfile (bun.lock). This is useful for cache invalidation, CI pipelines, and verifying whether dependencies have changed between runs.The related subcommands hash-string and hash-print provide additional insight: hash-string outputs the raw string that is fed into the hash function, while hash-print reads and displays the hash already stored inside the lockfile without recomputing it.
CAVEATS
The hash is computed from the lockfile content, so any manual edits will change the hash even if the actual dependency tree is unchanged. The command requires a valid lockfile to exist in the project; run bun install first if one is missing. Bun versions prior to 1.2 used a binary lockfile format (bun.lockb); newer versions use a text-based bun.lock format.
SEE ALSO
bun(1), bun-pm(1), bun-install(1)
