2023-09-20 17:22:56 +00:00
|
|
|
mod app;
|
2023-07-23 13:53:31 +00:00
|
|
|
mod cli;
|
2023-09-20 17:22:56 +00:00
|
|
|
mod ui;
|
2023-07-23 13:53:31 +00:00
|
|
|
|
|
|
|
use clap::Parser;
|
|
|
|
|
|
|
|
use crate::cli::{Args, Command};
|
2023-06-14 21:49:20 +00:00
|
|
|
|
2023-06-15 17:19:24 +00:00
|
|
|
#[tokio::main]
|
|
|
|
async fn main() -> anyhow::Result<()> {
|
2023-07-01 10:44:11 +00:00
|
|
|
cli_log::init_cli_log!();
|
2023-06-15 17:19:24 +00:00
|
|
|
|
2023-07-23 13:53:31 +00:00
|
|
|
let args = Args::parse();
|
2023-07-24 21:38:16 +00:00
|
|
|
let command = args.subcommand.unwrap_or(Command::Start {});
|
2023-07-23 13:53:31 +00:00
|
|
|
match command {
|
|
|
|
Command::Start {} => {
|
|
|
|
let mut app = app::App::new()?;
|
2024-05-04 13:00:58 +00:00
|
|
|
|
2024-05-04 13:43:31 +00:00
|
|
|
// NOTE(@soispha): The 'None' here is temporary <2024-05-03>
|
2024-05-04 13:00:58 +00:00
|
|
|
app.run(None, args.plugin_path).await?;
|
2023-07-23 13:53:31 +00:00
|
|
|
}
|
|
|
|
};
|
2023-06-14 21:49:20 +00:00
|
|
|
|
|
|
|
Ok(())
|
|
|
|
}
|
2024-05-03 19:25:09 +00:00
|
|
|
|
|
|
|
// FIXME(@soispha): Re-exports for trixy, this should be configurable <2024-05-03>
|
|
|
|
pub use crate::app::command_interface::*;
|