1use anyhow::Result;
4use clap::{Parser, Subcommand};
5
6#[derive(Parser)]
8pub struct ConfigCommand {
9 #[command(subcommand)]
11 pub command: ConfigSubcommands,
12}
13
14#[derive(Subcommand)]
16pub enum ConfigSubcommands {
17 Models(ModelsCommand),
19}
20
21#[derive(Parser)]
23pub struct ModelsCommand {
24 #[command(subcommand)]
26 pub command: ModelsSubcommands,
27}
28
29#[derive(Subcommand)]
31pub enum ModelsSubcommands {
32 Show(ShowCommand),
34}
35
36#[derive(Parser)]
38pub struct ShowCommand {}
39
40impl ConfigCommand {
41 pub fn execute(self) -> Result<()> {
43 match self.command {
44 ConfigSubcommands::Models(models_cmd) => models_cmd.execute(),
45 }
46 }
47}
48
49impl ModelsCommand {
50 pub fn execute(self) -> Result<()> {
52 match self.command {
53 ModelsSubcommands::Show(show_cmd) => show_cmd.execute(),
54 }
55 }
56}
57
58impl ShowCommand {
59 pub fn execute(self) -> Result<()> {
61 let yaml_content = include_str!("../templates/models.yaml");
63 println!("{}", yaml_content);
64 Ok(())
65 }
66}