{
  "name": "Batch Hash and Verify Files",
  "version": "1.0",
  "description": "Generate SHA-256 checksums for all files in a directory and verify integrity against a manifest.",
  "author": "ToolPilot.dev",
  "url": "https://toolpilot.dev/guides/batch-processing/batch-hash-files/",
  "steps": [
    {
      "id": "generate_checksums",
      "tool": "sha256sum",
      "description": "Generate SHA-256 checksums for all files",
      "command": "find {input_dir} -type f -exec sha256sum {} \\; > checksums.sha256",
      "defaults": {
        "input_dir": "./release"
      }
    },
    {
      "id": "verify_checksums",
      "tool": "sha256sum",
      "description": "Verify all files against the manifest",
      "command": "sha256sum -c checksums.sha256"
    },
    {
      "id": "report",
      "tool": "grep",
      "description": "Report any failures",
      "command": "sha256sum -c checksums.sha256 2>&1 | grep -c FAILED || echo 'All files OK'"
    }
  ],
  "bash_oneliner": "find ./release -type f -exec sha256sum {} \\; > checksums.sha256 && sha256sum -c checksums.sha256",
  "supported_algorithms": ["md5", "sha1", "sha256", "sha512"],
  "environment": {
    "requires": ["sha256sum (coreutils)"],
    "optional": ["python3 (hashlib)", "openssl"]
  }
}
