shasum
CLICompute and verify SHA checksums. Ships with Perl on macOS and Linux.
One checksum command that exists on both macOS and Linux (sha256sum does not exist on macOS)
Verified commands
Executed by our harness on the platforms shown; the assertion checked the actual result, not just the exit code.
SHA-256 of a file
shasum -a 256 file.txtCommon failures (1)
- sha256sum: command not found (macOS)macOS has no sha256sum; shasum -a 256 works on both OSes
Verify a file against an expected SHA-256
echo 'EXPECTED_HEX file.txt' | shasum -a 256 -cCommon failures (1)
- shasum: standard input: no properly formatted checksum lines foundtwo spaces between the hash and the filename are required
Install
apt
sudo apt install perlAgent notes
- When to use
- Verifying a downloaded artifact against a published SHA-256
- Quick examples
shasum -a 256 file.txtshasum -a 256 -c SHA256SUMS
Use from an agent
curl -s https://clihub.com/api/tools/shasum | jq '.agentHints.provenRecipes[] | {task, command, verified}'Or call get_tool with slug shasum on the MCP server at https://clihub.com/mcp.