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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
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,
}