remove rpc, cli start

This commit is contained in:
2026-06-04 12:37:57 +02:00
parent 3ce0f800a0
commit 37ce941e02
15 changed files with 219 additions and 126 deletions

12
src/cli/add.rs Normal file
View File

@ -0,0 +1,12 @@
use clap::{ArgMatches, Command, arg};
pub fn create_subcommand() -> Command {
Command::new("add")
.about("add a server")
.arg(arg!(<NAME> "Name of the server"))
.arg(arg!(-v --version <VERSION> "minecraft version of the server"))
}
pub fn subcommand(arg: &ArgMatches) {
println!("got add, sub : {:?}", arg);
}

6
src/cli/edit.rs Normal file
View File

@ -0,0 +1,6 @@
use clap::{Command, arg};
pub fn create_subcommand() -> Command {
Command::new("edit")
.about("edit a server")
}

6
src/cli/ls.rs Normal file
View File

@ -0,0 +1,6 @@
use clap::{Command, arg};
pub fn create_subcommand() -> Command {
Command::new("ls")
.about("list the servers")
}

4
src/cli/mod.rs Normal file
View File

@ -0,0 +1,4 @@
pub mod add;
pub mod edit;
pub mod remove;
pub mod ls;

6
src/cli/remove.rs Normal file
View File

@ -0,0 +1,6 @@
use clap::{Command, arg};
pub fn create_subcommand() -> Command {
Command::new("remove")
.about("remove a server")
}