slave 0.8.1

CLI for slave, a Laravel-inspired Rust framework for MCP-first apps: scaffold an MCP backend with auth, roles and Toasty models and migrations, add server-rendered web apps, and route them by domain or path
//! `slave install:*`: add optional parts to a project, like `php artisan install:api`.

use anyhow::Result;

use crate::{gateway, project};

/// `slave install:gateway`.
pub fn gateway() -> Result<()> {
    let root = project::find_root()?;
    if gateway::install(&root)? {
        println!(
            "Gateway installed. Route apps with `slave make:app <name> --domain <host>` or `--path </prefix>`,"
        );
        println!(
            "then `slave build gateway` (compiling Pingora needs CMake and takes a while the first time)."
        );
    } else {
        println!("The gateway is already installed ({}/).", gateway::DIR);
    }
    Ok(())
}