use clap::{Parser, Subcommand};
mod commands;
#[derive(Parser)]
#[command(name = "agileplus")]
#[command(about = "AgilePlus CLI")]
#[command(version = "0.1.0")]
struct Cli {
#[command(subcommand)]
command: Commands,
}
#[derive(Subcommand)]
enum Commands {
Intent(commands::intent::IntentCommand),
Validate(commands::validate::ValidateCommand),
Query(commands::query::QueryCommand),
Store(commands::store::StoreCommand),
List(commands::list::ListCommand),
Dump(commands::dump::DumpCommand),
Delete(commands::delete::DeleteCommand),
ExportAll(commands::export::ExportAll),
ImportAll(commands::import::ImportAll),
Tag(commands::tag::TagCommand),
Note(commands::note::NoteCommand),
}
fn main() -> anyhow::Result<()> {
let cli = Cli::parse();
match cli.command {
Commands::Intent(cmd) => cmd.run(),
Commands::Validate(cmd) => cmd.run(),
Commands::Query(cmd) => cmd.run(),
Commands::Store(cmd) => cmd.run(),
Commands::List(cmd) => cmd.run(),
Commands::Dump(cmd) => cmd.run(),
Commands::Delete(cmd) => cmd.run(),
Commands::ExportAll(cmd) => cmd.run(),
Commands::ImportAll(cmd) => cmd.run(),
Commands::Tag(cmd) => cmd.run(),
Commands::Note(cmd) => cmd.run(),
}
}