flyboat 2.0.0

Container environment manager for development
Documentation
#![forbid(unsafe_code)]
#![deny(clippy::all)]

use clap::Parser;
use colored::Colorize;
use flyboat::cli::{Cli, Command};
use flyboat::commands;

fn main() {
    if let Err(e) = run() {
        eprintln!("{}: {}", "Error".red().bold(), e);
        std::process::exit(1);
    }
}

fn run() -> flyboat::Result<()> {
    let cli = Cli::parse();
    let verbose = cli.verbose;

    match cli.command {
        Command::Run(args) => commands::run::execute_run(&args, verbose),
        Command::Build(args) => commands::build::execute_build(&args, verbose),
        Command::Connect(args) => commands::connect::execute_connect(&args, verbose),
        Command::List(args) => commands::list::execute_list(&args, verbose),
        Command::Status => commands::status::execute_status(verbose),
        Command::Clean(args) => commands::clean::execute_clean(&args, verbose),
    }
}