2024-03-17 00:19:53 +00:00
|
|
|
use once_cell::sync::Lazy;
|
2024-03-04 20:18:49 +00:00
|
|
|
|
2024-03-17 00:19:53 +00:00
|
|
|
use cli::{auth::auth_command, config::config_command, root::root_command};
|
2024-03-04 20:18:49 +00:00
|
|
|
|
2024-03-17 00:19:53 +00:00
|
|
|
use crate::cli::{CliConfig, Command, CLI, MULTI};
|
2024-03-04 20:18:49 +00:00
|
|
|
|
|
|
|
mod cli;
|
|
|
|
|
|
|
|
fn main() -> anyhow::Result<()> {
|
2024-03-17 00:19:53 +00:00
|
|
|
Lazy::force(&MULTI);
|
2024-03-04 20:18:49 +00:00
|
|
|
|
2024-03-17 00:19:53 +00:00
|
|
|
match CLI.command.clone() {
|
|
|
|
Command::Auth { command } => auth_command(command),
|
|
|
|
Command::Config { command } => config_command(command),
|
|
|
|
cmd => root_command(cmd),
|
2024-03-04 20:18:49 +00:00
|
|
|
}
|
|
|
|
}
|