use clap::{Parser, Subcommand};
#[derive(Parser)]
#[command(
name = "etna",
version = "0.1.0",
about = "A CLI tool for model management"
)]
pub struct Cli {
#[command(subcommand)]
pub command: Commands,
}
#[derive(Subcommand)]
pub enum Commands {
Pull {
model: String,
},
Forge {
model: String,
},
Run {
model: String,
prompt: Option<String>,
},
List,
Remove {
model: String,
},
Serve,
}
impl Cli {
pub fn execute(&self) {
match &self.command {
Commands::Pull { model } => {
println!("Pulling model: {}", model);
}
Commands::Forge { model } => {
println!("Forging model: {}", model);
}
Commands::Run { model, prompt } => {
if let Some(p) = prompt {
println!("Running model: {} with prompt: {}", model, p);
} else {
println!("Running model: {} (interactive mode)", model);
}
}
Commands::List => {
println!("Listing available models...");
}
Commands::Remove { model } => {
println!("Removing model: {}", model);
}
Commands::Serve => {
println!("Starting model server...");
}
}
}
}