shell-cell 1.6.3

Shell-Cell. CLI app to spawn and manage containerized shell environments
mod app;

use std::path::Path;

use crate::{
    buildkit::BuildKitD,
    cli::{run::app::App, terminal::Terminal},
    scell::types::name::TargetName,
};

pub async fn run<P: AsRef<Path> + Send + 'static>(
    scell_path: P,
    target: Option<TargetName>,
    detach: bool,
    quiet: bool,
) -> color_eyre::Result<()> {
    let buildkit = BuildKitD::start().await?;
    let mut terminal = Terminal::new()?;
    let res = App::run(&buildkit, scell_path, target, detach, quiet, &mut terminal).await;
    ratatui::try_restore()?;
    res
}