# BootForge (CLI prototype) BootForge is a working checksum manifest generator and verifier for a single large file (such as an .iso) or an entire directory tree: it walks the given path, computes a SHA-256 hash for every file, and writes a JSON manifest that can later be replayed to confirm nothing changed — exactly the mechanism a real "verify this boot image wasn't corrupted in transit" feature relies on. What this build does NOT implement is ISO mounting, bootable USB writing, or virtual drives — those require privileged, OS-specific APIs (loopback/virtual-disk mounting, raw disk access) that cannot be done portably with the Go standard library alone, so they remain on the roadmap. See ../plan.md for the full product plan. ## Build from source Requires Go 1.24+, no external dependencies. go build -o bootforge . Cross-compile for another platform: GOOS=windows GOARCH=amd64 go build -o bootforge.exe . GOOS=darwin GOARCH=arm64 go build -o bootforge . ## Usage bootforge manifest -o manifest.bfm [--json] bootforge verify --manifest manifest.bfm [--json] bootforge help ### manifest bootforge manifest -o manifest.bfm [--json] may be a single file (e.g. an .iso) or a directory. If it is a directory, BootForge walks it recursively over regular files. For each file it computes a SHA-256 checksum, then writes a manifest to the file given by -o as JSON with this shape: { "generated_at_utc": "2026-01-02T03:04:05Z", "root": "", "file_count": 4, "total_bytes": 123456, "files": [ { "path": "relative/or/basename", "size": 789, "sha256": "..." }, ... ] } For a single file, "files" has exactly one entry whose "path" is just the file's base name. For a directory, each entry's "path" is the file's path relative to , always forward-slash normalized regardless of host OS. Flags: -o Output manifest file path (required) --json Print the completion summary to stdout as JSON instead of plain text (the manifest file itself is always JSON) After writing, BootForge prints a short summary to stdout: file count, total size, and the output path. ### verify bootforge verify --manifest manifest.bfm [--json] Re-walks the same way "manifest" would, recomputes SHA-256 for whatever is found, and compares it against the manifest's "files" list by relative path. Every path falls into exactly one of four categories: OK Present in both the manifest and on disk, hash matches MISMATCH Present in both, but the hash differs -- corruption MISSING Was in the manifest but is not found on disk now EXTRA Exists on disk now but was not in the manifest Each MISMATCH, MISSING, and EXTRA is printed on its own line (OK entries are only counted, to keep output readable on large trees), followed by a summary line: "N OK, N mismatched, N missing, N extra". BootForge exits non-zero if there is any MISMATCH or MISSING entry. EXTRA alone does not cause a non-zero exit -- new files appearing is a warning, not necessarily corruption. Flags: --manifest Manifest file to verify against (required) --json Print the result as a single JSON object instead of the per-line text report (fields: ok, mismatched, missing, extra, mismatched_paths, missing_paths, extra_paths) ## Prebuilt binaries See ../downloads/ for prebuilt binaries (Windows/macOS/Linux) and CHECKSUMS.txt for their SHA-256 hashes. These are unsigned indie builds -- Windows SmartScreen and macOS Gatekeeper will warn on first run, which is expected until a code-signing certificate is in place.