use anyhow::Result;
use clap::{Parser, Subcommand};
#[derive(Parser)]
#[command(name = "bastion")]
#[command(version, about = "🏰 Bastion Security Toolkit - スキャン・ガードレール・テンプレート生成", long_about = None)]
struct Cli {
#[command(subcommand)]
command: Option<Commands>,
}
#[derive(Subcommand)]
enum Commands {
Scan,
Init {
#[arg(default_value = "auto")]
language: String,
},
}
fn main() -> Result<()> {
let cli = Cli::parse();
match cli.command {
None | Some(Commands::Scan) => {
bastion_toolkit::scanner::run_scan()?;
}
Some(Commands::Init { language }) => {
bastion_toolkit::init::run_init(&language)?;
}
}
Ok(())
}