start working on kpcli
This commit is contained in:
43
kpcli/src/main.rs
Normal file
43
kpcli/src/main.rs
Normal file
@@ -0,0 +1,43 @@
|
||||
use clap::{Parser, Subcommand};
|
||||
use kordophone::APIInterface;
|
||||
|
||||
#[derive(Parser)]
|
||||
#[command(name = "kpcli")]
|
||||
#[command(about = "CLI tool for the Kordophone daemon")]
|
||||
struct Cli {
|
||||
#[command(subcommand)]
|
||||
command: Commands,
|
||||
}
|
||||
|
||||
#[derive(Subcommand)]
|
||||
enum Commands {
|
||||
/// Commands for api client operations
|
||||
Client {
|
||||
#[command(subcommand)]
|
||||
command: ClientCommands,
|
||||
},
|
||||
}
|
||||
|
||||
#[derive(Subcommand)]
|
||||
enum ClientCommands {
|
||||
ListConversations,
|
||||
Version,
|
||||
}
|
||||
|
||||
fn main() {
|
||||
let cli = Cli::parse();
|
||||
|
||||
match cli.command {
|
||||
Commands::Client { command } => match command {
|
||||
ClientCommands::ListConversations => {
|
||||
println!("Listing conversations...");
|
||||
// TODO: Implement conversation listing
|
||||
},
|
||||
|
||||
ClientCommands::Version => {
|
||||
println!("Getting version...");
|
||||
// TODO: Implement version getting
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user