agent-infra-cli 0.2.1

Command-line client for Agent Infra
Documentation
use std::process::ExitCode;

use agent_infra_cli::Cli;
use clap::Parser;

#[tokio::main]
async fn main() -> ExitCode {
    let cli = Cli::parse();
    let format = cli.output;
    match cli.execute().await {
        Ok(output) => match output.render(format) {
            Ok(rendered) => {
                println!("{rendered}");
                ExitCode::SUCCESS
            }
            Err(error) => {
                eprintln!("infra: {error:#}");
                ExitCode::FAILURE
            }
        },
        Err(error) => {
            eprintln!("infra: {error:#}");
            ExitCode::FAILURE
        }
    }
}