setup.rs
1 //! Setup wizard command. 2 3 use acdc_tui::output; 4 use anyhow::Result; 5 6 /// Run the interactive setup wizard. 7 pub async fn run() -> Result<()> { 8 match acdc_wizard::run().await { 9 Ok(result) => { 10 println!(); 11 output::success("Setup complete!"); 12 println!(); 13 println!("Next steps:"); 14 println!(" 1. Run 'ac-dc install' to download node components"); 15 println!(" 2. Run 'ac-dc start' to start your node"); 16 println!(); 17 18 if result.keys_generated { 19 output::warning("IMPORTANT: Back up your keys from:"); 20 println!(" {}", result.instance.keys.path); 21 } 22 23 Ok(()) 24 } 25 Err(e) => { 26 output::error(&format!("Setup failed: {}", e)); 27 Err(e.into()) 28 } 29 } 30 }