1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
//! Command-line interface and orchestration for cargo-aprz
//!
//! This module implements the CLI commands and coordinates all the other crates
//! to perform end-to-end crate analysis, evaluation, and reporting. It handles
//! argument parsing, configuration management, and the high-level workflows.
//!
//! # Implementation Model
//!
//! The module is organized around four main commands:
//!
//! ## Commands
//!
//! - **crates**: Analyze specific crates by name/version, collect facts, evaluate
//! against policy expressions, and generate reports
//! - **deps**: Analyze all dependencies in a workspace, similar to crates command
//! but automatically discovers crates from Cargo.lock
//! - **init**: Generate a default configuration file with example expressions
//! - **validate**: Check configuration file syntax and expression validity
//!
//! ## Execution Flow
//!
//! The `run` function parses command-line arguments using clap and routes
//! to the appropriate command handler. Each command follows a similar pattern:
//!
//! 1. Parse arguments and load configuration
//! 2. Collect crate facts using cargo-aprz-facts
//! 3. Convert facts to metrics using cargo-aprz-metrics
//! 4. Optionally evaluate using cargo-aprz-expr
//! 5. Generate reports using cargo-aprz-reports
//!
//! The `common` module provides shared functionality like logging setup,
//! color mode handling, and the main report generation logic that coordinates
//! multiple output formats.
//!
//! Configuration is managed through a TOML file with two expression lists
//! (`high_risk`, `eval`) that define the evaluation policy.
pub use Config;
pub use ;
pub use ;
pub use Host;
pub use ;
pub use ProgressReporter;
pub use run;
pub use ;