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. While the CLI
4//! itself uses a **flat command structure** (e.g., `hexz pack`, `hexz boot`),
5//! the implementation is internally namespaced to keep the code organized.
6//!
7//! # Architecture
8//!
9//! ```text
10//! hexz <COMMAND> [OPTIONS]
11//!      ^^^^^^^^^
12//!      flat command (grouped by category in help)
13//! ```
14//!
15//! # Command Categories
16//!
17//! - **Archive Operations** (`cmd::data`)
18//!   - `pack`: Create archives from disk images
19//!   - `build`: Build archives from directories
20//!   - `info`: Inspect archive metadata
21//!   - `diff`: Show overlay differences
22//!   - `analyze`: Optimize CDC parameters
23//!
24//! - **Virtual Machine Operations** (`cmd::vm`)
25//!   - `boot`: Launch VMs from snapshots
26//!   - `install`: Install OS from ISO
27//!   - `snap`: Create live snapshots via QMP
28//!   - `commit`: Commit overlay changes
29//!   - `mount`: Mount snapshots as filesystems
30//!   - `unmount`: Unmount filesystems
31//!
32//! - **System & Diagnostics** (`cmd::sys`)
33//!   - `doctor`: Run diagnostics
34//!   - `bench`: Benchmark performance
35//!   - `serve`: Serve archives over network
36//!   - `keygen`: Generate signing keys
37//!   - `sign`: Sign archives
38//!   - `verify`: Verify signatures
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;