use thunder::thunderclap;
struct CLI;
#[thunderclap(author = "SASWE", version = "0.1.0",
about = "")]
impl CLI {
fn version() {
println!("Version: {}", CLI_VERSION);
}
fn ask() {
println!("Filling metadata interactively...");
}
#[thunder::thunderclap(short = 'r', long = "raw", value_name = "entity_ron_or_binfile", help = "Run entity from ron or binary")]
fn raw(entity_ron: String) {
println!("Running entity from: {}", entity_ron);
}
#[arg(long = "dev", help = "Run manually by filling metadata")]
#[arg(long = "nickname", value_name = "app_name", help = "Set application nickname")]
#[arg(long = "authority", value_name = "app_authority", help = "Set application authority")]
#[arg(long = "raw-thinker", value_name = "thinker_script", help = "Specify thinker script, ".sdq" text only.")]
#[arg(long = "executor", value_name = "type content", help = "Specify executor type and content, ".rb" binary only")]
#[arg(long = "runtime-permission", value_name = "su or current user", help = "Specify runtime authority")]
fn dev(
nickname: String,
authority: String,
engine: String,
thinker: String,
executor: String
) {
println!("Running in dev mode with:");
println!("Nickname: {}", nickname);
println!("Authority: {}", authority);
println!("Engine: {}", engine);
println!("Thinker: {}", thinker);
println!("Executor: {}", executor);
}
}
const CLI_VERSION: &str = "0.1.0";