Skip to main content

hexz_cli/cmd/
mod.rs

1//! Command handlers for the Hexz CLI.
2//!
3//! This module organizes all CLI subcommands into logical groups following a
4//! **Noun-Verb hierarchy** (e.g., `hexz data pack`, `hexz vm boot`). Each
5//! submodule contains the implementation logic for its respective commands.
6//!
7//! # Architecture
8//!
9//! ```text
10//! hexz <CATEGORY> <ACTION> [OPTIONS]
11//!        ^^^^^^^^^^  ^^^^^^
12//!        module      function
13//! ```
14//!
15//! # Command Categories
16//!
17//! - [`data`]: Data operations for archives
18//!   - `pack`: Create archives from disk images
19//!   - `build`: Build archives from directories
20//!   - `info`: Inspect archive metadata
21//!   - `diff`: Show overlay differences (diagnostics feature)
22//!   - `analyze`: Optimize CDC parameters with DCAM (diagnostics feature)
23//!
24//! - [`vm`]: Virtual machine operations
25//!   - `boot`: Launch VMs from snapshots (FUSE feature)
26//!   - `install`: Install OS from ISO (FUSE feature)
27//!   - `snap`: Create live snapshots via QMP
28//!   - `commit`: Commit overlay changes
29//!   - `mount`: Mount snapshots as filesystems (FUSE feature)
30//!   - `unmount`: Unmount filesystems (FUSE feature)
31//!
32//! - [`sys`]: System utilities
33//!   - `doctor`: Run diagnostics (diagnostics feature)
34//!   - `bench`: Benchmark performance (diagnostics feature)
35//!   - `serve`: Serve archives over network (server feature)
36//!   - `keygen`: Generate signing keys (signing feature)
37//!   - `sign`: Sign archives (signing feature)
38//!   - `verify`: Verify signatures (signing feature)
39//!
40//! # Error Handling
41//!
42//! All command handlers return `anyhow::Result<()>`, with errors automatically
43//! propagated to the main entry point for user-friendly display.
44//!
45//! # Feature Flags
46//!
47//! Some commands are gated behind feature flags:
48//! - `diagnostics`: Advanced debugging and analysis tools
49//! - `fuse`: Filesystem mounting capabilities
50//! - `server`: Network serving protocols
51//! - `signing`: Cryptographic signing and verification
52
53pub mod data;
54pub mod sys;
55pub mod vm;