streamd/src/main.rs
Konstantin Fickel eb1ca12867
Some checks failed
Continuous Integration / Lint, Check & Test (push) Has been cancelled
Continuous Integration / Build Package (push) Has been cancelled
refactor: rewrite in rust
2026-03-29 18:21:43 +02:00

19 lines
641 B
Rust

use clap::Parser;
use streamd::cli::{Cli, Commands};
fn main() -> miette::Result<()> {
let cli = Cli::parse();
match cli.command {
Some(Commands::New) => streamd::cli::commands::new::run()?,
Some(Commands::Todo) => streamd::cli::commands::todo::run()?,
Some(Commands::Edit { number }) => streamd::cli::commands::edit::run(number)?,
Some(Commands::Timesheet) => streamd::cli::commands::timesheet::run()?,
Some(Commands::Completions { shell }) => {
streamd::cli::commands::completions::run(shell);
}
None => streamd::cli::commands::new::run()?,
}
Ok(())
}