refactor!: initial commit, setup cli

This commit is contained in:
2026-01-23 22:30:14 -08:00
parent 58ead2bb23
commit 80ae32d799
27 changed files with 1110 additions and 772 deletions

View File

@@ -0,0 +1,29 @@
use clap::{Args, Subcommand};
use kube::Api;
use crate::{AppState, State};
#[derive(Debug, Args)]
pub struct MinecraftCommand {
#[command(subcommand)]
command: MinecraftSubcommand,
}
#[derive(Debug, Subcommand)]
enum MinecraftSubcommand {
Backup {
/// the world to backup
#[arg(short, long)]
world: String,
},
}
impl MinecraftCommand {
pub async fn run(&self, app_state: State) {
match &self.command {
MinecraftSubcommand::Backup { world } => backup_world(app_state, &world),
}
}
}
pub fn backup_world(app_state: State, world: &str) {}

View File

@@ -0,0 +1,8 @@
use clap::Subcommand;
mod minecraft;
#[derive(Subcommand, Debug)]
pub enum Commands {
/// minecraft management
Minecraft(minecraft::MinecraftCommand),
}