1mod evaluate;
2mod llm;
3mod misc;
4mod qpu;
5mod science;
6mod solid;
7mod solve;
8mod webizen;
9
10pub use evaluate::EvaluateModality;
11pub use llm::LlmAction;
12pub use misc::*;
13pub use qpu::QpuAction;
14pub use science::{
15 BioAction, ChemAction, ClinicalAction, EconomicsAction, GeoAction, GeometricAction,
16 ScienceAction, ThermoAction,
17};
18pub use solid::SolidAction;
19pub use solve::{
20 LinalgAction, OdeAction, OptimizeAction, QuantumSolveAction, SolveAction, SymbolicSolveAction,
21};
22pub use webizen::WebizenAction;
23
24use clap::{Parser, Subcommand};
25use std::path::PathBuf;
26
27use crate::{daemon, mcp, mesh, service, shader};
28
29#[derive(Parser, Debug)]
33#[command(name = "qualia-cli", version = "0.0.12", author = "Qualia-DB")]
34#[command(about = "Manage, query, and evaluate Qualia-DB vaults and models", long_about = None)]
35pub struct Cli {
36 #[arg(short, long, action = clap::ArgAction::Count, global = true)]
37 pub verbose: u8,
38
39 #[arg(long, global = true)]
40 pub enable_qpu: bool,
41
42 #[command(subcommand)]
43 pub command: Commands,
44}
45
46#[derive(Subcommand, Debug)]
47pub enum Commands {
48 Extension {
49 #[command(subcommand)]
50 action: ExtensionAction,
51 },
52 Evaluate {
53 #[command(subcommand)]
54 modality: EvaluateModality,
55 },
56 Governance {
57 #[command(subcommand)]
58 action: GovernanceAction,
59 },
60 Compile {
61 #[command(subcommand)]
62 action: CompileAction,
63 },
64 Llm {
65 #[command(subcommand)]
66 action: LlmAction,
67 },
68 Shader {
69 #[command(subcommand)]
70 action: shader::ShaderAction,
71 },
72 MeshProbe {
73 #[command(subcommand)]
74 action: mesh::MeshAction,
75 },
76 Capabilities {
77 #[arg(long, help = "List all registered capabilities")]
78 list: bool,
79 },
80 Shacl {
81 #[command(subcommand)]
82 action: ShaclAction,
83 },
84 Vault {
85 #[arg(long, help = "Initialize the memory-mapped storage vault")]
86 init: bool,
87 },
88 Migrate {
89 #[command(subcommand)]
90 action: MigrateAction,
91 },
92 Mem {
93 #[arg(long, help = "Triggers the Block Inspector to read hex layouts")]
94 inspect: bool,
95 },
96 Inspect {
97 file_path: PathBuf,
98 },
99 Q42 {
100 #[command(subcommand)]
101 action: Q42Action,
102 },
103 Dump {
104 out_path: PathBuf,
105 },
106 Daemon {
107 #[command(subcommand)]
108 action: Option<daemon::DaemonAction>,
109 #[command(flatten)]
110 opts: daemon::DaemonOpts,
111 },
112 Mcp {
113 #[command(subcommand)]
114 action: mcp::McpAction,
115 },
116 Service {
117 #[command(subcommand)]
118 action: service::ServiceAction,
119 },
120 Webizen {
121 #[command(subcommand)]
122 action: WebizenAction,
123 },
124 ExportSolid {
125 #[arg(long)]
126 input: PathBuf,
127 #[arg(long)]
128 output: PathBuf,
129 },
130 Solid {
131 #[command(subcommand)]
132 action: SolidAction,
133 },
134 #[command(name = "benchmark-action")]
135 Benchmark {
136 #[command(subcommand)]
137 action: BenchmarkAction,
138 },
139 #[command(name = "benchmark", alias = "bench")]
140 Bench {
141 #[arg(long, default_value = "full")]
142 suite: String,
143 },
144 VerifyIntegrity {
145 #[arg(long)]
146 input: PathBuf,
147 #[arg(long)]
148 dataset: PathBuf,
149 },
150 VerifyGraph {
152 #[arg(long)]
153 input: PathBuf,
154 #[arg(long)]
155 dataset: PathBuf,
156 #[arg(long, default_value_t = 32)]
158 memory_mib: u64,
159 #[arg(long, default_value_t = 24)]
161 temp_gib: u64,
162 },
163 Import {
164 input: PathBuf,
165 output: PathBuf,
166 #[arg(long)]
167 strip_literals: bool,
168 #[arg(long)]
170 segment_mib: Option<u64>,
171 },
172 Ingest {
173 #[command(subcommand)]
174 format: IngestFormat,
175 },
176 Query {
177 #[command(subcommand)]
178 dialect: QueryDialect,
179 },
180 Compress {
181 #[arg(long)]
182 input: PathBuf,
183 #[arg(long)]
184 output: PathBuf,
185 },
186 Resources {
187 subcommand: String,
188 arg: Option<String>,
189 },
190 Profile {
191 #[command(subcommand)]
192 action: ProfileAction,
193 },
194 Qpu {
195 #[command(subcommand)]
196 action: QpuAction,
197 },
198 Solve {
199 #[command(subcommand)]
200 action: SolveAction,
201 },
202 Science {
203 #[command(subcommand)]
204 action: ScienceAction,
205 },
206}