hd-cli 0.2.0

CLI binary for hyperdocker - the `hd` command
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
pub fn run() -> Result<(), Box<dyn std::error::Error>> {
    let path = std::path::Path::new("hd.toml");
    if !path.exists() {
        return Err("No hd.toml found. Run 'hd init' first.".into());
    }

    let spec = hd_spec::EnvSpec::from_file(path)?;
    println!("Environment: {}", spec.environment.name);
    println!("Base: {}", spec.environment.base);
    println!("Services:");
    for (name, svc) in &spec.services {
        println!("  {}{} (watch: {:?})", name, svc.command, svc.watch);
    }
    if spec.services.is_empty() {
        println!("  (none defined)");
    }
    Ok(())
}