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

Function cmd_start

src/main.rs:654–672  ·  view source on GitHub ↗
(config_path: &str, foreground: bool)

Source from the content-addressed store, hash-verified

652}
653
654async fn cmd_start(config_path: &str, foreground: bool) -> Result<(), Box<dyn std::error::Error>> {
655 tui::print_banner("Start");
656 if foreground {
657 return cmd_start_inner(config_path).await;
658 }
659
660 let path = PathBuf::from(config_path);
661 ensure_config_migrated(&path)?;
662 Config::from_file(&path)
663 .map_err(|e| format!("Failed to load configuration from '{}': {}", config_path, e))?;
664 ensure_service_config_matches(&path)?;
665
666 tui::print_info("Config", config_path);
667 println!("Starting ClawShell via service manager...");
668 platform::service_start()?;
669 tui::print_success("ClawShell started successfully.");
670 tui::print_info("Logs", &process::log_file_path().display().to_string());
671 Ok(())
672}
673
674async fn cmd_start_inner(config_path: &str) -> Result<(), Box<dyn std::error::Error>> {
675 // Validate configuration

Callers 1

mainFunction · 0.85

Calls 8

print_bannerFunction · 0.85
cmd_start_innerFunction · 0.85
ensure_config_migratedFunction · 0.85
print_infoFunction · 0.85
print_successFunction · 0.85
log_file_pathFunction · 0.70
service_startFunction · 0.50

Tested by

no test coverage detected