talon_cli/cli/
inspect_args.rs1use clap::{Args, ValueEnum};
4
5use crate::cli::SharedScopeArgs;
6
7#[derive(Debug, Clone, Copy, PartialEq, Eq, ValueEnum)]
9pub enum InspectCheck {
10 All,
12 Orphans,
14 BrokenLinks,
16 DanglingRefs,
18 Unreferenced,
20 Graph,
22}
23
24impl From<InspectCheck> for talon_core::InspectCheck {
25 fn from(check: InspectCheck) -> Self {
26 match check {
27 InspectCheck::All => Self::All,
28 InspectCheck::Orphans => Self::Orphans,
29 InspectCheck::BrokenLinks => Self::BrokenLinks,
30 InspectCheck::DanglingRefs => Self::DanglingRefs,
31 InspectCheck::Unreferenced => Self::Unreferenced,
32 InspectCheck::Graph => Self::Graph,
33 }
34 }
35}
36
37#[derive(Debug, Clone, Args)]
39#[command(about = "Inspect your vault for structural signals and patterns.")]
40pub struct InspectArgs {
41 #[arg(value_enum, ignore_case = true)]
43 pub check: Option<InspectCheck>,
44
45 #[command(flatten)]
46 pub scope: SharedScopeArgs,
47
48 #[arg(long, short = 'n', global = true)]
50 pub limit: Option<u16>,
51}