CLI Infrastructure

src/main.rs, src/error.rs, src/progress.rs, src/prompt.rs — Shared CLI infrastructure.

CLI Flags

Implementation: CLI — Pack Command IMPL-CLI-001
status: implemented
tags: cli, clap
release: v1.0
realizes: FR-TRANSFER-028

clap derive-based CLI with pack, unpack, and list subcommands.

Implementation: CLI — Dry Run IMPL-CLI-002
status: implemented
tags: cli, dry-run
release: v1.0
realizes: FR-TRANSFER-031

--dry-run prints what would happen without writing any chunks.

Implementation: CLI — No-Verify IMPL-CLI-003
status: implemented
tags: cli, verification
release: v1.0
realizes: FR-TRANSFER-032

--no-verify skips checksum verification. Verification is on by default.

Implementation: CLI — Chunk Size Flag IMPL-CLI-004
status: implemented
tags: cli, chunk-size
release: v1.0
realizes: FR-TRANSFER-033

--chunk-size SIZE accepts human-readable values (e.g., 1G).

Implementation: CLI — Verbose IMPL-CLI-005
status: implemented
tags: cli, verbose
release: v1.0
realizes: FR-TRANSFER-034

--verbose enables detailed output.

Implementation: CLI — Force IMPL-CLI-006
status: implemented
tags: cli, force
release: v1.0
realizes: FR-TRANSFER-056

--force overwrites existing manifests without prompting.

Error Handling

Implementation: Error — Insufficient Space IMPL-ERROR-001
status: implemented
tags: error, usb, space
release: v1.0
realizes: FR-TRANSFER-035

Pre-pack space check compares available bytes against chunk size and reports a clear error if insufficient.

Implementation: Error — Missing Chunks IMPL-ERROR-002
status: implemented
tags: error, unpack
release: v1.0
realizes: FR-TRANSFER-036

AirgapError variants provide structured errors for missing chunks, verification failures, and I/O problems.

Implementation: Error — Clear Messages IMPL-ERROR-003
status: implemented
tags: error, ux
release: v1.0
realizes: FR-TRANSFER-037

thiserror derive macros produce human-readable error messages with context (file paths, chunk indices).

Safety

Implementation: Safety — Validate Paths IMPL-SAFETY-001
status: implemented
tags: safety, validation
release: v1.0
realizes: FR-TRANSFER-039

Source and destination paths are validated for existence and writability before operations begin.

Implementation: Safety — Atomic Operations IMPL-SAFETY-002
status: implemented
tags: safety, atomic
release: v1.0
realizes: FR-TRANSFER-041

Manifest is saved after each chunk completion so that interrupted operations can resume.

Build

Implementation: Build — Offline Dependencies IMPL-BUILD-001
status: implemented
tags: build, offline
release: v1.0

cargo vendor and cargo build --release --offline support fully air-gapped builds.

Implementation: Build — Static Binary IMPL-BUILD-002
status: implemented
tags: build, binary
release: v1.0
realizes: FR-TRANSFER-044

Release build produces a single static binary with no runtime dependencies.

Resume

Implementation: Resume — Interrupted Pack IMPL-RESUME-001
status: implemented
tags: resume, pack
release: v1.0
realizes: FR-TRANSFER-026

--resume detects existing manifest, validates compatibility, and resumes from the first incomplete chunk.

Implementation: Resume — Interrupted Unpack IMPL-RESUME-002
status: implemented
tags: resume, unpack
release: v1.0
realizes: FR-TRANSFER-027

Unpack uses manifest chunk status to skip already-extracted chunks.

Implementation: Manifest — Final Checksum IMPL-VERIFY-FINAL
status: implemented
tags: verifier, checksum
release: v1.0
realizes: FR-TRANSFER-023

After all chunks are unpacked, a final integrity check verifies the reassembled output.