Private
Public Access
1
0

start working on kpcli

This commit is contained in:
2024-11-09 17:35:39 -08:00
parent da36d9da91
commit 6b9f528cbf
4 changed files with 161 additions and 246 deletions

43
kpcli/src/main.rs Normal file
View 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
},
},
}
}