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
//! # Analyzer Module
//!
//! Provides comprehensive CLI tool analysis capabilities including:
//!
//! - **CLI Parsing**: Executes binaries with `--help` and extracts structured information
//! - **Option Inference**: Automatically detects option types (flags, paths, numbers, etc.)
//! - **Subcommand Detection**: Recursively discovers subcommands and their options
//!
//! ## Architecture
//!
//! The analyzer module follows a pipeline pattern:
//!
//! ```text
//! Binary Path → CliParser → Option Detection → Type Inference → CliAnalysis
//! ↓
//! SubcommandDetector (recursive)
//! ```
//!
//! ## Example Usage
//!
//! ```no_run
//! use cli_testing_specialist::analyzer::CliParser;
//! use std::path::Path;
//!
//! let parser = CliParser::new();
//! let analysis = parser.analyze(Path::new("/usr/bin/curl"))?;
//!
//! println!("Found {} options", analysis.metadata.total_options);
//! println!("Found {} subcommands", analysis.subcommands.len());
//! # Ok::<(), cli_testing_specialist::error::CliTestError>(())
//! ```
//!
//! ## Performance Characteristics
//!
//! - **Small CLI (~50 options)**: 100-200ms
//! - **Medium CLI (~100 options)**: 300-500ms
//! - **Large CLI (100+ subcommands)**: 1-3s
//!
//! ## Safety & Resource Limits
//!
//! All binary executions are protected with:
//! - Timeout limits (default: 30 seconds)
//! - Memory limits (configurable)
//! - Recursion depth limits for subcommands (max: 5 levels)
pub use BehaviorInferrer;
pub use CliParser;
pub use ;
pub use SubcommandDetector;