agent-device-rec 0.1.0

Health device recommendation engine for longevity monitoring
use clap::{Parser, Subcommand};

#[derive(Parser)]
#[command(
    name = "agent-device-rec",
    version,
    about = "Health device recommendation engine for longevity monitoring"
)]
pub struct Cli {
    /// Force JSON output (default when piped)
    #[arg(long, global = true)]
    pub json: bool,

    /// Custom database path (default: ~/.labstore/labstore.db)
    #[arg(long, global = true)]
    pub db: Option<String>,

    #[command(subcommand)]
    pub command: Commands,
}

#[derive(Subcommand)]
pub enum Commands {
    /// Recommend monitoring devices based on patient assessment
    Recommend {
        /// Patient slug (reads latest biomarkers from labstore DB)
        slug: Option<String>,

        /// Read labassess JSON from stdin
        #[arg(long)]
        stdin: bool,

        /// Patient sex
        #[arg(long)]
        sex: Option<String>,

        /// Patient age
        #[arg(long)]
        age: Option<u8>,

        /// Filter by device category
        #[arg(long)]
        category: Option<String>,

        /// Maximum price (e.g., 200)
        #[arg(long)]
        max_price: Option<u32>,

        /// Limit results
        #[arg(long, short = 'n', default_value = "10")]
        limit: usize,
    },

    /// List all devices in catalog
    List {
        /// Filter by category (cgm, wearable, blood_pressure, pulse_oximeter, scale)
        #[arg(long)]
        category: Option<String>,

        /// Filter by brand
        #[arg(long)]
        brand: Option<String>,

        /// Filter by tracked metric
        #[arg(long)]
        tracks: Option<String>,

        /// Filter by price range (budget, mid, premium)
        #[arg(long)]
        price_range: Option<String>,

        /// Limit results
        #[arg(long, short = 'n', default_value = "50")]
        limit: usize,
    },

    /// Show detailed device information
    Show {
        /// Device ID (from catalog)
        device_id: String,
    },

    /// Search devices by text query
    Search {
        /// Search query
        query: String,

        /// Limit results
        #[arg(long, short = 'n', default_value = "20")]
        limit: usize,
    },

    /// List verified device brands
    Brands,

    /// Compare two or more devices side-by-side
    Compare {
        /// Device IDs to compare (2 or more)
        device_ids: Vec<String>,
    },

    /// Show agent-info for AI consumption
    AgentInfo,
}