1use anyhow::Result;
6use clap::Parser;
7
8pub mod ci_patcher;
9pub mod commands;
10pub mod help_parser;
11pub mod orb_generator;
12pub mod output_writer;
13
14#[derive(Debug, Parser)]
16#[command(author, version, about, long_about = None)]
17pub struct Cli {
18 #[command(subcommand)]
19 pub command: Commands,
20}
21
22#[derive(Debug, clap::Subcommand)]
24pub enum Commands {
25 Generate(commands::generate::Generate),
27 Init(commands::init::Init),
29}
30
31impl Cli {
32 pub fn run(&self) -> Result<()> {
34 match &self.command {
35 Commands::Generate(cmd) => cmd.run(),
36 Commands::Init(cmd) => cmd.run(),
37 }
38 }
39}