1use clap::{Parser, Subcommand};
7use std::path::{Path, PathBuf};
8
9mod commands;
10pub mod error;
11mod output;
12pub mod pipe;
13
14pub use error::CliError;
15
16pub mod qa_types {
18 pub use crate::commands::qa::{GateResult, QaReport, SystemInfo};
19}
20
21pub mod model_pull {
23 pub use crate::commands::pull::{list, run};
24}
25
26#[cfg(feature = "inference")]
27pub mod federation;
28
29use commands::{
31 bench, canary, canary::CanaryCommands, cbtop, chat, compare_hf, convert, debug, diff, distill,
32 eval, explain, export, finetune, flow, hex, import, inspect, lint, merge, oracle, probar,
33 profile, prune, ptx_explain, publish, pull, qa, qualify, quantize, rosetta,
34 rosetta::RosettaCommands, run, serve, showcase, tensors, trace, tree, tui, tune, validate,
35};
36
37#[derive(Parser, Debug)]
42#[command(name = "apr")]
43#[command(author, version = concat!(env!("CARGO_PKG_VERSION"), " (", env!("APR_GIT_SHA"), ")"), about, long_about = None)]
44#[command(propagate_version = true)]
45pub struct Cli {
46 #[command(subcommand)]
47 pub command: Box<Commands>,
48
49 #[arg(long, global = true)]
51 pub json: bool,
52
53 #[arg(short, long, global = true)]
55 pub verbose: bool,
56
57 #[arg(short, long, global = true)]
59 pub quiet: bool,
60
61 #[arg(long, global = true)]
63 pub offline: bool,
64
65 #[arg(long, global = true)]
67 pub skip_contract: bool,
68}
69
70include!("commands_enum.rs");
71include!("model_ops_commands.rs");
72include!("extended_commands.rs");
73include!("tool_commands.rs");
74include!("validate.rs");
75include!("dispatch_run.rs");
76include!("dispatch.rs");
77include!("dispatch_analysis.rs");
78include!("lib_07.rs");