MCPcopy Create free account
hub / github.com/clawshell/clawshell / main

Function main

src/main.rs:625–652  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

623
624#[tokio::main]
625async fn main() -> Result<(), Box<dyn std::error::Error>> {
626 ensure_rustls_crypto_provider()?;
627
628 let cli = Cli::parse();
629
630 match cli.command {
631 Commands::Start { config, foreground } => cmd_start(&config, foreground).await?,
632 Commands::Stop => cmd_stop()?,
633 Commands::Status => cmd_status()?,
634 Commands::Restart { config } => cmd_restart(&config).await?,
635 Commands::Logs {
636 level,
637 filter,
638 num,
639 follow,
640 } => cmd_logs(level, filter, num, follow).await?,
641 Commands::Config { config, edit } => cmd_config(&config, edit)?,
642 Commands::MigrateConfig {
643 config,
644 on_ambiguous,
645 } => cmd_migrate_config(&config, on_ambiguous)?,
646 Commands::Onboard => cmd_onboard()?,
647 Commands::Uninstall { yes } => cmd_uninstall(yes)?,
648 Commands::Version => cmd_version(),
649 }
650
651 Ok(())
652}
653
654async fn cmd_start(config_path: &str, foreground: bool) -> Result<(), Box<dyn std::error::Error>> {
655 tui::print_banner("Start");

Callers

nothing calls this directly

Calls 11

cmd_startFunction · 0.85
cmd_stopFunction · 0.85
cmd_statusFunction · 0.85
cmd_restartFunction · 0.85
cmd_logsFunction · 0.85
cmd_configFunction · 0.85
cmd_migrate_configFunction · 0.85
cmd_onboardFunction · 0.85
cmd_uninstallFunction · 0.85
cmd_versionFunction · 0.85

Tested by

no test coverage detected