agent-supplements-rec 0.1.0

Curated supplement recommendation engine for longevity biomarker optimization
use clap::{Parser, Subcommand};

#[derive(Parser)]
#[command(
    name = "agent-supplements-rec",
    version,
    about = "Curated supplement recommendation engine for longevity biomarker optimization"
)]
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 supplements 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 (required with --stdin if not in input)
        #[arg(long)]
        sex: Option<String>,

        /// Patient age (required with --stdin if not in input)
        #[arg(long)]
        age: Option<u8>,

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

        /// Maximum number of recommendations
        #[arg(long, short = 'n', default_value = "20")]
        limit: usize,

        /// Minimum evidence level (strong, moderate, emerging)
        #[arg(long, default_value = "emerging")]
        min_evidence: String,
    },

    /// List all supplements in catalog
    List {
        /// Filter by category (vitamin, mineral, peptide, nootropic, etc.)
        #[arg(long)]
        category: Option<String>,

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

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

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

    /// Show detailed product information
    Show {
        /// Product ID (from catalog)
        product_id: String,
    },

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

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

    /// List verified supplement brands
    Brands,

    /// Check interactions between supplements
    Interactions {
        /// Product IDs to check (2 or more)
        product_ids: Vec<String>,
    },

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