use clap::Parser;
use llmjury::cli::{run_estimate, run_synth_experiment, Cli, Commands};
use std::process;
fn main() {
let cli = Cli::parse();
let result = match cli.command {
Commands::Estimate(args) => run_estimate(&args),
Commands::SynthExperiment(args) => run_synth_experiment(&args),
};
if let Err(e) = result {
eprintln!("Error: {}", e);
let mut source = std::error::Error::source(&e);
while let Some(err) = source {
eprintln!(" Caused by: {}", err);
source = err.source();
}
process::exit(1);
}
}