shasum

CLI

Compute 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)

2 of 2 recipes verified by execution · 2026-09-17#sha256#checksum#verify#hash

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

Verified macOS · Linux · 2026-09-17
shasum -a 256 file.txt
Common 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

Verified macOS · Linux · 2026-09-17
echo 'EXPECTED_HEX  file.txt' | shasum -a 256 -c
Common failures (1)
  • shasum: standard input: no properly formatted checksum lines foundtwo spaces between the hash and the filename are required

Install

aptsudo apt install perl

Agent notes

When to use
Verifying a downloaded artifact against a published SHA-256
Quick examples
  • shasum -a 256 file.txt
  • shasum -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.

Homepage ↗Artistic-1.0-Perl0 views