stub of CLI interface

This commit is contained in:
sigil-03 2025-04-02 21:38:13 -06:00
commit 9816809143
5 changed files with 288 additions and 0 deletions

33
src/main.rs Normal file
View file

@ -0,0 +1,33 @@
use clap::{Parser, Subcommand};
#[derive(Subcommand)]
pub enum Commands {
Monitor,
}
impl Commands {
pub fn execute(self) {
match self {
Self::Monitor => {
println!("[TODO] Power: ----W")
}
}
}
}
#[derive(Parser)]
pub struct Cli {
#[command(subcommand)]
command: Commands,
}
impl Cli {
pub fn execute(self) {
self.command.execute();
}
}
fn main() {
let cli = Cli::parse();
cli.execute();
}